mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-21 18:22:53 +01:00
Fix some clang-tidy bugprone-argument-comment issues
This commit is contained in:
parent
6ab9d78a52
commit
64799c106c
@ -772,7 +772,7 @@ public:
|
||||
/// CreateMachineInstr - Allocate a new MachineInstr. Use this instead
|
||||
/// of `new MachineInstr'.
|
||||
MachineInstr *CreateMachineInstr(const MCInstrDesc &MCID, const DebugLoc &DL,
|
||||
bool NoImp = false);
|
||||
bool NoImplicit = false);
|
||||
|
||||
/// Create a new MachineInstr which is a copy of \p Orig, identical in all
|
||||
/// ways except the instruction has no parent, prev, or next. Bundling flags
|
||||
|
@ -596,7 +596,7 @@ public:
|
||||
GlobalValue::LinkageTypes::AvailableExternallyLinkage,
|
||||
/*NotEligibleToImport=*/true, /*Live=*/true, /*IsLocal=*/false,
|
||||
/*CanAutoHide=*/false),
|
||||
/*InsCount=*/0, FunctionSummary::FFlags{}, /*EntryCount=*/0,
|
||||
/*NumInsts=*/0, FunctionSummary::FFlags{}, /*EntryCount=*/0,
|
||||
std::vector<ValueInfo>(), std::move(Edges),
|
||||
std::vector<GlobalValue::GUID>(),
|
||||
std::vector<FunctionSummary::VFuncId>(),
|
||||
|
@ -28,8 +28,8 @@ template <typename T, typename F>
|
||||
std::enable_if_t<std::is_integral<T>::value && sizeof(T) * 8 <= 64,
|
||||
llvm::Optional<T>>
|
||||
checkedOp(T LHS, T RHS, F Op, bool Signed = true) {
|
||||
llvm::APInt ALHS(/*BitSize=*/sizeof(T) * 8, LHS, Signed);
|
||||
llvm::APInt ARHS(/*BitSize=*/sizeof(T) * 8, RHS, Signed);
|
||||
llvm::APInt ALHS(sizeof(T) * 8, LHS, Signed);
|
||||
llvm::APInt ARHS(sizeof(T) * 8, RHS, Signed);
|
||||
bool Overflow;
|
||||
llvm::APInt Out = (ALHS.*Op)(ARHS, Overflow);
|
||||
if (Overflow)
|
||||
|
@ -147,11 +147,11 @@ public:
|
||||
: MinSize(MinSize), IsScalable(Scalable) {}
|
||||
|
||||
static constexpr TypeSize Fixed(uint64_t Size) {
|
||||
return TypeSize(Size, /*IsScalable=*/false);
|
||||
return TypeSize(Size, /*Scalable=*/false);
|
||||
}
|
||||
|
||||
static constexpr TypeSize Scalable(uint64_t MinSize) {
|
||||
return TypeSize(MinSize, /*IsScalable=*/true);
|
||||
return TypeSize(MinSize, /*Scalable=*/true);
|
||||
}
|
||||
|
||||
// Scalable vector types with the same minimum size as a fixed size type are
|
||||
|
@ -636,7 +636,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy,
|
||||
const DataLayout *DL) const {
|
||||
LLVMContext &Ctx = FTy.getContext();
|
||||
Type *PCharTy = Type::getInt8PtrTy(Ctx);
|
||||
Type *SizeTTy = DL ? DL->getIntPtrType(Ctx, /*AS=*/0) : nullptr;
|
||||
Type *SizeTTy = DL ? DL->getIntPtrType(Ctx, /*AddressSpace=*/0) : nullptr;
|
||||
auto IsSizeTTy = [SizeTTy](Type *Ty) {
|
||||
return SizeTTy ? Ty == SizeTTy : Ty->isIntegerTy();
|
||||
};
|
||||
|
@ -699,7 +699,7 @@ static void interpretValues(const MachineInstr *CurMI,
|
||||
Register FP = TRI.getFrameRegister(*MF);
|
||||
bool IsSPorFP = (RegLoc == SP) || (RegLoc == FP);
|
||||
if (TRI.isCalleeSavedPhysReg(RegLoc, *MF) || IsSPorFP) {
|
||||
MachineLocation MLoc(RegLoc, /*IsIndirect=*/IsSPorFP);
|
||||
MachineLocation MLoc(RegLoc, /*Indirect=*/IsSPorFP);
|
||||
finishCallSiteParams(MLoc, ParamValue->second,
|
||||
ForwardedRegWorklist[ParamFwdReg], Params);
|
||||
} else {
|
||||
|
@ -134,17 +134,18 @@ bool BranchFolderPass::runOnMachineFunction(MachineFunction &MF) {
|
||||
MF.getSubtarget().getRegisterInfo());
|
||||
}
|
||||
|
||||
BranchFolder::BranchFolder(bool defaultEnableTailMerge, bool CommonHoist,
|
||||
BranchFolder::BranchFolder(bool DefaultEnableTailMerge, bool CommonHoist,
|
||||
MBFIWrapper &FreqInfo,
|
||||
const MachineBranchProbabilityInfo &ProbInfo,
|
||||
ProfileSummaryInfo *PSI,
|
||||
unsigned MinTailLength)
|
||||
ProfileSummaryInfo *PSI, unsigned MinTailLength)
|
||||
: EnableHoistCommonCode(CommonHoist), MinCommonTailLength(MinTailLength),
|
||||
MBBFreqInfo(FreqInfo), MBPI(ProbInfo), PSI(PSI) {
|
||||
if (MinCommonTailLength == 0)
|
||||
MinCommonTailLength = TailMergeSize;
|
||||
switch (FlagEnableTailMerge) {
|
||||
case cl::BOU_UNSET: EnableTailMerge = defaultEnableTailMerge; break;
|
||||
case cl::BOU_UNSET:
|
||||
EnableTailMerge = DefaultEnableTailMerge;
|
||||
break;
|
||||
case cl::BOU_TRUE: EnableTailMerge = true; break;
|
||||
case cl::BOU_FALSE: EnableTailMerge = false; break;
|
||||
}
|
||||
|
@ -32,8 +32,7 @@ class TargetRegisterInfo;
|
||||
|
||||
class LLVM_LIBRARY_VISIBILITY BranchFolder {
|
||||
public:
|
||||
explicit BranchFolder(bool defaultEnableTailMerge,
|
||||
bool CommonHoist,
|
||||
explicit BranchFolder(bool DefaultEnableTailMerge, bool CommonHoist,
|
||||
MBFIWrapper &FreqInfo,
|
||||
const MachineBranchProbabilityInfo &ProbInfo,
|
||||
ProfileSummaryInfo *PSI,
|
||||
|
@ -3359,8 +3359,8 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &MF) {
|
||||
// No tail merging opportunities if the block number is less than four.
|
||||
if (MF.size() > 3 && EnableTailMerge) {
|
||||
unsigned TailMergeSize = TailDupSize + 1;
|
||||
BranchFolder BF(/*EnableTailMerge=*/true, /*CommonHoist=*/false, *MBFI,
|
||||
*MBPI, PSI, TailMergeSize);
|
||||
BranchFolder BF(/*DefaultEnableTailMerge=*/true, /*CommonHoist=*/false,
|
||||
*MBFI, *MBPI, PSI, TailMergeSize);
|
||||
|
||||
if (BF.OptimizeFunction(MF, TII, MF.getSubtarget().getRegisterInfo(), MLI,
|
||||
/*AfterPlacement=*/true)) {
|
||||
|
@ -347,9 +347,9 @@ void MachineFunction::assignBeginEndSections() {
|
||||
/// Allocate a new MachineInstr. Use this instead of `new MachineInstr'.
|
||||
MachineInstr *MachineFunction::CreateMachineInstr(const MCInstrDesc &MCID,
|
||||
const DebugLoc &DL,
|
||||
bool NoImp) {
|
||||
bool NoImplicit) {
|
||||
return new (InstructionRecycler.Allocate<MachineInstr>(Allocator))
|
||||
MachineInstr(*this, MCID, DL, NoImp);
|
||||
MachineInstr(*this, MCID, DL, NoImplicit);
|
||||
}
|
||||
|
||||
/// Create a new MachineInstr which is a copy of the 'Orig' instruction,
|
||||
|
@ -488,7 +488,7 @@ void MachineVerifier::report(const char *msg, const MachineInstr *MI) {
|
||||
errs() << "- instruction: ";
|
||||
if (Indexes && Indexes->hasIndex(*MI))
|
||||
errs() << Indexes->getInstructionIndex(*MI) << '\t';
|
||||
MI->print(errs(), /*SkipOpers=*/true);
|
||||
MI->print(errs(), /*IsStandalone=*/true);
|
||||
}
|
||||
|
||||
void MachineVerifier::report(const char *msg, const MachineOperand *MO,
|
||||
|
@ -1180,7 +1180,7 @@ std::string ScheduleDAGInstrs::getGraphNodeLabel(const SUnit *SU) const {
|
||||
if (SU == &ExitSU)
|
||||
oss << "<exit>";
|
||||
else
|
||||
SU->getInstr()->print(oss, /*SkipOpers=*/true);
|
||||
SU->getInstr()->print(oss, /*IsStandalone=*/true);
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
@ -446,7 +446,7 @@ Register FastISel::materializeConstant(const Value *V, MVT VT) {
|
||||
getRegForValue(ConstantInt::get(V->getContext(), SIntVal));
|
||||
if (IntegerReg)
|
||||
Reg = fastEmit_r(IntVT.getSimpleVT(), VT, ISD::SINT_TO_FP, IntegerReg,
|
||||
/*Kill=*/false);
|
||||
/*Op0IsKill=*/false);
|
||||
}
|
||||
}
|
||||
} else if (const auto *Op = dyn_cast<Operator>(V)) {
|
||||
@ -1789,13 +1789,13 @@ bool FastISel::selectFNeg(const User *I, const Value *In) {
|
||||
return false;
|
||||
|
||||
Register IntResultReg = fastEmit_ri_(
|
||||
IntVT.getSimpleVT(), ISD::XOR, IntReg, /*IsKill=*/true,
|
||||
IntVT.getSimpleVT(), ISD::XOR, IntReg, /*Op0IsKill=*/true,
|
||||
UINT64_C(1) << (VT.getSizeInBits() - 1), IntVT.getSimpleVT());
|
||||
if (!IntResultReg)
|
||||
return false;
|
||||
|
||||
ResultReg = fastEmit_r(IntVT.getSimpleVT(), VT.getSimpleVT(), ISD::BITCAST,
|
||||
IntResultReg, /*IsKill=*/true);
|
||||
IntResultReg, /*Op0IsKill=*/true);
|
||||
if (!ResultReg)
|
||||
return false;
|
||||
|
||||
|
@ -1320,7 +1320,7 @@ static bool doImportingForModule(Module &M) {
|
||||
|
||||
// Next we need to promote to global scope and rename any local values that
|
||||
// are potentially exported to other modules.
|
||||
if (renameModuleForThinLTO(M, *Index, /*clearDSOOnDeclarations=*/false,
|
||||
if (renameModuleForThinLTO(M, *Index, /*ClearDSOLocalOnDeclarations=*/false,
|
||||
/*GlobalsToImport=*/nullptr)) {
|
||||
errs() << "Error renaming module\n";
|
||||
return false;
|
||||
|
@ -432,7 +432,7 @@ void HWAddressSanitizer::createHwasanCtorComdat() {
|
||||
auto *NoteTy = StructType::get(Int32Ty, Int32Ty, Int32Ty, Name->getType(),
|
||||
Int32Ty, Int32Ty);
|
||||
auto *Note =
|
||||
new GlobalVariable(M, NoteTy, /*isConstantGlobal=*/true,
|
||||
new GlobalVariable(M, NoteTy, /*isConstant=*/true,
|
||||
GlobalValue::PrivateLinkage, nullptr, kHwasanNoteName);
|
||||
Note->setSection(".note.hwasan.globals");
|
||||
Note->setComdat(NoteComdat);
|
||||
|
@ -1435,7 +1435,7 @@ static void fixupDebugInfoPostExtraction(Function &OldFunc, Function &NewFunc,
|
||||
// function arguments, as the parameters don't correspond to anything at the
|
||||
// source level.
|
||||
assert(OldSP->getUnit() && "Missing compile unit for subprogram");
|
||||
DIBuilder DIB(*OldFunc.getParent(), /*AllowUnresolvedNodes=*/false,
|
||||
DIBuilder DIB(*OldFunc.getParent(), /*AllowUnresolved=*/false,
|
||||
OldSP->getUnit());
|
||||
auto SPType = DIB.createSubroutineType(DIB.getOrCreateTypeArray(None));
|
||||
DISubprogram::DISPFlags SPFlags = DISubprogram::SPFlagDefinition |
|
||||
|
@ -775,7 +775,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
// supported on the target.
|
||||
if (ST->getMetadata(LLVMContext::MD_nontemporal)) {
|
||||
// Arbitrarily try a vector of 2 elements.
|
||||
auto *VecTy = FixedVectorType::get(T, /*NumElements=*/2);
|
||||
auto *VecTy = FixedVectorType::get(T, /*NumElts=*/2);
|
||||
assert(VecTy && "did not find vectorized version of stored type");
|
||||
if (!TTI->isLegalNTStore(VecTy, ST->getAlign())) {
|
||||
reportVectorizationFailure(
|
||||
@ -790,7 +790,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
|
||||
if (LD->getMetadata(LLVMContext::MD_nontemporal)) {
|
||||
// For nontemporal loads, check that a nontemporal vector version is
|
||||
// supported on the target (arbitrarily try a vector of 2 elements).
|
||||
auto *VecTy = FixedVectorType::get(I.getType(), /*NumElements=*/2);
|
||||
auto *VecTy = FixedVectorType::get(I.getType(), /*NumElts=*/2);
|
||||
assert(VecTy && "did not find vectorized version of load type");
|
||||
if (!TTI->isLegalNTLoad(VecTy, LD->getAlign())) {
|
||||
reportVectorizationFailure(
|
||||
|
@ -2374,7 +2374,7 @@ BoUpSLP::~BoUpSLP() {
|
||||
void BoUpSLP::eraseInstructions(ArrayRef<Value *> AV) {
|
||||
for (auto *V : AV) {
|
||||
if (auto *I = dyn_cast<Instruction>(V))
|
||||
eraseInstruction(I, /*ReplaceWithUndef=*/true);
|
||||
eraseInstruction(I, /*ReplaceOpsWithUndef=*/true);
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user