[Mlir-commits] [mlir] [mlir][llvm] adds an attribute for the module level assembly (PR #151318)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Jul 30 06:54:55 PDT 2025


gitoleg wrote:

@gysit 
well, to be precise there may be many file scope assembly strings - and in LLVM IR - I mean in the codegen -  they just concatenated, see [codegen](https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CodeGenModule.cpp#L7384)
and the [module](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/IR/Module.h#L336) itself. 

So my initial intention was to let user to collect all the strings as necessary, but looks like you're right - there should be at least an array of string attributes. 

Speaking about a special operation - it definitely may be an option. But from my understanding operation should represent something that may change while attributes stands for something constant. 

But surely it's up to you - what do you prefer?  An `ArrayAttr` or an operation ?






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


More information about the Mlir-commits mailing list