[fir] Add external name interop pass
authorValentin Clement <clementval@gmail.com>
Tue, 5 Oct 2021 18:32:43 +0000 (20:32 +0200)
committerValentin Clement <clementval@gmail.com>
Tue, 5 Oct 2021 18:33:41 +0000 (20:33 +0200)
commitfc66dbba1fe0a3120abd98134a1a8aebfede8553
tree980109c2e2a1447cf0d37a38e390fdf42e7e9f0a
parentd9346f525595da11a5a24db3c541efcd95ac3df0
[fir] Add external name interop pass

Add the external name conversion pass needed for compiler
interoperability. This pass convert the Flang internal symbol name to
the common gfortran convention.

Clean up old passes without implementation in the Passes.ts file so
the project and fir-opt can build correctly.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D111057
12 files changed:
flang/include/flang/Optimizer/Support/InternalNames.h
flang/include/flang/Optimizer/Transforms/Passes.h
flang/include/flang/Optimizer/Transforms/Passes.td
flang/lib/Optimizer/Support/InternalNames.cpp
flang/lib/Optimizer/Transforms/CMakeLists.txt
flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp [new file with mode: 0644]
flang/lib/Optimizer/Transforms/PassDetail.h [new file with mode: 0644]
flang/test/Fir/external-mangling-emboxproc.fir [new file with mode: 0644]
flang/test/Fir/external-mangling.fir [new file with mode: 0644]
flang/tools/fir-opt/CMakeLists.txt
flang/tools/fir-opt/fir-opt.cpp
flang/unittests/Optimizer/InternalNamesTest.cpp