[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 18 11:34:45 PDT 2023


================
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
       B.addAttribute(llvm::Attribute::Naked);
 
     // OptimizeNone wins over OptimizeForSize and MinSize.
+    F->removeFnAttr(llvm::Attribute::OptimizeForDebugging);
----------------
dwblaikie wrote:

+1, and otherwise the change makes sense to me. Could you post about this on Discourse, pointing to this pull request - just to make sure folks are aware we're adding a new IR attribute here? Be good to ensure there's consensus. 

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


More information about the cfe-commits mailing list