Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider capturing more location information #1062

Open
smeenai opened this issue Nov 5, 2024 · 1 comment
Open

Consider capturing more location information #1062

smeenai opened this issue Nov 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@smeenai
Copy link
Collaborator

smeenai commented Nov 5, 2024

As discussed in llvm/llvm-project#113483, if we see a future need for it (e.g. for debug information or diagnostics), we can consider including more information in the mlir::Locations we create, e.g. to capture macro expansion information. We could potentially use an OpaqueLoc attribute for this that includes the original SourceLocation or create our own location attribute that wraps a clang SourceLocation (if we need full serialization/deserialization). There's no action needed here right now, I'm just creating this for tracking.

@bcardosolopes
Copy link
Member

bcardosolopes commented Nov 5, 2024

Using lists of fused locs isn't great indeed (unpacking it will always be a guess game), one example is the IfOp which right now might have a list of 4 locs (to track begin/end for both arms), we kinda infer what's that about. As you rightly pointed out, to do this right we need some layer of abstraction in the likely form of a new attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants