[PATCH] D97722: [NewPM] Revamp pass names

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 1 23:21:17 PST 2021


ychen added a comment.

Thanks for doing this. I'm in favor of the patch to let pass explicitly specifying its own name. Previously we encountered many issues due to this restriction (one host-compiler-dependent name, one user-facing name, and translating between them). With that,

- We have one name for both user-facing options and LLVM internally, the translation table is also dropped.
- PassManager related tests don't need to be host-compiler-dependent anymore (PR48992 may be related to this and several regressions in the past).
- Passes like `NoOpModulePass` are already doing this to work around test case issues. Now they are no longer special.

I don't see any cons with this approach other than it touches *a lot* of files. Guess that's the price we need to pay.



================
Comment at: llvm/lib/Passes/PassBuilder.cpp:340
 
 // The following passes/analyses have custom names, otherwise their name will
 // include `(anonymous namespace)`. These are special since they are only for
----------------
Delete.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97722



More information about the llvm-commits mailing list