[PATCH] D146278: [flang] add -flang-experimental-hlfir flag to flang-new
Slava Zakharin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 17 10:48:28 PDT 2023
vzakhari added a comment.
Thank you for working on this!
================
Comment at: flang/include/flang/Tools/CLOptions.inc:235
+/// passes pipeline
+inline void createHLFIRToFIRPassPipeline(mlir::PassManager &pm,
+ llvm::OptimizationLevel optLevel = defaultOptLevel) {
----------------
Would you mind also calling this in `bbc` driver?
================
Comment at: flang/include/flang/Tools/CLOptions.inc:251
+ bool stackArrays = false, bool underscoring = true, bool useHLFIR = false) {
+ if (useHLFIR)
+ fir::createHLFIRToFIRPassPipeline(pm, optLevel);
----------------
Is this check and the option really needed? Except for the extra canonicalizer pass the newly added passes will be no-ops, so maybe we should just run them unconditionally.
It may be too much to ask for, but will it make sense not to bundle these passes into `MLIRToLLVM` pipeline and have the possibility to let driver emit post-HLFIR-lowering MLIR (under `-emit-fir`) and pre-HLFIR-lowering (under some new option)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146278/new/
https://reviews.llvm.org/D146278
More information about the cfe-commits
mailing list