Open seldridge opened 1 year ago
I would expect to see the original #loc5 (:6:12) to be merged with #loc3, but it instead is dropped. This may be an MLIR limitation.
Looks like you're right, CSE will not fuse locations, but will keep the location of the replaced op if the original does not have a location ("unknown"):
I've noticed that CSE doesn't seem to merge source locators. E.g., in the following, the source locator on the second
add
gets dropped:Running with
circt-translate -import-firrtl cse.fir | circt-opt -cse -mlir-print-debuginfo -mlir-print-ir-after-all -mlir-print-ir-before-all
produces:I would expect to see the original
#loc5
(:6:12
) to be merged with#loc3
, but it instead is dropped. This may be an MLIR limitation.