-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
LiveVariables improperly handles killing aliased registers #1678
Comments
This is causing me much pain. The correct fix, IMO, is to explicit add every single alias register as use / It's unclear though how copy coalescer handles this though. Anyway, it's a |
My brute force fix works well on X86. All of the dejagnu tests are passing as |
This is the patch. Chris, please see if it fixes the problems you run into. I'm |
The patch cleared up the issue I was seeing. |
Great! Evan is working on a version that will be better for compile time and handle more cases. It should |
This is working for me. |
Should this be marked closed as it's working for me, or is it waiting for more testing? |
Yep, evan should close it. He's unruly though, and doesn't like to close bugs ;-) |
I like to leave bugs open to give the impression that I am busy. |
Extended Description
Here is the beginning of the BB dump.
entry (0x8503c80, LLVM BB @0x8501af0, ID#0):
Live Ins: %R0 %R1
%reg1024 = ORI %R0, 0
%reg1025 = ORI %R1, 0
V4R0 is getting killed because handleLiveInRegister() is called on
all results of getAliasSet() for each of the liveins (this is in
LiveIntervals::computeIntervals() ).
handleRegisterDef() does a similar thing where calls
handlePhysicalRegisterDef() on all members of getAliasSet() returned
for the def, which also triggers this problem.
This is a pretty serious bug. LiveVariables::KillsRegister should not kill aliases that are "larger". The
correct way to fix this is to explicitly list registers that are defined, used, and killed. So your example
should look like:
entry (0x8503c80, LLVM BB @0x8501af0, ID#0):
Live Ins: %R0 %R1
%reg1024 = ORI %R0, 0, %V4R0
%reg1025 = ORI %R1, 0, %V4R0<imp-use,kill>
KillsRegister should check for exact match rather than regsOverlap. There are probably other similar
bugs in LiveVariables.
The text was updated successfully, but these errors were encountered: