[llvm] [polly] [NFC][RemoveDIs] Use iterators for insertion at various call-sites (PR #84736)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 02:55:36 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 5b5c21d772d20320fd876edddfc204cca93fae0f 1ff5fd2bcffbfb4f1ec82ed329e9b93c2761ed84 -- llvm/lib/Analysis/PHITransAddr.cpp llvm/lib/CodeGen/CodeGenPrepare.cpp llvm/lib/CodeGen/DwarfEHPrepare.cpp llvm/lib/CodeGen/GCRootLowering.cpp llvm/lib/CodeGen/IndirectBrExpandPass.cpp llvm/lib/CodeGen/InterleavedAccessPass.cpp llvm/lib/CodeGen/IntrinsicLowering.cpp llvm/lib/CodeGen/JMCInstrumenter.cpp llvm/lib/CodeGen/SjLjEHPrepare.cpp llvm/lib/CodeGen/WinEHPrepare.cpp llvm/lib/Passes/PassBuilder.cpp llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp llvm/lib/Target/BPF/BPFPreserveDIType.cpp llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp llvm/lib/Target/Mips/Mips16HardFloat.cpp llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp llvm/lib/Target/NVPTX/NVPTXLowerUnreachable.cpp llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp llvm/lib/Target/WebAssembly/WebAssemblyLowerRefTypesIntPtrConv.cpp llvm/lib/Target/X86/X86LowerAMXType.cpp polly/lib/CodeGen/IslNodeBuilder.cpp polly/lib/CodeGen/LoopGenerators.cpp polly/lib/Support/ScopHelper.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/PHITransAddr.cpp b/llvm/lib/Analysis/PHITransAddr.cpp
index 12379e61d2..d16dec0d42 100644
--- a/llvm/lib/Analysis/PHITransAddr.cpp
+++ b/llvm/lib/Analysis/PHITransAddr.cpp
@@ -387,7 +387,8 @@ Value *PHITransAddr::insertTranslatedSubExpr(
GetElementPtrInst *Result = GetElementPtrInst::Create(
GEP->getSourceElementType(), GEPOps[0], ArrayRef(GEPOps).slice(1),
- InVal->getName() + ".phi.trans.insert", PredBB->getTerminator()->getIterator());
+ InVal->getName() + ".phi.trans.insert",
+ PredBB->getTerminator()->getIterator());
Result->setDebugLoc(Inst->getDebugLoc());
Result->setIsInBounds(GEP->isInBounds());
NewInsts.push_back(Result);
@@ -408,9 +409,9 @@ Value *PHITransAddr::insertTranslatedSubExpr(
if (OpVal == nullptr)
return nullptr;
- BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1),
- InVal->getName()+".phi.trans.insert",
- PredBB->getTerminator()->getIterator());
+ BinaryOperator *Res = BinaryOperator::CreateAdd(
+ OpVal, Inst->getOperand(1), InVal->getName() + ".phi.trans.insert",
+ PredBB->getTerminator()->getIterator());
Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap());
Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap());
NewInsts.push_back(Res);
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 1033462d0e..1795675153 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -2021,9 +2021,9 @@ static bool sinkAndCmp0Expression(Instruction *AndI, const TargetLowering &TLI,
// Keep the 'and' in the same place if the use is already in the same block.
Instruction *InsertPt =
User->getParent() == AndI->getParent() ? AndI : User;
- Instruction *InsertedAnd =
- BinaryOperator::Create(Instruction::And, AndI->getOperand(0),
- AndI->getOperand(1), "", InsertPt->getIterator());
+ Instruction *InsertedAnd = BinaryOperator::Create(
+ Instruction::And, AndI->getOperand(0), AndI->getOperand(1), "",
+ InsertPt->getIterator());
// Propagate the debug info.
InsertedAnd->setDebugLoc(AndI->getDebugLoc());
@@ -4117,9 +4117,10 @@ private:
if (SelectInst *CurrentSelect = dyn_cast<SelectInst>(Current)) {
// Is it OK to get metadata from OrigSelect?!
// Create a Select placeholder with dummy value.
- SelectInst *Select = SelectInst::Create(
- CurrentSelect->getCondition(), Dummy, Dummy,
- CurrentSelect->getName(), CurrentSelect->getIterator(), CurrentSelect);
+ SelectInst *Select =
+ SelectInst::Create(CurrentSelect->getCondition(), Dummy, Dummy,
+ CurrentSelect->getName(),
+ CurrentSelect->getIterator(), CurrentSelect);
Map[Current] = Select;
ST.insertNewSelect(Select);
// We are interested in True and False values.
@@ -6431,8 +6432,7 @@ bool CodeGenPrepare::optimizePhiType(
DeletedInstrs.insert(D);
} else {
BasicBlock::iterator insertPt = std::next(D->getIterator());
- ValMap[D] =
- new BitCastInst(D, ConvertTy, D->getName() + ".bc", insertPt);
+ ValMap[D] = new BitCastInst(D, ConvertTy, D->getName() + ".bc", insertPt);
}
}
for (PHINode *Phi : PhiNodes)
@@ -6452,8 +6452,8 @@ bool CodeGenPrepare::optimizePhiType(
DeletedInstrs.insert(U);
replaceAllUsesWith(U, ValMap[U->getOperand(0)], FreshBBs, IsHugeFunc);
} else {
- U->setOperand(0,
- new BitCastInst(ValMap[U->getOperand(0)], PhiTy, "bc", U->getIterator()));
+ U->setOperand(0, new BitCastInst(ValMap[U->getOperand(0)], PhiTy, "bc",
+ U->getIterator()));
}
}
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 654458d3b1..09e7cfb12b 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -111,7 +111,8 @@ Value *DwarfEHPrepare::GetExceptionObject(ResumeInst *RI) {
}
if (!ExnObj)
- ExnObj = ExtractValueInst::Create(RI->getOperand(0), 0, "exn.obj", RI->getIterator());
+ ExnObj = ExtractValueInst::Create(RI->getOperand(0), 0, "exn.obj",
+ RI->getIterator());
RI->eraseFromParent();
diff --git a/llvm/lib/CodeGen/GCRootLowering.cpp b/llvm/lib/CodeGen/GCRootLowering.cpp
index 0d2e0709c0..4fbfc0976f 100644
--- a/llvm/lib/CodeGen/GCRootLowering.cpp
+++ b/llvm/lib/CodeGen/GCRootLowering.cpp
@@ -213,8 +213,8 @@ bool DoLowering(Function &F, GCStrategy &S) {
default: break;
case Intrinsic::gcwrite: {
// Replace a write barrier with a simple store.
- Value *St = new StoreInst(CI->getArgOperand(0),
- CI->getArgOperand(2), CI->getIterator());
+ Value *St = new StoreInst(CI->getArgOperand(0), CI->getArgOperand(2),
+ CI->getIterator());
CI->replaceAllUsesWith(St);
CI->eraseFromParent();
MadeChange = true;
@@ -222,7 +222,8 @@ bool DoLowering(Function &F, GCStrategy &S) {
}
case Intrinsic::gcread: {
// Replace a read barrier with a simple load.
- Value *Ld = new LoadInst(CI->getType(), CI->getArgOperand(1), "", CI->getIterator());
+ Value *Ld = new LoadInst(CI->getType(), CI->getArgOperand(1), "",
+ CI->getIterator());
Ld->takeName(CI);
CI->replaceAllUsesWith(Ld);
CI->eraseFromParent();
diff --git a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
index 3c6c2db8bb..13f595bef8 100644
--- a/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
+++ b/llvm/lib/CodeGen/IndirectBrExpandPass.cpp
@@ -207,9 +207,10 @@ bool runImpl(Function &F, const TargetLowering *TLI, DomTreeUpdater *DTU) {
}
auto GetSwitchValue = [CommonITy](IndirectBrInst *IBr) {
- return CastInst::CreatePointerCast(
- IBr->getAddress(), CommonITy,
- Twine(IBr->getAddress()->getName()) + ".switch_cast", IBr->getIterator());
+ return CastInst::CreatePointerCast(IBr->getAddress(), CommonITy,
+ Twine(IBr->getAddress()->getName()) +
+ ".switch_cast",
+ IBr->getIterator());
};
SmallVector<DominatorTree::UpdateType, 8> Updates;
diff --git a/llvm/lib/CodeGen/SjLjEHPrepare.cpp b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
index af9f23ece4..5ddc4007e3 100644
--- a/llvm/lib/CodeGen/SjLjEHPrepare.cpp
+++ b/llvm/lib/CodeGen/SjLjEHPrepare.cpp
@@ -464,8 +464,8 @@ bool SjLjEHPrepareImpl::setupEntryBlockAndCallSites(Function &F) {
}
// Register the function context and make sure it's known to not throw
- CallInst *Register =
- CallInst::Create(RegisterFn, FuncCtx, "", EntryBB->getTerminator()->getIterator());
+ CallInst *Register = CallInst::Create(
+ RegisterFn, FuncCtx, "", EntryBB->getTerminator()->getIterator());
Register->setDoesNotThrow();
// Following any allocas not in the entry block, update the saved SP in the
@@ -482,7 +482,8 @@ bool SjLjEHPrepareImpl::setupEntryBlockAndCallSites(Function &F) {
}
Instruction *StackAddr = CallInst::Create(StackAddrFn, "sp");
StackAddr->insertAfter(&I);
- new StoreInst(StackAddr, StackPtr, true, std::next(StackAddr->getIterator()));
+ new StoreInst(StackAddr, StackPtr, true,
+ std::next(StackAddr->getIterator()));
}
}
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp
index 4c09bfe90e..93a18f5bc9 100644
--- a/llvm/lib/CodeGen/WinEHPrepare.cpp
+++ b/llvm/lib/CodeGen/WinEHPrepare.cpp
@@ -1376,9 +1376,9 @@ void WinEHPrepareImpl::replaceUseWithLoad(
Value *&Load = Loads[IncomingBlock];
// Insert the load into the predecessor block
if (!Load)
- Load = new LoadInst(V->getType(), SpillSlot,
- Twine(V->getName(), ".wineh.reload"),
- /*isVolatile=*/false, IncomingBlock->getTerminator()->getIterator());
+ Load = new LoadInst(
+ V->getType(), SpillSlot, Twine(V->getName(), ".wineh.reload"),
+ /*isVolatile=*/false, IncomingBlock->getTerminator()->getIterator());
U.set(Load);
} else {
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
index 73984f348b..84b4ccc1ae 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
@@ -470,8 +470,10 @@ bool AMDGPULibCalls::sincosUseNative(CallInst *aCI, const FuncInfo &FInfo) {
nf.setId(AMDGPULibFunc::EI_COS);
FunctionCallee cosExpr = getFunction(M, nf);
if (sinExpr && cosExpr) {
- Value *sinval = CallInst::Create(sinExpr, opr0, "splitsin", aCI->getIterator());
- Value *cosval = CallInst::Create(cosExpr, opr0, "splitcos", aCI->getIterator());
+ Value *sinval =
+ CallInst::Create(sinExpr, opr0, "splitsin", aCI->getIterator());
+ Value *cosval =
+ CallInst::Create(cosExpr, opr0, "splitcos", aCI->getIterator());
new StoreInst(cosval, aCI->getArgOperand(1), aCI->getIterator());
DEBUG_WITH_TYPE("usenative", dbgs() << "<useNative> replace " << *aCI
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
index f8ee9ac5d5..aef0ade6d9 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
@@ -290,8 +290,8 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
Value *sumC = ConstantInt::get(SizetTy, Sum, false);
SmallVector<Value *, 1> alloc_args;
alloc_args.push_back(sumC);
- CallInst *pcall =
- CallInst::Create(PrintfAllocFn, alloc_args, "printf_alloc_fn", CI->getIterator());
+ CallInst *pcall = CallInst::Create(PrintfAllocFn, alloc_args,
+ "printf_alloc_fn", CI->getIterator());
//
// Insert code to split basicblock with a
@@ -316,7 +316,8 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
// store unique printf id in the buffer
//
GetElementPtrInst *BufferIdx = GetElementPtrInst::Create(
- I8Ty, pcall, ConstantInt::get(Ctx, APInt(32, 0)), "PrintBuffID", BrnchPoint);
+ I8Ty, pcall, ConstantInt::get(Ctx, APInt(32, 0)), "PrintBuffID",
+ BrnchPoint);
Type *idPointer = PointerType::get(I32Ty, AMDGPUAS::GLOBAL_ADDRESS);
Value *id_gep_cast =
diff --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index 6ec7a0fb51..924a4580aa 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -780,7 +780,8 @@ Instruction *MVEGatherScatterLowering::tryCreateIncrementingGatScat(
// Make sure the offsets are scaled correctly
Instruction *ScaledOffsets = BinaryOperator::Create(
Instruction::Shl, OffsetsIncoming,
- Builder.CreateVectorSplat(Ty->getNumElements(), Builder.getInt32(TypeScale)),
+ Builder.CreateVectorSplat(Ty->getNumElements(),
+ Builder.getInt32(TypeScale)),
"ScaledIndex", I->getIterator());
// Add the base to the offsets
OffsetsIncoming = BinaryOperator::Create(
@@ -838,7 +839,8 @@ Instruction *MVEGatherScatterLowering::tryCreateIncrementingWBGatScat(
Instruction *ScaledOffsets = BinaryOperator::Create(
Instruction::Shl, Phi->getIncomingValue(1 - IncrementIndex),
Builder.CreateVectorSplat(NumElems, Builder.getInt32(TypeScale)),
- "ScaledIndex", Phi->getIncomingBlock(1 - IncrementIndex)->back().getIterator());
+ "ScaledIndex",
+ Phi->getIncomingBlock(1 - IncrementIndex)->back().getIterator());
// Add the base to the offsets
OffsetsIncoming = BinaryOperator::Create(
Instruction::Add, ScaledOffsets,
@@ -847,7 +849,8 @@ Instruction *MVEGatherScatterLowering::tryCreateIncrementingWBGatScat(
Builder.CreatePtrToInt(
BasePtr,
cast<VectorType>(ScaledOffsets->getType())->getElementType())),
- "StartIndex", Phi->getIncomingBlock(1 - IncrementIndex)->back().getIterator());
+ "StartIndex",
+ Phi->getIncomingBlock(1 - IncrementIndex)->back().getIterator());
// The gather is pre-incrementing
OffsetsIncoming = BinaryOperator::Create(
Instruction::Sub, OffsetsIncoming,
@@ -887,7 +890,7 @@ void MVEGatherScatterLowering::pushOutAdd(PHINode *&Phi,
unsigned StartIndex) {
LLVM_DEBUG(dbgs() << "masked gathers/scatters: optimising add instruction\n");
BasicBlock::iterator InsertionPoint =
- Phi->getIncomingBlock(StartIndex)->back().getIterator();
+ Phi->getIncomingBlock(StartIndex)->back().getIterator();
// Initialize the phi with a vector that contains a sum of the constants
Instruction *NewIndex = BinaryOperator::Create(
Instruction::Add, Phi->getIncomingValue(StartIndex), OffsSecondOperand,
@@ -925,13 +928,12 @@ void MVEGatherScatterLowering::pushOutMulShl(unsigned Opcode, PHINode *&Phi,
OffsSecondOperand, "Product", InsertionPoint);
BasicBlock::iterator NewIncrInsertPt =
- Phi->getIncomingBlock(LoopIncrement)->back().getIterator();
+ Phi->getIncomingBlock(LoopIncrement)->back().getIterator();
NewIncrInsertPt = std::prev(NewIncrInsertPt);
// Increment NewIndex by Product instead of the multiplication
Instruction *NewIncrement = BinaryOperator::Create(
- Instruction::Add, Phi, Product, "IncrementPushedOutMul",
- NewIncrInsertPt);
+ Instruction::Add, Phi, Product, "IncrementPushedOutMul", NewIncrInsertPt);
Phi->addIncoming(StartIndex,
Phi->getIncomingBlock(LoopIncrement == 1 ? 0 : 1));
diff --git a/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp b/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
index ce1895bde5..4be6220b35 100644
--- a/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
+++ b/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
@@ -426,8 +426,9 @@ static void replaceWithGEP(CallInst *Call, uint32_t DimensionIndex,
IdxList.push_back(Zero);
IdxList.push_back(Call->getArgOperand(GEPIndex));
- auto *GEP = GetElementPtrInst::CreateInBounds(
- getBaseElementType(Call), Call->getArgOperand(0), IdxList, "", Call->getIterator());
+ auto *GEP = GetElementPtrInst::CreateInBounds(getBaseElementType(Call),
+ Call->getArgOperand(0), IdxList,
+ "", Call->getIterator());
Call->replaceAllUsesWith(GEP);
Call->eraseFromParent();
}
@@ -1091,9 +1092,11 @@ bool BPFAbstractMemberAccess::transformGEPChain(CallInst *Call,
// Load the global variable which represents the returned field info.
LoadInst *LDInst;
if (IsInt32Ret)
- LDInst = new LoadInst(Type::getInt32Ty(BB->getContext()), GV, "", Call->getIterator());
+ LDInst = new LoadInst(Type::getInt32Ty(BB->getContext()), GV, "",
+ Call->getIterator());
else
- LDInst = new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "", Call->getIterator());
+ LDInst = new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "",
+ Call->getIterator());
Instruction *PassThroughInst =
BPFCoreSharedInfo::insertPassThrough(M, BB, LDInst, Call);
@@ -1113,7 +1116,8 @@ bool BPFAbstractMemberAccess::transformGEPChain(CallInst *Call,
// The original Call inst is removed.
// Load the global variable.
- auto *LDInst = new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "", Call->getIterator());
+ auto *LDInst = new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "",
+ Call->getIterator());
// Generate a BitCast
auto *BCInst =
diff --git a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
index 8190830961..afc1549880 100644
--- a/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
+++ b/llvm/lib/Target/BPF/BPFPreserveDIType.cpp
@@ -116,8 +116,8 @@ static bool BPFPreserveDITypeImpl(Function &F) {
GV->setMetadata(LLVMContext::MD_preserve_access_index, MD);
// Load the global variable which represents the type info.
- auto *LDInst =
- new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "", Call->getIterator());
+ auto *LDInst = new LoadInst(Type::getInt64Ty(BB->getContext()), GV, "",
+ Call->getIterator());
Instruction *PassThroughInst =
BPFCoreSharedInfo::insertPassThrough(M, BB, LDInst, Call);
Call->replaceAllUsesWith(PassThroughInst);
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
index 19a587c466..cde02c25c4 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
@@ -183,9 +183,9 @@ static void convertToParamAS(Value *OldUser, Value *Param) {
}
if (auto *GEP = dyn_cast<GetElementPtrInst>(I.OldInstruction)) {
SmallVector<Value *, 4> Indices(GEP->indices());
- auto *NewGEP = GetElementPtrInst::Create(GEP->getSourceElementType(),
- I.NewParam, Indices,
- GEP->getName(), GEP->getIterator());
+ auto *NewGEP = GetElementPtrInst::Create(
+ GEP->getSourceElementType(), I.NewParam, Indices, GEP->getName(),
+ GEP->getIterator());
NewGEP->setIsInBounds(GEP->isInBounds());
return NewGEP;
}
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index ca1137a8f7..4a3b64f30d 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -263,7 +263,8 @@ class PPCBoolRetToInt : public FunctionPass {
Value *IntRetVal = BoolToIntMap[U];
Type *Int1Ty = Type::getInt1Ty(U->getContext());
auto *I = cast<Instruction>(U.getUser());
- Value *BackToBool = new TruncInst(IntRetVal, Int1Ty, "backToBool", I->getIterator());
+ Value *BackToBool =
+ new TruncInst(IntRetVal, Int1Ty, "backToBool", I->getIterator());
U.set(BackToBool);
return true;
diff --git a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
index 6e2d51899c..f19eb2af5e 100644
--- a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -807,8 +807,7 @@ Instruction *PPCLoopInstrFormPrep::rewriteForBucketElement(
PtrIP = Element.Instr->getIterator();
assert(OffToBase && "There should be an offset for non base element!\n");
- GetElementPtrInst *NewPtr =
- GetElementPtrInst::Create(
+ GetElementPtrInst *NewPtr = GetElementPtrInst::Create(
I8Ty, PtrInc, OffToBase,
getInstrName(Element.Instr, GEPNodeOffNameSuffix));
if (PtrIP)
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
index e84f320a28..0427fe473f 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
@@ -1283,9 +1283,9 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) {
DebugLoc FirstDL = getOrCreateDebugLoc(&*Entry->begin(), F.getSubprogram());
SplitBlock(Entry, &*Entry->getFirstInsertionPt());
- BinaryOperator *SetjmpTableSize =
- BinaryOperator::Create(Instruction::Add, IRB.getInt32(4), IRB.getInt32(0),
- "setjmpTableSize", Entry->getTerminator()->getIterator());
+ BinaryOperator *SetjmpTableSize = BinaryOperator::Create(
+ Instruction::Add, IRB.getInt32(4), IRB.getInt32(0), "setjmpTableSize",
+ Entry->getTerminator()->getIterator());
SetjmpTableSize->setDebugLoc(FirstDL);
// setjmpTable = (int *) malloc(40);
Type *IntPtrTy = getAddrIntType(&M);
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index d48e3fee0f..8b2207ecbf 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -1308,7 +1308,8 @@ void IslNodeBuilder::allocateNewArrays(BBPair StartExitBlocks) {
auto InstIt = Builder.GetInsertBlock()
->getParent()
->getEntryBlock()
- .getTerminator()->getIterator();
+ .getTerminator()
+ ->getIterator();
auto *CreatedArray = new AllocaInst(NewArrayType, DL.getAllocaAddrSpace(),
SAI->getName(), InstIt);
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 6afe91a27b..24c7011b06 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -328,8 +328,9 @@ private:
Value *LHS = expandCodeFor(LHSScev, E->getType(), IP);
Value *RHS = expandCodeFor(RHSScev, E->getType(), IP);
- Inst = BinaryOperator::Create((Instruction::BinaryOps)Inst->getOpcode(),
- LHS, RHS, Inst->getName() + Name, IP->getIterator());
+ Inst =
+ BinaryOperator::Create((Instruction::BinaryOps)Inst->getOpcode(), LHS,
+ RHS, Inst->getName() + Name, IP->getIterator());
return SE.getSCEV(Inst);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/84736
More information about the llvm-commits
mailing list