[PATCH] D12979: Avoid inlining in exception handling context

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 09:16:24 PDT 2015


majnemer added a comment.

Out of curiosity, why not handle this as an inline cost heuristic?  I imagine we'd want to inline **very** trivial constructors.


================
Comment at: lib/Transforms/IPO/PruneEH.cpp:308
@@ +307,3 @@
+
+/// AddNoInlineForEHAllocUsers - Add the NoInlie attribute if CallSites take the
+/// momeory allocated for the exception to be thrown as its first arguement.
----------------
`NoInlie` -> `NoInline`

================
Comment at: lib/Transforms/IPO/PruneEH.cpp:358
@@ +357,3 @@
+  for (User *FnU : FnThrowE->users()) {
+    CallInst *ThrowCall = dyn_cast<CallInst>(FnU);
+    if (!ThrowCall || ThrowCall->isNoBuiltin())
----------------
Likewise, you can use `auto *` here.

================
Comment at: lib/Transforms/IPO/PruneEH.cpp:363
@@ +362,3 @@
+    // allocated by __cxa_allocate_exception().
+    CallInst *EHAllocCall = dyn_cast<CallInst>(ThrowCall->getArgOperand(0));
+    if (!EHAllocCall || EHAllocCall->isNoBuiltin() ||
----------------
And here.


http://reviews.llvm.org/D12979





More information about the llvm-commits mailing list