You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add location alias parsing support in IR parser and trace processor
Implements comprehensive support for parsing location aliases in TTIR/TTGIR:
Backend changes:
- Add ALIAS_WITH_NAME_PATTERN and ALIAS_SIMPLE_PATTERN regex to match
alias definitions like #loc16 = loc("pid"(#loc2)) and #loc20 = loc(#loc16)
- Update LOC_PATTERN to only match numbered locs (#loc1, #loc2) not bare #loc
- Implement alias resolution logic with cycle detection
- Track definition lines (def_line), alias names (alias_name), and
alias targets (alias_of) for each location
- Propagate alias metadata through trace_processor to frontend
- Add separate mappings for loc definition lines with kind="loc_def"
Testing:
- Add comprehensive unit test test_loc_alias_parsing() covering:
* Bare #loc references (e.g., #loc13 = loc("x_ptr"(#loc)))
* Named aliases with numbered refs (e.g., #loc16 = loc("pid"(#loc2)))
* Simple aliases without names (e.g., #loc20 = loc(#loc1))
* Definition line tracking for all loc types
This enables the frontend to display alias information and highlight
loc definition lines in the code viewer.
0 commit comments