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

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 09:56:29 PST 2018


junbuml added a comment.

Do you have any result for performance and size ?



================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:79
+/// Those instructions need to be duplicated in all split blocks.
+static unsigned DuplicationThreshold = 5;
+
----------------
Why don't we make it a command line option?  It will be good to run a correctness test without being limited in the  current default value. 


================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:307
+  while (I != End) {
+   Instruction *CurrentI = &*I++;
+   if (!CurrentI->use_empty()) {
----------------
CurrentI might point a new PHI created below (line 309)  during the iteration as it iterate reversely. 


================
Comment at: test/Transforms/CallSiteSplitting/callsite-instructions-before-call.ll:104
+; CHECK: call void @bar(i32* %ptrarg, i32 %a3)
+
+
----------------
We need more test to see if PHIs are created properly for cloned instructions used after callsite split.


https://reviews.llvm.org/D41860





More information about the llvm-commits mailing list