[PATCH] D95400: [flang][fir] Upstream FIR support changes

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 28 12:52:06 PST 2021


schweitz added inline comments.


================
Comment at: flang/lib/Optimizer/Support/FIRContext.cpp:24
+  mod->setAttr(tripleName, fir::OpaqueAttr::get(mod.getContext(), &triple));
+}
+
----------------
mehdi_amini wrote:
> The triple seems fairly fundamental to processing a Module, it isn't clear to me that this can be an OpaqueAttr (i.e. something that should be implicitly dropped freely with no consequence). How do you manage this?
It is definitely important, actually essential, for conversion to LLVM IR.

Prior to that, the IR is abstract enough that it can be reasoned about without knowing the target triple precisely.

The trick here is that the driver of the code gen bridge will supply a triple. Thus, we can keep the IR and the triple loosely coupled.

I know that Alex is looking at solutions to this on the MLIR side. So it could be the case that solution can just be substituted.



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

https://reviews.llvm.org/D95400



More information about the llvm-commits mailing list