This is an archive of the discontinued LLVM Phabricator instance.

Experimental late jump threading pass
AbandonedPublic

Authored by kparzysz on Sep 13 2017, 10:08 AM.

Details

Reviewers
None
Summary

It's not invoked anywhere by default.

Diff Detail

Repository
rL LLVM

Event Timeline

kparzysz updated this revision to Diff 115220.Sep 14 2017, 7:39 AM

Reduced code duplication between the legacy (old PM) passes.

bmakam added a subscriber: bmakam.Sep 14 2017, 8:08 AM
bmakam added inline comments.
lib/Transforms/Scalar/JumpThreading.cpp
1824

Should this be
if (!IsLate && (LoopHeaders.count(BB) || LoopHeaders.count(SuccBB))) {

kparzysz added inline comments.Sep 14 2017, 8:13 AM
lib/Transforms/Scalar/JumpThreading.cpp
1824

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.

bmakam added inline comments.Sep 14 2017, 8:31 AM
lib/Transforms/Scalar/JumpThreading.cpp
1824

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.

kparzysz added inline comments.Sep 14 2017, 8:36 AM
lib/Transforms/Scalar/JumpThreading.cpp
1824

It could be a problem for the CodeGen passes that use MachineLoopInfo, since some loops would become non-optimizable.

kparzysz abandoned this revision.Mar 31 2018, 11:09 AM