[llvm] [llvm] Move data layout string computation to TargetParser (PR #157612)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 11 09:23:49 PDT 2025
rnk wrote:
I suppose I have to take the point that this isn't going to serve MLIR's needs entirely. In order to that, I think we need to move the information MLIR needs from `LLVM${TGT}CodeGen` to `LLVM${TGT}Info` (`llvm/lib/${TGT}/TargetInfo`) or `LLVM${TGT}Desc` (`llvm/lib/Target/${TGT}/MCTargetDesc`).
My change is actually not really a step in that direction. The main benefit of having the data layout always available in TargetParser for all known LLVM targets is that it reduces code duplication with frontends like clang (I can't remember if Rust also duplicates the data layouts) without complicating their test suites by requiring target registration.
It's hard for me to say how much of the information that MLIR needs should be hidden behind target registration or simply always available. There's a tradeoff between simplicity, abstraction, and extensibility to make on that question.
https://github.com/llvm/llvm-project/pull/157612
More information about the llvm-commits
mailing list