aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorTom Eccles <tom.eccles@arm.com>2023-03-14 13:27:30 +0000
committerTom Eccles <tom.eccles@arm.com>2023-03-22 13:36:54 +0000
commitacf6a3224955779724a35a383d63c48af2163171 (patch)
tree54ae3fe3d1c16d8ee9a440cfbee1e3545c819880 /flang/lib/Frontend/CompilerInvocation.cpp
parent3a3ad9fe1811ebd7ff865b77f471d155d9a05ec8 (diff)
downloadllvm-acf6a3224955779724a35a383d63c48af2163171.zip
llvm-acf6a3224955779724a35a383d63c48af2163171.tar.gz
llvm-acf6a3224955779724a35a383d63c48af2163171.tar.bz2
[flang] add -flang-experimental-hlfir flag to flang-new
This flag instructs flang-new to use the new HLFIR lowering. It is marked as experimental and not included in --help. This was added to make it more convenient to test the performance of code generated by the HLFIR lowering. Extra diffs are from running clang-format on CLOptions.inc (which was being forced by CI). Differential Revision: https://reviews.llvm.org/D146278
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--flang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 6e963e2..a4183a5 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -818,6 +818,11 @@ bool CompilerInvocation::createFromArgs(
success = false;
}
+ // -flang-experimental-hlfir
+ if (args.hasArg(clang::driver::options::OPT_flang_experimental_hlfir)) {
+ res.loweringOpts.setLowerToHighLevelFIR(true);
+ }
+
success &= parseFrontendArgs(res.getFrontendOpts(), args, diags);
parseTargetArgs(res.getTargetOpts(), args);
parsePreprocessorArgs(res.getPreprocessorOpts(), args);