[PATCH] D86005: [NewPM][LoopFullUnroll] Make LoopFullUnrollPass required

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 14:01:44 PDT 2020


aeubanks added a comment.

Assuming that LoopFullUnrollPass is always required to run on anything with `llvm.loop.unroll.full`, it doesn't make sense to make this part of the optnone pass instrumentation since we'd have to add the check to all the pass instrumentations, not just optnone. e.g. opt-bisect should never skip the pass either. Instead ideally this would be part of `isRequired(Pass&)`, and the pass would be able to look at the IR to determine if the pass is required. Then all 3 passes could check for the metadata.
We could try going down that route. I'm not sure that the extra code is worth the complexity just to handle LoopFullUnrollPass. The only other thing I can think of like this is alwaysinline, but the inliners don't have dependent passes so those can just be marked required.
Or we could just go with the current approach. LoopSimplify/LCSSA don't know if the pipeline has a required pass like LoopFullUnrollPass, so if we go with this approach I think marking them as required is necessary for this approach.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86005



More information about the llvm-commits mailing list