[PATCH] D12979: Avoid inlining in exception handling context

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 11:37:22 PDT 2015


junbuml updated this revision to Diff 35534.
junbuml marked 3 inline comments as done.
junbuml added a comment.

I agree that using the NoInline attribute will prevent even a trivial constructor from being inlined. Initially, I intended to use Attribute::Cold, but by default, Attribute::Cold doesn't seem to have any impact in inline heuristic because the current ColdThreshold is not tuned yet (r200898).

In my opinion, considering that CallSites in exception handling region is very cold is not unreasonable even without PGO, and avoiding inlining in exception handling region may not have significant impacts on performance unless a program execution logic is really depend on exception handling flows.

For now, I can add FIXME mentioning that Attribute::Cold could be used when the inline cold-threshold is tune. We could continue discussing any other options if using NoInline attribute is to strong to use here.


http://reviews.llvm.org/D12979

Files:
  include/llvm/Analysis/TargetLibraryInfo.def
  include/llvm/IR/CallSite.h
  lib/Transforms/IPO/PruneEH.cpp
  test/Transforms/PruneEH/noinlineattr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12979.35534.patch
Type: text/x-patch
Size: 9096 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150923/929c09a8/attachment.bin>


More information about the llvm-commits mailing list