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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to