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

[llvm/unittests] Reset the IsSSA property when using finalizeBundle() #77469

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions llvm/unittests/MI/LiveIntervalTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ static void testHandleMoveIntoNewBundle(MachineFunction &MF, LiveIntervals &LIS,

// Build bundle
finalizeBundle(MBB, I, std::next(ToInstr.getIterator()));
MF.getProperties().reset(MachineFunctionProperties::Property::IsSSA);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test probably shouldn't have had IsSSA in the first place

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsSSA is computed by the MIRParser

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, which is buggy. It tries to guess but I think the MIR parser needs an explicit IsSSA property.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By buggy I mean assume SSA by default runs into these sorts of issues. Tests have a definite SSAness which it gets wrong. You could just as well clear this before finalizeBundle

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @yashssh ran into a similar situation once and was trying to fix the default isSSA property assumed by MIRParser. Wasn't that ever landed?


// Update LiveIntervals
MachineBasicBlock::instr_iterator BundleStart = std::prev(I);
Expand Down
Loading