[PATCH] D12979: Avoid inlining in exception handling context
Jun Bum Lim via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 22:39:59 PDT 2015
junbuml marked 3 inline comments as done.
================
Comment at: lib/Transforms/IPO/PruneEH.cpp:362
@@ +361,3 @@
+ // call void @__cxa_throw(i8* %exception, .. )
+ for (User *FnU : FnThrowE->users()) {
+ auto *ThrowCall = dyn_cast<CallInst>(FnU);
----------------
hfinkel wrote:
> Why are you looking for users of __cxa_throw? Can we make the assumption that all user of __cxa_allocate_exception are essentially cold, and just look for the users of return values of that function?
>
I'm trying to find all actual calls for __cxa_throw() by looking at the users of FnThrowE where an exception is thrown.
Here, I specifically check the exception allocated to be thrown (__cxa_throw()) in throw statement, which should be cold unless the program logic highly rely on throw statement.
When a exception handling class is created in throw statement,
the constructor must take the exception used in __cxa_throw() as its first parameter.
Please correct me if I miss something.
http://reviews.llvm.org/D12979
More information about the llvm-commits
mailing list