HomePhabricator

[HotColdSplitting] Refine definition of unlikelyExecuted

Authored by vsk on Dec 7 2018, 12:24 PM.

Description

[HotColdSplitting] Refine definition of unlikelyExecuted

The splitting pass uses its 'unlikelyExecuted' predicate to statically
decide which blocks are cold.

  • Do not treat noreturn calls as if they are cold unless they are actually marked cold. This is motivated by functions like exit() and longjmp(), which are not beneficial to outline.
  • Do not treat inline asm as an outlining barrier. In practice asm("") is frequently used to inhibit basic block merging; enabling outlining in this case results in substantial memory savings.
  • Treat invokes of cold functions as cold.

As a drive-by, remove the 'exceptionHandlingFunctions' predicate, because it's
no longer needed. The pass can identify & outline blocks dominated by EH pads,
so there's no need to special-case __cxa_begin_catch etc.

Differential Revision: https://reviews.llvm.org/D54244

llvm-svn: 348640

Details

Committed
vskDec 7 2018, 12:24 PM
Differential Revision
D54244: [HotColdSplitting] Refine definition of unlikelyExecuted
Parents
rG03aaa3e2aa37: [HotColdSplitting] Outline more than once per function
Branches
Unknown
Tags
Unknown