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

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 20 09:42:19 PDT 2021


SjoerdMeijer added a comment.

In D110057#3009645 <https://reviews.llvm.org/D110057#3009645>, @dmgreen wrote:

> My understanding was that the LoopFlattening was where it was in the pipeline because that gave better results than putting it elsewhere. Any ideas why?

I haven't moved LoopFlattening around in the past, and can't recall we have experimented with that much. Perhaps someone else did.... So I can't answer why, but I am also not sure much thought has gone into it in the pass. When it was function pass, my guess was this was a reasonable place where it was doing its job. My intention is to make it LoopNestPass, and have only moved it a bit to add it to the LPM2. I thought important was that Invar-simplify and simplify-cfg runs before LoopFlatten, which is still the case. I did check the benchmark that we care about, and actually saw a small improvement. No idea why, but it was confirmation enough that this move seems reasonable.


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

https://reviews.llvm.org/D110057



More information about the llvm-commits mailing list