[PATCH] D129576: [GISel] Unify use of getStackGuard()
Kai Nacke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 12 10:42:54 PDT 2022
Kai added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:1636
+ if (!DstReg) {
+ Type *PtrIRTy = Type::getInt8PtrTy(MF->getFunction().getContext());
+ const LLT PtrTy = getLLTForType(*PtrIRTy, *DL);
----------------
arsenm wrote:
> Should use the pointer type / address space from the original IR instruction rather than re-figuring it out
Well, there is no original IR instruction for the call in `emitSPDescriptorParent()`, because the BB containing the check is completely generated in the IRTranslator.
================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2080
case Intrinsic::stackguard:
- getStackGuard(getOrCreateVReg(CI), MIRBuilder);
+ getStackGuard(MIRBuilder, getOrCreateVReg(CI));
return true;
----------------
arsenm wrote:
> I don't see the point in calling getOrCreateVReg here
Agree, I'll change that,
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129576/new/
https://reviews.llvm.org/D129576
More information about the llvm-commits
mailing list