[Mlir-commits] [mlir] Fix loop_annotation name in unit tests (PR #172934)

Fei Peng llvmlistbot at llvm.org
Fri Dec 19 15:02:00 PST 2025


fiigii wrote:

Agree. I was also confused by the code above, and intentionally processing LLVM dialect in SCF/CF dialects seems not very reasonable. 

I am not very familiar with MLIR, based on my experience in handling LLVM metadata, we may need a more generic and clearer approach, for example:
- During pure IR conversion like SCF->CF, unconditionally copy all the attributes.
- During transformation or optimizations, retrieve non-discardable attributes by the attribute names, and process (change, preserve, or drop) the attributes according to the transformation semantics. As I understand, "discardable attribute" is similar to LLVM's metadata, which we should keep them as much as possible, but it's also okay if they are lost by accident. 



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


More information about the Mlir-commits mailing list