[MIR] Add text spelling 'lr-split' for MachineInstr::LRSplit#1
Closed
qcolombet wants to merge 1 commit into
Closed
[MIR] Add text spelling 'lr-split' for MachineInstr::LRSplit#1qcolombet wants to merge 1 commit into
qcolombet wants to merge 1 commit into
Conversation
The LRSplit MachineInstr flag is set by SplitKit on copies inserted for
live-range splitting, and AMDGPU's SIInstrInfo::canAddToBBProlog uses it
to recognize WWM_COPY / IMPLICIT_DEF instructions as part of the basic
block prologue. Until now the flag had no MIR-text representation, so
MIR-based tests for prologue handling could not set it and had to rely
on running the whole register allocator pipeline.
This change adds 'lr-split' as the MIR spelling, wired through:
- MILexer: new kw_lr_split token, "lr-split" keyword
- MIParser: accepted in the instruction-flag prefix loop, sets
MachineInstr::LRSplit
- MIRPrinter and MachineInstr::print: emit "lr-split" when set, so
MIR YAML output and MI.dump() stay in sync
- update_mir_test_checks.py: 'lr-split' added to MI_FLAGS_STR so
autogenerated CHECK lines tolerate the new token
Round-trip coverage in
llvm/test/CodeGen/MIR/AMDGPU/lr-split-flag.mir.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The LRSplit MachineInstr flag is set by SplitKit on copies inserted for live-range splitting, and AMDGPU's SIInstrInfo::canAddToBBProlog uses it to recognize WWM_COPY / IMPLICIT_DEF instructions as part of the basic block prologue. Until now the flag had no MIR-text representation, so MIR-based tests for prologue handling could not set it and had to rely on running the whole register allocator pipeline.
This change adds 'lr-split' as the MIR spelling, wired through:
Round-trip coverage in
llvm/test/CodeGen/MIR/AMDGPU/lr-split-flag.mir.