[llvm] [AArch64][GlobalISel] Do not create LIFETIME instructions in functions. (PR #115669)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 12:44:38 PST 2024


================
@@ -2166,7 +2166,8 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
   case Intrinsic::lifetime_start:
   case Intrinsic::lifetime_end: {
     // No stack colouring in O0, discard region information.
-    if (MF->getTarget().getOptLevel() == CodeGenOptLevel::None)
+    if (MF->getTarget().getOptLevel() == CodeGenOptLevel::None ||
+        MF->getFunction().hasOptNone())
----------------
davemgreen wrote:

It looks like DAG goes via OptLevelChanger, which sets the OptLevel and resets it after handling the function. (And forces into using fast-isel, even if we would not usually use it).

https://github.com/llvm/llvm-project/pull/115669


More information about the llvm-commits mailing list