[PATCH] D95789: [SpeculateAroundPHIs] Avoid speculation on loop back edges
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 4 03:55:54 PDT 2021
bjope added a comment.
In D95789#2609897 <https://reviews.llvm.org/D95789#2609897>, @lebedev.ri wrote:
> I will need to take another look, but i also have seen significant perf regressions due to SpeculateAroundPHIs.
> I think a better/less controversial fix would be to move SpeculateAroundPHIs to the end of IR portion of codegen pipeline,
> after last extension point.
Moving the pass still doesn't solve the problem that the loop metadata can be messed up (I think that having stale loop metadata on the wrong branch is bad, a couple of transformations later it might end up being on a latch belonging to a totally different loop).
That could ofcourse also be solved by another patch.
I think it was pretty annoying that the switch of pass manager introduce these problems as a side effect. And the idea here is simply to avoid the bugs/regressions seen.
Then someone could try to optimize these patterns again (hopefully in a correct way), or move things around in the pipeline etc.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95789/new/
https://reviews.llvm.org/D95789
More information about the llvm-commits
mailing list