[PATCH] D110057: [LoopFlatten] Move it to a LoopPassManager

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 08:12:57 PDT 2021


nikic added a comment.

In D110057#3010889 <https://reviews.llvm.org/D110057#3010889>, @asbirlea wrote:

> In D109958 <https://reviews.llvm.org/D109958> I missed the fact that LoopFlatten does not preserve any analyses. This is, I assume, the reason it was not added alongside other Loop passes before and probably also why I'm seeing a crash when adding it as part of LPM2.
> The pass should not misbehave on its own in a LoopPassManager because it's not using the Updater to readd loops for reprocessing, otherwise it would be incorrect alone too.
> So either LoopFlatten needs to be remain in it's own LPM or taught to preserve analyses (LoopInfo, DominatorTree, etc)

Even if LoopFlatten is in its own LPM, doesn't it still break the LPM contract by not preserving analyses? Wouldn't the function to loop pass adaptor still claim the standard analyses are preserved, even though they actually aren't?

I don't understand why this is not already triggering verification failures.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110057/new/

https://reviews.llvm.org/D110057



More information about the llvm-commits mailing list