-
Notifications
You must be signed in to change notification settings - Fork 14.5k
[CodeGen] Remove dead hack for MIPS #148039
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
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-backend-mips @llvm/pr-subscribers-llvm-regalloc Author: AZero13 (AZero13) ChangesAll tests pass without it now. Full diff: https://github.com/llvm/llvm-project/pull/148039.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 1f23418642bc6..e857ff665913a 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -534,10 +534,6 @@ void LiveVariables::runOnInstr(MachineInstr &MI,
UseRegs.push_back(MOReg);
} else {
assert(MO.isDef());
- // FIXME: We should not remove any dead flags. However the MIPS RDDSP
- // instruction needs it at the moment: http://llvm.org/PR27116.
- if (MOReg.isPhysical() && !MRI->isReserved(MOReg))
- MO.setIsDead(false);
DefRegs.push_back(MOReg);
}
}
|
@arsenm Thoughts? |
Are you able to explain why it is no longer needed? The code in MipsSEDAGToDAGISel::processFunctionAfterISel mentioned in http://llvm.org/PR27116 is still present. |
This allows us to remove the hack that requires we remove the dead flag from the physical register.
✅ With the latest revision this PR passed the C/C++ code formatter. |
@@ -1579,6 +1626,10 @@ MipsTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI, | |||
return emitSTR_W(MI, BB); | |||
case Mips::STR_D: | |||
return emitSTR_D(MI, BB); | |||
case Mips::RDDSP_Pseudo: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EmitInstrWithCustomerInsert runs later than processFunctionAfterISel. How does this fix the problem?
All tests pass without it now.