[PATCH] D15399: MS inline ASM: mark the function noinline if the asm has labels (PR23715)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 9 17:10:16 PST 2015


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks terrible, please commit.


================
Comment at: lib/CodeGen/CGStmt.cpp:2005
@@ -1998,3 +2004,3 @@
                          /* IsAlignStack */ false, AsmDialect);
   llvm::CallInst *Result = Builder.CreateCall(IA, Args);
   Result->addAttribute(llvm::AttributeSet::FunctionIndex,
----------------
If this inline asm has labels, we should also add the noduplicate attribute to the callsite. That will prevent CFG transforms like tail duplication from duplicating it.


http://reviews.llvm.org/D15399





More information about the cfe-commits mailing list