| Issue |
186277
|
| Summary |
[MLIR] LoopAnnotationAttr should not require FusedLoc for startLoc/endLoc
|
| Labels |
mlir
|
| Assignees |
|
| Reporter |
ayermolo
|
LoopAnnotationAttr hardcodes its startLoc and endLoc parameters as FusedLoc. This forces LoopAnnotationImporter.cpp to include a toFusedLoc shim that dismantles a DILocAttr and re-encodes it as FusedLoc::get({sourceLoc}, scope) just to satisfy the type constraint. This reintroduces the convention-based FusedLoc encoding that DILocAttr was designed to replace.
The startLoc/endLoc parameters should accept a general Location (or at minimum also accept DILocAttr), so that translateLoc-produced locations can be stored directly without an unnecessary re-encoding through FusedLoc. This would also remove the need for the toFusedLoc workaround and align LoopAnnotationAttr with the DILocAttr direction taken everywhere else.
Followup for: https://github.com/llvm/llvm-project/pull/186146
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs