diff options
author | Tom Eccles <tom.eccles@arm.com> | 2023-05-22 12:55:10 +0000 |
---|---|---|
committer | Tom Eccles <tom.eccles@arm.com> | 2023-06-01 19:29:16 +0000 |
commit | 39ecf9d8a1533a434bb9544a1bc275c4d02e2efb (patch) | |
tree | 444564aeb8bf95809c66b98ee08bb2535c7a423a /flang/lib/FrontendTool | |
parent | 01ef213b855da7a0e0ac7206d27c71f2f5345ca7 (diff) | |
download | llvm-39ecf9d8a1533a434bb9544a1bc275c4d02e2efb.zip llvm-39ecf9d8a1533a434bb9544a1bc275c4d02e2efb.tar.gz llvm-39ecf9d8a1533a434bb9544a1bc275c4d02e2efb.tar.bz2 |
[flang][hlfir] Separate -emit-fir and -emit-hlfir for flang-new
In review for https://reviews.llvm.org/D146278, @vzakhari asked to
separate -emit-fir and -emit-hlfir. This will allow FIR to be easily
outputted after the HLFIR passes have been run.
The new semantics are as follows:
| Action | -flang-experimental-hlfir? | Result |
| =========== | ========================== | =============================== |
| -emit-hlfir | N | Outputs HLFIR |
| -emit-hlfir | Y | Outputs HLFIR |
| -emit-fir | N | Outputs FIR, using old lowering |
| -emit-fir | Y | Outputs FIR, lowering via HLFIR |
A patch for bbc will follow.
Differential Revision: https://reviews.llvm.org/D151088
Diffstat (limited to 'flang/lib/FrontendTool')
-rw-r--r-- | flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp index b99d2b7..df7876f 100644 --- a/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp +++ b/flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp @@ -40,8 +40,10 @@ createFrontendAction(CompilerInstance &ci) { return std::make_unique<PrintPreprocessedAction>(); case ParseSyntaxOnly: return std::make_unique<ParseSyntaxOnlyAction>(); - case EmitMLIR: - return std::make_unique<EmitMLIRAction>(); + case EmitFIR: + return std::make_unique<EmitFIRAction>(); + case EmitHLFIR: + return std::make_unique<EmitHLFIRAction>(); case EmitLLVM: return std::make_unique<EmitLLVMAction>(); case EmitLLVMBitcode: |