mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 01:14:12 +00:00
Only call isUse/isDef on register operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30122 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6cdb1ea610
commit
5d8062bcee
@ -552,7 +552,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
for (unsigned i = 0; i != MI->getNumOperands(); ++i) {
|
||||
MachineOperand& MO = MI->getOperand(i);
|
||||
// here we are looking for only used operands (never def&use)
|
||||
if (!MO.isDef() && MO.isRegister() && MO.getReg() &&
|
||||
if (MO.isRegister() && !MO.isDef() && MO.getReg() &&
|
||||
MRegisterInfo::isVirtualRegister(MO.getReg()))
|
||||
MI = reloadVirtReg(MBB, MI, i);
|
||||
}
|
||||
@ -584,7 +584,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
// are defined, and marking explicit destinations in the PhysRegsUsed map.
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
MachineOperand& MO = MI->getOperand(i);
|
||||
if (MO.isDef() && MO.isRegister() && MO.getReg() &&
|
||||
if (MO.isRegister() && MO.isDef() && MO.getReg() &&
|
||||
MRegisterInfo::isPhysicalRegister(MO.getReg())) {
|
||||
unsigned Reg = MO.getReg();
|
||||
PhysRegsEverUsed[Reg] = true;
|
||||
@ -626,7 +626,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
//
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
MachineOperand& MO = MI->getOperand(i);
|
||||
if (MO.isDef() && MO.isRegister() && MO.getReg() &&
|
||||
if (MO.isRegister() && MO.isDef() && MO.getReg() &&
|
||||
MRegisterInfo::isVirtualRegister(MO.getReg())) {
|
||||
unsigned DestVirtReg = MO.getReg();
|
||||
unsigned DestPhysReg;
|
||||
|
Loading…
Reference in New Issue
Block a user