[PATCH] D91800: [PassManager] Run Induction Variable Simplification pass *after* Recognize loop idioms pass, not before
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 25 00:08:23 PST 2020
lebedev.ri updated this revision to Diff 307523.
lebedev.ri edited the summary of this revision.
lebedev.ri added a reviewer: echristo.
lebedev.ri added a comment.
Herald added a subscriber: javed.absar.
In D91800#2408151 <https://reviews.llvm.org/D91800#2408151>, @dmgreen wrote:
> I have certainly seen places where we have managed to recognize a loop as a memcpy/memset, but not remove the remaining now empty loop. Here is some more fuel for your fire if you need it: https://godbolt.org/z/eW4rsY
Thank you for the yet another motivational example, test added!
In D91800#2415347 <https://reviews.llvm.org/D91800#2415347>, @mkazantsev wrote:
> The change looks very reasonable, though I don't know what motivation was behind the current ordering. There might have been some (arcane) reasons behind it. Fine by me, but please have someone else to take a look.
Yep. LoopIdiom runs on two types of loops: countable ones, and uncountable ones.
For uncountable ones, IndVars obviously didn't make any change to them, since they are uncountable, so for them the order should be irrelevant.
For countable ones, well, they should have been countable before IndVars for IndVars to make any change to them,
and since SCEV is used on them, it shouldn't matter if IndVars have already canonicalized them.
So i don't really see why we'd want the current ordering.
With that, does anyone feel confident accepting? :)
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 18480 bytes
Desc: not available
More information about the llvm-commits