[PATCH] D121171: [flang] Add ExternalNameConversionPass to flang-new pipeline

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 08:17:32 PST 2022


awarzynski added a comment.

Thanks for working on this, @rovka!

There's one more alternative. `ExternalNameConversionPass` has a rather huge and visible impact on the generated output. It makes sense to have it enabled by default, but you could also add a flag (e.g. `-finternal-mangling` or some other spelling) to disable it. This way:

- you'd only have to update  RUN lines in tests, and
- we'd have a "compatibility" mode for `bbc` and `flang-new`, which IMO would be a good thing for reproducibility.

This would mean an extra `if` statement in `CodeGenAction::BeginSourceFileAction`, but that would still be rather straightforward. And the pass pipeline definitions are bound to become more complex and require refactoring at some point anyway (we've not discussed `-O{0|1|2|3}` yet).

I agree that we should have a dedicated test to verify that this pass is run. Dumping the pass pipeline would be fantastic and perhaps MLIR already supports that? (I haven't checked, but I suspect that it does). A dedicated flag to disable this pass would also make it easy to write a test.

WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121171



More information about the llvm-commits mailing list