Location on BB argument

There are various fixme’s related to BlockArgument not carrying a location like an operation does. Does anyone object to adding a location?

2 Likes

This would be great to have! (On a side note, here is an early issue opened on that right after MLIR was open-sourced: https://github.com/tensorflow/mlir/issues/48) I think this support makes things complete in the sense that every Value will then have a location to identify with.

Ok, here’s an implementation:
https://reviews.llvm.org/D102567

Missed this while OOO, but I’m +1 in general.

– River

This patch landed - the “addArgument” methods on Block and the createBlock() methods in the Builder’s now take optional locations. getLoc() and setLoc() and Value now do the right thing as well.

Thanks to Mehdi and River for the reviews!