summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMatthew Simpson <mssimpso@codeaurora.org>2017-12-20 19:26:37 +0000
committerMatthew Simpson <mssimpso@codeaurora.org>2017-12-20 19:26:37 +0000
commitb198d4ebde51c6fca0a11bf8f8dda90000352016 (patch)
treeeb446dede73f07db8095919c8b41e4484bf92a0c /utils
parent9d97dd42c1db24db46a879e5f3da3eff834f481e (diff)
[ICP] Expose unconditional call promotion interface
This patch modifies the indirect call promotion utilities by exposing and using an unconditional call promotion interface. The unconditional promotion interface (i.e., call promotion without creating an if-then-else) can be used if it's known that an indirect call has only one possible callee. The existing conditional promotion interface uses this unconditional interface to promote an indirect call after it has been versioned and placed within the "then" block. A consequence of unconditional promotion is that the fix-up operations for phi nodes in the normal destination of invoke instructions are changed. This is necessary because the existing implementation assumed that an invoke had been versioned, creating a "merge" block where a return value bitcast could be placed. In the new implementation, the edge between a promoted invoke's parent block and its normal destination is split if needed to add a bitcast for the return value. If the invoke is also versioned, the phi node merging the return value of the promoted and original invoke instructions is placed in the "merge" block. Differential Revision: https://reviews.llvm.org/D40751 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
0 files changed, 0 insertions, 0 deletions