[PATCH] D41860: [CallSiteSplitting] Support splitting of blocks with instrs before call.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 05:41:20 PST 2018


fhahn created this revision.
fhahn added reviewers: junbuml, mcrosier, davidxl, davide.
Herald added subscribers: kristof.beyls, aemerson.

For basic blocks with instructions between the beginning of the block
and a call we have to duplicate the instructions before the call in all
split blocks and add PHI nodes for uses of the duplicated instructions
after the call.

Currently, the threshold for the number of instructions before a call
is quite low, to keep the impact on binary size low.

I will post some AArch64 benchmark numbers soon.

Please note that the position of the PHI nodes changes with this patch, as `DuplicateInstructionsInSplitBetween` places the new block just after PredBB, whereas  `SplitBlockPredecessors` places the new block just before TailBB. This different order seems to trip over jump-threading used in `Transforms/CallSiteSplitting/callsite-split.ll`. That was surprising, I have to check what to do about that. Also, I will wait with updating the blocks in


https://reviews.llvm.org/D41860

Files:
  lib/Transforms/Scalar/CallSiteSplitting.cpp
  test/Transforms/CallSiteSplitting/callsite-no-or-structure.ll
  test/Transforms/CallSiteSplitting/callsite-split-debug.ll
  test/Transforms/CallSiteSplitting/callsite-split.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41860.129066.patch
Type: text/x-patch
Size: 10005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180109/14916c3a/attachment.bin>


More information about the llvm-commits mailing list