Skip to content

Commit 878c2a9

Browse files
fveselovigcbot
authored andcommitted
Removed use of genx_alloca intrinsic
Removed use of deprecated genx_alloca intrinsic from VC
1 parent 21a7e0c commit 878c2a9

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ class GenXKernelBuilder {
536536
bool HasBarrier = false;
537537
bool HasCallable = false;
538538
bool HasStackcalls = false;
539-
bool HasAlloca = false;
540539
bool HasSimdCF = false;
541540
// GRF width in unit of byte
542541
unsigned GrfByteSize = defaultGRFByteSize;
@@ -2957,8 +2956,6 @@ bool GenXKernelBuilder::buildMainInst(Instruction *Inst, BaleInfo BI,
29572956
case GenXIntrinsic::genx_convert_addr:
29582957
buildConvertAddr(CI, BI, Mod, DstDesc);
29592958
break;
2960-
case GenXIntrinsic::genx_alloca:
2961-
break;
29622959
case GenXIntrinsic::genx_gaddr:
29632960
buildSymbolInst(CI, Mod, DstDesc);
29642961
break;
@@ -3329,8 +3326,6 @@ void GenXKernelBuilder::collectKernelInfo() {
33293326
if (IID == GenXIntrinsic::genx_barrier ||
33303327
IID == GenXIntrinsic::genx_sbarrier)
33313328
HasBarrier = true;
3332-
else if (IID == GenXIntrinsic::genx_alloca)
3333-
HasAlloca = true;
33343329
} else {
33353330
Function *Callee = CI->getCalledFunction();
33363331
if (Callee && Callee->hasFnAttribute("CMCallable"))
@@ -5055,15 +5050,6 @@ void GenXKernelBuilder::buildAlloca(CallInst *CI, unsigned IntrinID,
50555050
VISA_VectorOpnd *Imm = nullptr;
50565051
CISA_CALL(Kernel->CreateVISAImmediate(Imm, &OffVal, ISA_TYPE_D));
50575052

5058-
if (IntrinID == llvm::GenXIntrinsic::genx_alloca) {
5059-
VISA_VectorOpnd *Src = nullptr;
5060-
CISA_CALL(Kernel->CreateVISASrcOperand(Src, static_cast<VISA_GenVar *>(Sp),
5061-
MODIFIER_NONE, 0, 1, 0, 0, 0));
5062-
VISA_VectorOpnd *Dst = createDestination(CI, DONTCARESIGNED, Mod, DstDesc);
5063-
appendVISADataMovementInst(ISA_MOV, nullptr, false, vISA_EMASK_M1,
5064-
EXEC_SIZE_1, Dst, Src);
5065-
}
5066-
50675053
VISA_VectorOpnd *DstSp = nullptr;
50685054
CISA_CALL(Kernel->CreateVISADstOperand(DstSp, static_cast<VISA_GenVar *>(Sp),
50695055
1, 0, 0));

IGC/VectorCompiler/lib/GenXCodeGen/GenXConstants.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,6 @@ bool genx::loadNonSimpleConstants(
191191
if (CI)
192192
NumArgs = IGCLLVM::getNumArgOperands(CI);
193193
unsigned IID = vc::getAnyIntrinsicID(Inst);
194-
// Do not proceed loading of genx.alloca argument since its value doesn't
195-
// needed (only type matters) and always null.
196-
if (IID == GenXIntrinsic::genx_alloca)
197-
return Modified;
198194
for (unsigned i = 0; i != NumArgs; ++i) {
199195
if (isa<Constant>(Inst->getOperand(i))) {
200196
Use *U = &Inst->getOperandUse(i);

IGC/VectorCompiler/lib/GenXCodeGen/GenXEmulate.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ static cl::opt<bool>
7373
static cl::opt<bool> OptStricterOword(
7474
"vc-i64emu-strict-report-oword", cl::init(false), cl::Hidden,
7575
cl::desc("strict check will break on 64-bit oword reads/writes"));
76-
static cl::opt<bool> OptStricterAlloc(
77-
"vc-i64emu-strict-report-alloc", cl::init(false), cl::Hidden,
78-
cl::desc("strict check will break on 64-bit alloc"));
7976
static cl::opt<bool>
8077
OptStricterConst("vc-i64emu-strict-const", cl::init(false), cl::Hidden,
8178
cl::desc("strict check will break on 64-bit constanti"));
@@ -1644,8 +1641,6 @@ bool GenXEmulate::Emu64Expander::hasStrictEmulationRequirement(
16441641
case GenXIntrinsic::genx_oword_ld:
16451642
case GenXIntrinsic::genx_oword_ld_unaligned:
16461643
return OptStricterOword;
1647-
case GenXIntrinsic::genx_alloca:
1648-
return OptStricterAlloc;
16491644
}
16501645

16511646
switch (Inst->getOpcode()) {

0 commit comments

Comments
 (0)