[PATCH] D129576: [GISel] Unify use of getStackGuard()

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 12 10:26:14 PDT 2022


arsenm 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);
----------------
Should use the pointer type / address space from the original IR instruction rather than re-figuring it out


================
Comment at: llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:2080
   case Intrinsic::stackguard:
-    getStackGuard(getOrCreateVReg(CI), MIRBuilder);
+    getStackGuard(MIRBuilder, getOrCreateVReg(CI));
     return true;
----------------
I don't see the point in calling getOrCreateVReg here


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