[PATCH] D117781: [flang] Update tco tool pipline and add translation to LLVM IR

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 20 08:36:55 PST 2022


mehdi_amini added a comment.

What's the difference between tco and fir-opt? Just that the former can emit LLVM IR instead of LLVM dialect? And that the no-argument invocation will run the lowering pipeline?
For running pipeline, why not involve the `flang` binary? (this is what clang is doing by the way: it can take LLVM IR as input as well and emit LLVM IR, run various optimization pipeline, assembly, object, and handles the usual options you need anyway through frontend options. Between what you'd want to expose through `flang` anyway and what you already have with fir-opt, it's not clear to me the fundamental role tco plays? (I think I remember that it just existed before fir-opt and before there was a flang driver).



================
Comment at: flang/tools/tco/tco.cpp:109
+  } else if (passPipeline.hasAnyOccurrences()) {
+    // FIXME: handle result
+    (void)passPipeline.addToPipeline(pm, [&](const Twine &msg) {
----------------
Why deferring this? Can't you propagate the failure?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117781



More information about the llvm-commits mailing list