[PATCH] D39137: Add CallSiteSplitting pass
Jun Bum Lim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 31 09:45:14 PDT 2017
junbuml added inline comments.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:410
+
+ if (!splitCallSite(CS, PredBB1, PredBB2, CallInst1, CallInst2)) {
+ if (CallInst1)
----------------
davidxl wrote:
> It seems better to not to speculatively clone the call instructions and delete them later when not needed. The analysis function should instead return 'clone' records indicating how to do the cloning during the transformation phase.
Added canSplitCallSite() and checked if the call-site can be split first. So, we do not speculatively clone call instructions. The new call-sites cloned should be split in splitCallSite() without any trouble when splitting preds (added assert for this). Now, I changed splitCallSite() to return void.
https://reviews.llvm.org/D39137
More information about the llvm-commits
mailing list