[Mlir-commits] [mlir] [mlir] Add normalize pass to MLIR (PR #186647)
Markus Böck
llvmlistbot at llvm.org
Sun Mar 15 10:01:28 PDT 2026
zero9178 wrote:
> > I think this PR and the pass description would likely benefit from describing the goals and intend of this pass. It's not trying to be an optimization pass (so things like undoing LICM seem fine to me) IIRC. Rather it is trying to increase syntactic equivalence of code to reduce diff size while retaining semantic equivalence right?
>
> I see. In that sense, undoing LICM is fine, but assuming unknown ops' region semantics isn't. If an operation overrides the `walk` method and traverse its own regions, does it (have to) know that some pass wants to move operations inside/outside without its knowledge?
>
> Also, in this light, @arun-thmn's pass is specifically for controlling instruction selection, so unlikely to match semantics with this one (ie. ignore that comment).
I am a bit split on this. I suppose it depends on whether an operation defines special semantics for SSA-values that it captures and are defined outside its region from SSA-values that are defined within its region.
I don't think such an interface exists and is a bit of a missing hole.
Under the assumption that an operation cannot define differing semantics for captured vs non-captured, then moving pure operations out of a region is basically always legal.
https://github.com/llvm/llvm-project/pull/186647
More information about the Mlir-commits
mailing list