This allows for extracting assembly information when printing an attribute
or type, such as the dialect resources referenced. This functionality is used in
a followup that adds resource support to the bytecode. This change also results
in a nice cleanup of AsmPrinter now that we don't need to awkwardly workaround
optional AsmStates.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Would this also allow be propagated down to custom printers that want to access AsmState/OpPrintingFlags?
Comment Actions
Drive by warning. If this patch is depending on a non-landed commit, this comment might be wrong. It looks like one python binding test case will fail with this patch:
Exit Code: 2 Command Output (stderr): -- <mlir_parser_buffer>:1:1: error: expected non-function type BAD_TYPE_DOES_NOT_EXIST ^ error: vector elements must be int/index/float type but got 'none' error: invalid tensor element type: 'none' error: invalid tensor element type: 'none' ... ******************** Failed Tests (1): MLIR :: python/ir/builtin_types.py
This is only tested with cmake ... -DMLIR_ENABLE_BINDINGS_PYTHON=On and has dependencies on python -m pip install -r mlir/python/requirements.txt
Comment Actions
Yeah, it should make it a bit easier to propagate stuff along.
Thanks for this, fixed.