[PATCH] D158529: [InferAlignment] Implement InferAlignmentPass

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 06:54:15 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Passes/PassBuilderPipelines.cpp:1150
+  if (EnableInferAlignmentPass)
+    FPM.addPass(InferAlignmentPass());
   if (IsFullLTO) {
----------------
danilaml wrote:
> nikic wrote:
> > danilaml wrote:
> > > I was wondering why the pass was added after LoopeVectorize pass and not before? Wouldn't LV benefit from knowing that some pointers are better aligned? Or it doesn't care about this at the moment?
> > LV uses getOrEnforceKnownAlignment(), so it shouldn't matter. Did you see any issues relating to this?
> > 
> > (This is true pretty generally -- the passes that care about alignment will do their own inference.)
> I haven't seen the issues with pass buidler pipeline, no. I just use custom pipeline and got caught a bit off guard by this change, so I'm now in the process of figuring out where to insert this new pass ;P
Okay, in that case the guideline would be to insert it once before and after runtime unrolling, but where exactly probably doesn't matter too much (or at least we haven't found out yet...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158529



More information about the llvm-commits mailing list