[PATCH] D111095: [fir] Add cfg conversion pass

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 4 13:05:12 PDT 2021


mehdi_amini added inline comments.


================
Comment at: flang/lib/Optimizer/Transforms/RewriteLoop.cpp:29
+    llvm::cl::desc("force the body of a loop to execute at least once"),
+    llvm::cl::init(false));
+
----------------
Please replace these with pass options.


================
Comment at: flang/lib/Optimizer/Transforms/RewriteLoop.cpp:296
+    if (disableCfgConversion)
+      return;
+
----------------
This actually really seems like this option does not belong here: if someone wants to disable cfg-conversion in the compiler, then the proper plumbing is to have this option on the pass manager **builder** so that the pass does not get added to the pipeline.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111095/new/

https://reviews.llvm.org/D111095



More information about the llvm-commits mailing list