[PATCH] D22792: VecClone Pass

Matt via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 16:09:13 PST 2018


mmasten added inline comments.


================
Comment at: lib/Transforms/Utils/VecClone.cpp:86
+///   }
+///   return vec_ret;
+/// }
----------------
hfinkel wrote:
> What cleans up the extra loads/stores here (if we're optimizing)? Are assuming that there's a run of SROA afterwards, or does InstCombine do a good job here, or something else?
InstCombine will do it. I also know that EarlyCSE will work.


================
Comment at: lib/Transforms/Utils/VecClone.cpp:418
+
+BasicBlock *VecClone::splitLoopIntoReturn(Function *Clone,
+                                          BasicBlock *LoopBlock) {
----------------
hfinkel wrote:
> What happens if there's more than one return in the function? You might want, in that case, to create a new block with the return and convert all other returns to branches to that block.
In all the test cases that I have used to this point, this type of re-wiring has already been done. Granted, I have mainly been testing some very simple multiple return functions, but if you have a test case where this happens it will be helpful. Thanks.


https://reviews.llvm.org/D22792





More information about the llvm-commits mailing list