[PATCH] D37816: Experimental late jump threading pass
Balaram Makam via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 08:31:11 PDT 2017
bmakam added inline comments.
================
Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1824
// See the comments above FindLoopHeaders for justifications and caveats.
- if (LoopHeaders.count(BB) || LoopHeaders.count(SuccBB)) {
+ if (LoopHeaders.count(BB) || (!IsLate && LoopHeaders.count(SuccBB))) {
DEBUG({
----------------
kparzysz wrote:
> bmakam wrote:
> > Should this be
> > if (!IsLate && (LoopHeaders.count(BB) || LoopHeaders.count(SuccBB))) {
> Jump threading over loop headers was never allowed. You can try it and see what happens, but I'm not sure if it would be a good idea to enable it for all target.
I'm testing with a similar patch and I used this check. Wasn't JT over loop headers never allowed because it would turn the loop into irreducible loop, if that is the case this shouldn't be a concern for LateJumpThreading? However, I admit there is no difference in spec2017/perlbench with this.
Repository:
rL LLVM
https://reviews.llvm.org/D37816
More information about the llvm-commits
mailing list