[flang-commits] [flang] [mlir] [MLIR][LLVMIR][DLTI] Add #llvm.target, #llvm.data_layout and TargetAttrInterface (PR #145899)

Renato Golin via flang-commits flang-commits at lists.llvm.org
Mon Jul 21 10:08:00 PDT 2025


rengolin wrote:

> I imagine you want this for caching the TM. But why do you want this? When is it going to be reused? I think we should use it only to import the DL for now.

The DL generator is one of the users, not the only one. The cost model will be making a lot of enquires about the target over the life of the compiler passes, so this cache is necessary to avoid constructing it for every invocation. A storage class should do the trick, but may need some massaging at this level.



https://github.com/llvm/llvm-project/pull/145899


More information about the flang-commits mailing list