[PATCH] D135915: [ConstraintElim] Enable pass by default.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 12:25:08 PDT 2022


fhahn added a comment.

Thanks for taking a look! I'll probably be out of office for some or most of the next few weeks, so I'll definitely hold off with landing this until then. I am also keeping an eye out for more motivating uses cases that are not handled at the moment.



================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1647
+  if (EnableConstraintElimination)
+    FPM.addPass(ConstraintEliminationPass());
+
----------------
xbolva00 wrote:
> nikic wrote:
> > Land this change separately?
> > 
> > Also, looking at the position of ConstraintElimination in the normal pipeline, did you experiment with different pipeline positions? The current scheduling looks too early to me, it runs directly after SROA/EarlyCSE at the start of the function simplification pipeline. I would expect that running ConstraintElimination at least after the first InstCombine pass would be beneficial, to ensure that IR is in canonical form.
> +1, I think that this position is not ideal, nikic’s suggestion sounds good
The main reason for the current placement is to run before `JumpThreading`/`SimplifyCFG`, which I think removed some opportunities due to branch folding  in earlier versions.

Moving after instcombine results in some small improvements and regressions in the end-to-end tests I have. I'll take another look.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135915



More information about the llvm-commits mailing list