Skip to content

Commit e784792

Browse files
karolzwolakigcbot
authored andcommitted
Revert "use IRBuilder from llvm namespace instead of IGCLLVM"
Revert "use IRBuilder from llvm namespace instead of IGCLLVM" We're reverting due to regressions.
1 parent 4f4e62b commit e784792

File tree

55 files changed

+218
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+218
-231
lines changed

IGC/AdaptorCommon/FreezeIntDiv.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ bool FreezeIntDiv::runOnFunction(Function& F)
6969

7070
void FreezeIntDiv::freezeIntDiv(BinaryOperator& I)
7171
{
72-
IRBuilder<> builder(I.getNextNode());
72+
llvm::IRBuilder<> builder(I.getNextNode());
7373
Value* FI = builder.CreateFreeze(&I, "freeze");
7474
I.replaceAllUsesWith(FI);
7575
cast<Instruction>(FI)->setOperand(0, &I);

IGC/AdaptorCommon/ImplicitArgs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ Value* ImplicitArgs::getImplicitArgValue(llvm::Function& F, ImplicitArg::ArgType
774774
}
775775

776776
// Does not exist, create the intrinsic at function entry
777-
IRBuilder<> Builder(&*F.getEntryBlock().begin());
777+
llvm::IRBuilder<> Builder(&*F.getEntryBlock().begin());
778778
Type* argTy = iArg.getLLVMType(F.getParent()->getContext());
779779
Function* intrinsicDecl = GenISAIntrinsic::getDeclaration(F.getParent(), genID, argTy);
780780
CallInst* inst = Builder.CreateCall(intrinsicDecl);

IGC/AdaptorCommon/LegalizeFunctionSignatures.cpp

+13-15
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ SPDX-License-Identifier: MIT
1313
#include "Compiler/CodeGenPublic.h"
1414
#include "common/LLVMWarningsPush.hpp"
1515
#include "llvmWrapper/IR/DerivedTypes.h"
16-
#include <llvm/Support/Alignment.h>
1716
#include <llvmWrapper/IR/Instructions.h>
1817
#include "llvmWrapper/IR/Function.h"
1918
#include <llvm/IR/Module.h>
@@ -217,7 +216,7 @@ inline StructType* PromotedStructValueType(const Module& M, const Argument* arg)
217216
}
218217

219218
// BE does not handle struct load/store, so instead store each element of the struct value to the GEP of the struct pointer
220-
inline void StoreToStruct(IRBuilder<>& builder, Value* strVal, Value* strPtr)
219+
inline void StoreToStruct(IGCLLVM::IRBuilder<>& builder, Value* strVal, Value* strPtr)
221220
{
222221
IGC_ASSERT(strPtr->getType()->isPointerTy());
223222
IGC_ASSERT(strVal->getType()->isStructTy());
@@ -233,7 +232,7 @@ inline void StoreToStruct(IRBuilder<>& builder, Value* strVal, Value* strPtr)
233232
}
234233

235234
// BE does not handle struct load/store, so instead load each element from the GEP struct pointer and insert it into the struct value
236-
inline Value* LoadFromStruct(IRBuilder<>& builder, Value* strPtr, Type* ty)
235+
inline Value* LoadFromStruct(IGCLLVM::IRBuilder<>& builder, Value* strPtr, Type* ty)
237236
{
238237
IGC_ASSERT(strPtr->getType()->isPointerTy());
239238
IGC_ASSERT(ty->isStructTy());
@@ -395,7 +394,7 @@ void LegalizeFunctionSignatures::FixFunctionBody(Module& M)
395394

396395
// Fix the usages of arguments that have changed
397396
BasicBlock* EntryBB = BasicBlock::Create(M.getContext(), "", pNewFunc);
398-
IRBuilder<> builder(EntryBB);
397+
IGCLLVM::IRBuilder<> builder(EntryBB);
399398
for (; OldArgIt != pFunc->arg_end(); ++OldArgIt)
400399
{
401400
if (OldArgIt == pFunc->arg_begin() && retTypeOption == ReturnOpt::RETURN_STRUCT)
@@ -464,13 +463,12 @@ void LegalizeFunctionSignatures::FixFunctionBody(Module& M)
464463
const auto ptrSize = DL.getPointerSize();
465464
for (auto RetInst : Returns)
466465
{
467-
IRBuilder<> builder(RetInst);
466+
IGCLLVM::IRBuilder<> builder(RetInst);
468467
Type* retTy = RetInst->getReturnValue()->getType();
469468
Value* returnedValPtr = builder.CreateAlloca(retTy);
470469
builder.CreateStore(RetInst->getReturnValue(), returnedValPtr);
471470
auto size = DL.getTypeAllocSize(retTy);
472-
auto Align = MaybeAlign(ptrSize);
473-
builder.CreateMemCpy(&*pNewFunc->arg_begin(), Align, returnedValPtr, Align, size);
471+
builder.CreateMemCpy(&*pNewFunc->arg_begin(), returnedValPtr, size, ptrSize);
474472
builder.CreateRetVoid();
475473
RetInst->eraseFromParent();
476474
}
@@ -480,7 +478,7 @@ void LegalizeFunctionSignatures::FixFunctionBody(Module& M)
480478
// For "sret" returns, we load from the temp alloca created earlier and return the loaded value instead
481479
for (auto RetInst : Returns)
482480
{
483-
IRBuilder<> builder(RetInst);
481+
IGCLLVM::IRBuilder<> builder(RetInst);
484482
Value* retVal = LoadFromStruct(builder, tempAllocaForSRetPointer, tempAllocaForSRetPointerTy);
485483
builder.CreateRet(retVal);
486484
RetInst->eraseFromParent();
@@ -491,7 +489,7 @@ void LegalizeFunctionSignatures::FixFunctionBody(Module& M)
491489
// Extend illegal int returns to legal type
492490
for (auto RetInst : Returns)
493491
{
494-
IRBuilder<> builder(RetInst);
492+
IGCLLVM::IRBuilder<> builder(RetInst);
495493
Value* retVal = RetInst->getReturnValue();
496494
Type* retTy = retVal->getType();
497495
retVal = builder.CreateZExt(retVal, LegalizedIntVectorType(M, retTy));
@@ -530,7 +528,7 @@ void LegalizeFunctionSignatures::FixFunctionUsers(Module& M)
530528
else if (Instruction* inst = dyn_cast<Instruction>(ui))
531529
{
532530
// Any other uses can be replaced with a pointer cast
533-
IRBuilder<> builder(inst);
531+
IGCLLVM::IRBuilder<> builder(inst);
534532
Value* pCast = builder.CreatePointerCast(pNewFunc, pFunc->getType());
535533
inst->replaceUsesOfWith(pFunc, pCast);
536534
}
@@ -586,7 +584,7 @@ void LegalizeFunctionSignatures::FixCallInstruction(Module& M, CallInst* callIns
586584
else if (!isLegalSignatureType(M, callInst->getType(), isStackCall))
587585
{
588586
// Create an alloca for the return type
589-
IRBuilder<> builder(callInst);
587+
IGCLLVM::IRBuilder<> builder(callInst);
590588
returnPtr = builder.CreateAlloca(callInst->getType());
591589
callArgs.push_back(returnPtr);
592590
// Add "noalias" and "sret" to return value operand at callsite
@@ -608,7 +606,7 @@ void LegalizeFunctionSignatures::FixCallInstruction(Module& M, CallInst* callIns
608606
if (!isLegalIntVectorType(M, arg->getType()))
609607
{
610608
// extend the illegal int to a legal type
611-
IRBuilder<> builder(callInst);
609+
IGCLLVM::IRBuilder<> builder(callInst);
612610
Value* extend = builder.CreateZExt(callInst->getOperand(opNum), LegalizedIntVectorType(M, arg->getType()));
613611
callArgs.push_back(extend);
614612
ArgAttrVec.push_back(AttributeSet());
@@ -618,7 +616,7 @@ void LegalizeFunctionSignatures::FixCallInstruction(Module& M, CallInst* callIns
618616
isPromotableStructType(M, callInst->getParamByValType(opNum), isStackCall))
619617
{
620618
// Map the new operand to the loaded value of the struct pointer
621-
IRBuilder<> builder(callInst);
619+
IGCLLVM::IRBuilder<> builder(callInst);
622620
Value* newOp = LoadFromStruct(builder, callInst->getOperand(opNum), callInst->getParamByValType(opNum));
623621
callArgs.push_back(newOp);
624622
ArgAttrVec.push_back(AttributeSet());
@@ -627,7 +625,7 @@ void LegalizeFunctionSignatures::FixCallInstruction(Module& M, CallInst* callIns
627625
else if (!isLegalSignatureType(M, arg->getType(), isStackCall))
628626
{
629627
// Create and store operand as an alloca, then pass as argument
630-
IRBuilder<> builder(callInst);
628+
IGCLLVM::IRBuilder<> builder(callInst);
631629
Value* allocaV = builder.CreateAlloca(arg->getType());
632630
builder.CreateStore(callInst->getOperand(opNum), allocaV);
633631
callArgs.push_back(allocaV);
@@ -646,7 +644,7 @@ void LegalizeFunctionSignatures::FixCallInstruction(Module& M, CallInst* callIns
646644

647645
if (retTypeOption != ReturnOpt::RETURN_DEFAULT || fixArgType)
648646
{
649-
IRBuilder<> builder(callInst);
647+
IGCLLVM::IRBuilder<> builder(callInst);
650648
Value* newCalledValue = nullptr;
651649
FunctionType* newFnTy = nullptr;
652650
if (!calledFunc)

IGC/AdaptorCommon/TypesLegalizationPass.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ AllocaInst* TypesLegalizationPass::CreateAlloca( Instruction *inst ) {
8888
/// @param ptr memory pointer to
8989
/// @param indices set of constant indices to use in GEP
9090
/// @return Value* - GetElementPtrInst* instruction.
91-
Value* TypesLegalizationPass::CreateGEP(IRBuilder<>& builder, Type* Ty, Value* ptr, SmallVector<unsigned, 8>& indices) {
91+
Value* TypesLegalizationPass::CreateGEP(IGCLLVM::IRBuilder<>& builder, Type* Ty, Value* ptr, SmallVector<unsigned, 8>& indices) {
9292
SmallVector< Value*, 8> gepIndices;
9393
gepIndices.reserve(indices.size() + 1);
9494
gepIndices.push_back(builder.getInt32(0));
@@ -108,12 +108,12 @@ void TypesLegalizationPass::ResolvePhiNode( PHINode *phi ) {
108108
{
109109
for(unsigned i = 0; i < phi->getNumOperands(); ++i)
110110
{
111-
IRBuilder<> builder( phi->getIncomingBlock( i )->getTerminator() );
111+
IGCLLVM::IRBuilder<> builder( phi->getIncomingBlock( i )->getTerminator() );
112112
Value* source = phi->getOperand( i );
113113
StoreInst* newStore = builder.CreateStore( source,allocaPtr );
114114
m_StoreInst.push_back( newStore );
115115
}
116-
IRBuilder<> builder( phi );
116+
IGCLLVM::IRBuilder<> builder( phi );
117117
BasicBlock *block = builder.GetInsertBlock();
118118
builder.SetInsertPoint( &(*block->getFirstInsertionPt()) );
119119
Value* newLoad = builder.CreateLoad(allocaPtr->getAllocatedType(), allocaPtr);
@@ -202,7 +202,7 @@ TypesLegalizationPass::ResolveValue( Instruction *ip,Value *val,SmallVector<unsi
202202
}
203203
else if(LoadInst* ld = dyn_cast<LoadInst>(val))
204204
{
205-
IRBuilder<> builder( ld );
205+
IGCLLVM::IRBuilder<> builder( ld );
206206
Value* gep = CreateGEP( builder, ld->getType(), ld->getOperand( 0 ),indices );
207207
auto alignment = IGCLLVM::getAlignmentValue(ld);
208208
unsigned pointerTypeSize = ld->getType()->getScalarSizeInBits() / 8;
@@ -344,7 +344,7 @@ void TypesLegalizationPass::ResolveStoreInst(
344344
Value *val =
345345
ResolveValue( storeInst,storeInst->getOperand( 0 ),indices );
346346
if (val) {
347-
IRBuilder<> builder(storeInst);
347+
IGCLLVM::IRBuilder<> builder(storeInst);
348348
bool isPackedStruct = false;
349349

350350
if (StructType* st = dyn_cast<StructType>(storeInst->getValueOperand()->getType()))

IGC/AdaptorCommon/TypesLegalizationPass.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ class TypesLegalizationPass: public llvm::FunctionPass,public llvm::InstVisitor<
4040
void ResolveStoreInst( llvm::StoreInst *st, llvm::Type *ty,llvm::SmallVector<unsigned, 8> &index );
4141
bool CheckNullArray(llvm::Instruction* storeInst);
4242
llvm::Value* ResolveValue( llvm::Instruction *st,llvm::Value* arg,llvm::SmallVector<unsigned,8> &index );
43-
llvm::Value* CreateGEP(llvm::IRBuilder<>& builder, llvm::Type* Ty, llvm::Value* ptr, llvm::SmallVector<unsigned, 8>& indices);
44-
llvm::Value* CreateGEP(llvm::IRBuilder<>& builder, llvm::Value* ptr, llvm::SmallVector<unsigned, 8>& indices);
43+
llvm::Value* CreateGEP(IGCLLVM::IRBuilder<>& builder, llvm::Type* Ty, llvm::Value* ptr, llvm::SmallVector<unsigned, 8>& indices);
44+
llvm::Value* CreateGEP(IGCLLVM::IRBuilder<>& builder, llvm::Value* ptr, llvm::SmallVector<unsigned, 8>& indices);
4545
llvm::AllocaInst* CreateAlloca( llvm::Instruction *phi );
4646

4747
static char ID;

IGC/AdaptorOCL/LowerInvokeSIMD.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void LowerInvokeSIMD::fixUniformParamsAndSIMDSize(
187187
}
188188

189189
bool LowerInvokeSIMD::runOnModule(Module &M) {
190-
IRBuilder<> builder(M.getContext());
190+
IGCLLVM::IRBuilder<> builder(M.getContext());
191191
m_Builder = &builder;
192192
m_changed = false;
193193
m_OldFuncToNewFuncMap.clear();

IGC/AdaptorOCL/LowerInvokeSIMD.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace IGC
4545
void visitCallInst(llvm::CallInst& CI);
4646

4747
private:
48-
llvm::IRBuilder<>* m_Builder = nullptr;
48+
IGCLLVM::IRBuilder<>* m_Builder = nullptr;
4949
llvm::ValueMap<llvm::Function*, llvm::Function*> m_OldFuncToNewFuncMap;
5050
bool m_changed = false;
5151

IGC/AdaptorOCL/preprocess_spvir/HandleSPIRVDecorations/HandleSpirvDecorationMetadata.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ void HandleSpirvDecorationMetadata::handleCacheControlINTELForPrefetch(llvm::Cal
383383
args.push_back(ConstantInt::get(Type::getInt32Ty(I.getContext()), IGCLLVM::getNonOpaquePtrEltTy(PTy)->getPrimitiveSizeInBits() / 8));
384384

385385
// OpenCL prefetch overloads num_elements to either i32 or i64. Convert to i32.
386-
IRBuilder<> builder(&I);
386+
IGCLLVM::IRBuilder<> builder(&I);
387387
args.push_back(builder.CreateZExtOrTrunc(I.getArgOperand(1), Type::getInt32Ty(I.getContext())));
388388

389389
auto config = supportedLoadConfigs.find(static_cast<LSC_L1_L3_CC>(cacheControl.value));

IGC/Compiler/CISACodeGen/CallMergerPass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void mergeCalls(Function* F, CallInst *call1, CallInst *call2) {
7676
auto* successorBB = parentBB1->getSingleSuccessor();
7777

7878
auto* newBB = llvm::BasicBlock::Create(F->getContext(), "mergedCallsBB", F, successorBB);
79-
IRBuilder<> Builder(newBB);
79+
llvm::IRBuilder<> Builder(newBB);
8080

8181
IGC_ASSERT(call1->arg_size() == call2->arg_size());
8282

IGC/Compiler/CISACodeGen/DebugInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ bool CatchAllLineNumber::runOnFunction(llvm::Function& F)
534534
!F.hasFnAttribute("visaStackCall"))
535535
return false;
536536

537-
IRBuilder<> Builder(F.getParent()->getContext());
537+
llvm::IRBuilder<> Builder(F.getParent()->getContext());
538538
DIBuilder di(*F.getParent());
539539
Function* lineNumPlaceholder = GenISAIntrinsic::getDeclaration(F.getParent(), GenISAIntrinsic::ID::GenISA_CatchAllDebugLine);
540540
auto intCall = Builder.CreateCall(lineNumPlaceholder);

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ bool EmitPass::runOnFunction(llvm::Function& F)
989989
// 26GRFs then doing a stackcall will overwrite the payload registers.
990990
const int visaStackCallArgRegStart = 26;
991991
const int64_t maxGRFOffset = visaStackCallArgRegStart * m_currShader->getGRFSize();
992-
IRBuilder<> builder(&*F.getEntryBlock().getFirstInsertionPt());
992+
llvm::IRBuilder<> builder(&*F.getEntryBlock().getFirstInsertionPt());
993993
for (auto& arg : F.args())
994994
{
995995
// Skip unused arguments

IGC/Compiler/CISACodeGen/LdShrink.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ bool LdShrink::runOnFunction(Function& F) {
127127
if (Length != 1)
128128
continue;
129129

130-
IRBuilder<> Builder(LI);
130+
IGCLLVM::IRBuilder<> Builder(LI);
131131

132132
// Shrink it to scalar load.
133133
auto Ptr = LI->getPointerOperand();

IGC/Compiler/CISACodeGen/LowerGEPForPrivMem.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ llvm::AllocaInst* LowerGEPForPrivMem::createVectorForAlloca(
131131
llvm::Type* pBaseType)
132132
{
133133
IGC_ASSERT(pAlloca != nullptr);
134-
IRBuilder<> IRB(pAlloca);
134+
IGCLLVM::IRBuilder<> IRB(pAlloca);
135135
AllocaInst* pAllocaValue = nullptr;
136136
if (IsVariableSizeAlloca(*pAlloca)) {
137137
pAllocaValue = IRB.CreateAlloca(pBaseType, pAlloca->getArraySize());
@@ -1004,7 +1004,7 @@ void TransposeHelper::handleGEPInstNew(
10041004
static Value* loadEltsFromVecAlloca(
10051005
unsigned N, AllocaInst* pVecAlloca,
10061006
Value* pScalarizedIdx,
1007-
IRBuilder<>& IRB,
1007+
IGCLLVM::IRBuilder<>& IRB,
10081008
Type* scalarType)
10091009
{
10101010
Value* pLoadVecAlloca = IRB.CreateLoad(pVecAlloca->getAllocatedType(), pVecAlloca);
@@ -1043,7 +1043,7 @@ void TransposeHelperPromote::handleLoadInst(
10431043
{
10441044
IGC_ASSERT(nullptr != pLoad);
10451045
IGC_ASSERT(pLoad->isSimple());
1046-
IRBuilder<> IRB(pLoad);
1046+
IGCLLVM::IRBuilder<> IRB(pLoad);
10471047
IGC_ASSERT(nullptr != pLoad->getType());
10481048
unsigned N = pLoad->getType()->isVectorTy()
10491049
? (unsigned)cast<IGCLLVM::FixedVectorType>(pLoad->getType())->getNumElements()
@@ -1061,7 +1061,7 @@ void TransposeHelperPromote::handleStoreInst(
10611061
IGC_ASSERT(nullptr != pStore);
10621062
IGC_ASSERT(pStore->isSimple());
10631063

1064-
IRBuilder<> IRB(pStore);
1064+
IGCLLVM::IRBuilder<> IRB(pStore);
10651065
llvm::Value* pStoreVal = pStore->getValueOperand();
10661066
llvm::Value* pLoadVecAlloca = IRB.CreateLoad(pVecAlloca->getAllocatedType(), pVecAlloca);
10671067
llvm::Value* pIns = pLoadVecAlloca;

IGC/Compiler/CISACodeGen/MemOpt.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,11 @@ namespace {
130130
llvm::DenseMap<Instruction*, unsigned> &depthTracking);
131131

132132
void removeVectorBlockRead(Instruction* BlockReadToOptimize, Instruction* BlockReadToRemove,
133-
Value* SgId, IRBuilder<>& Builder, unsigned& sg_size);
133+
Value* SgId, llvm::IRBuilder<>& Builder, unsigned& sg_size);
134134
void removeScalarBlockRead(Instruction* BlockReadToOptimize, Instruction* BlockReadToRemove,
135-
Value* SgId, IRBuilder<>& Builder);
135+
Value* SgId, llvm::IRBuilder<>& Builder);
136136
Value* getShuffle(Value* ShflId, Instruction* BlockReadToOptimize,
137-
Value* SgId, IRBuilder<>& Builder, unsigned& ToOptSize);
137+
Value* SgId, llvm::IRBuilder<>& Builder, unsigned& ToOptSize);
138138

139139
unsigned getNumElements(Type* Ty) const {
140140
return Ty->isVectorTy() ? (unsigned)cast<IGCLLVM::FixedVectorType>(Ty)->getNumElements() : 1;
@@ -718,7 +718,7 @@ bool MemOpt::removeRedBlockRead(GenIntrinsicInst* LeadingBlockRead,
718718
//Removes redundant blockread if both blockreads are scalar.
719719
void MemOpt::removeScalarBlockRead(Instruction* BlockReadToOptimize,
720720
Instruction* BlockReadToRemove, Value* SgId,
721-
IRBuilder<>& Builder)
721+
llvm::IRBuilder<>& Builder)
722722
{
723723
Type* BlockReadToOptType = BlockReadToOptimize->getType();
724724
unsigned ToOptSize = (unsigned)(BlockReadToOptType->getPrimitiveSizeInBits());
@@ -739,7 +739,7 @@ void MemOpt::removeScalarBlockRead(Instruction* BlockReadToOptimize,
739739
//Removes redundant blockreads if one of the pair is a vector blockread.
740740
void MemOpt::removeVectorBlockRead(Instruction* BlockReadToOptimize,
741741
Instruction* BlockReadToRemove, Value* SgId,
742-
IRBuilder<>& Builder, unsigned& sg_size)
742+
llvm::IRBuilder<>& Builder, unsigned& sg_size)
743743
{
744744
Type* BlockReadToOptType = BlockReadToOptimize->getType();
745745
Type* BlockReadToRemoveType = BlockReadToRemove->getType();
@@ -904,7 +904,7 @@ void MemOpt::removeVectorBlockRead(Instruction* BlockReadToOptimize,
904904
//or it returns value which is concatenation of two shuffle instructions.
905905
Value* MemOpt::getShuffle(Value* ShflId,
906906
Instruction* BlockReadToOptimize,
907-
Value* SgId, IRBuilder<>&Builder,
907+
Value* SgId, llvm::IRBuilder<>&Builder,
908908
unsigned& ToOptSize)
909909
{
910910
Value* shuffle = nullptr;
@@ -1297,7 +1297,7 @@ bool MemOpt::mergeLoad(LoadInst* LeadingLoad,
12971297
if (s < 2)
12981298
return false;
12991299

1300-
IRBuilder<> Builder(LeadingLoad);
1300+
IGCLLVM::IRBuilder<> Builder(LeadingLoad);
13011301

13021302
// Start to merge loads.
13031303
IGC_ASSERT_MESSAGE(1 < NumElts, "It's expected to merge into at least 2-element vector!");
@@ -1645,7 +1645,7 @@ bool MemOpt::mergeStore(StoreInst* LeadingStore,
16451645

16461646
// Tailing store is always the last one in the program order.
16471647
StoreInst* TailingStore = std::get<0>(StoresToMerge.back());
1648-
IRBuilder<> Builder(TailingStore);
1648+
IGCLLVM::IRBuilder<> Builder(TailingStore);
16491649

16501650
// Start to merge stores.
16511651
NumElts = 0;

IGC/Compiler/CISACodeGen/RuntimeValueLegalizationPass.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ bool RuntimeValueLegalizationPass::runOnModule(llvm::Module& module)
308308
// Check if RuntimeValue needs adjustment
309309
if ((resolvedOffset != regionOffset) || (resolvedSize != regionSize))
310310
{
311-
IRBuilder<> builder(callToResolve);
311+
llvm::IRBuilder<> builder(callToResolve);
312312

313313
llvm::Type* resolvedBaseType = fixedVectorTy ? fixedVectorTy->getElementType() : callToResolve->getType();
314314
IGC_ASSERT(regionSize > 1);

IGC/Compiler/CISACodeGen/ScalarizerCodeGen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ScalarizerCodeGen::ScalarizerCodeGen() : FunctionPass(ID)
3434

3535
bool ScalarizerCodeGen::runOnFunction(Function& F)
3636
{
37-
IRBuilder<> builder(F.getContext());
37+
llvm::IRBuilder<> builder(F.getContext());
3838
m_builder = &builder;
3939

4040
visit(F);

0 commit comments

Comments
 (0)