Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions lib/SPIRV/SPIRVReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,23 +249,6 @@ translateSEVMetadata(SPIRVValue *BV, llvm::LLVMContext &Context) {
return RetAttr;
}

IntrinsicInst *SPIRVToLLVM::getLifetimeStartIntrinsic(Instruction *I) {
auto *II = dyn_cast<IntrinsicInst>(I);
if (II && II->getIntrinsicID() == Intrinsic::lifetime_start)
return II;
// Bitcast might be inserted during translation of OpLifetimeStart
auto *BC = dyn_cast<BitCastInst>(I);
if (BC) {
for (const auto &U : BC->users()) {
II = dyn_cast<IntrinsicInst>(U);
if (II && II->getIntrinsicID() == Intrinsic::lifetime_start)
return II;
;
}
}
return nullptr;
}

SPIRVErrorLog &SPIRVToLLVM::getErrorLog() { return BM->getErrorLog(); }

void SPIRVToLLVM::setCallingConv(CallInst *Call) {
Expand Down Expand Up @@ -1884,9 +1867,6 @@ Value *SPIRVToLLVM::transValueWithoutDecoration(SPIRVValue *BV, Function *F,
IRBuilder<> Builder(BB);
auto *Var = transValue(LTStop->getObject(), F, BB);
Var = Var->stripPointerCasts();
for (const auto &I : Var->users())
if (auto *II = getLifetimeStartIntrinsic(dyn_cast<Instruction>(I)))
return mapValue(BV, Builder.CreateLifetimeEnd(II->getOperand(0)));
return mapValue(BV, Builder.CreateLifetimeEnd(Var));
}

Expand Down