mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Cleanup PPCInstrInfo::DefinesPredicate
Implement suggestions made by Bill Schmidt in post-commit review. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d03fdfb97c
commit
4e3172867d
@ -1003,12 +1003,17 @@ bool PPCInstrInfo::DefinesPredicate(MachineInstr *MI,
|
||||
bool Found = false;
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
const MachineOperand &MO = MI->getOperand(i);
|
||||
for (int c = 0; c < 2 && !Found; ++c) {
|
||||
for (unsigned c = 0; c < array_lengthof(RCs) && !Found; ++c) {
|
||||
const TargetRegisterClass *RC = RCs[c];
|
||||
if (MO.isReg()) {
|
||||
if (MO.isDef() && RC->contains(MO.getReg())) {
|
||||
Pred.push_back(MO);
|
||||
Found = true;
|
||||
}
|
||||
} else if (MO.isRegMask()) {
|
||||
for (TargetRegisterClass::iterator I = RC->begin(),
|
||||
IE = RC->end(); I != IE; ++I) {
|
||||
if ((MO.isRegMask() && MO.clobbersPhysReg(*I)) ||
|
||||
(MO.isReg() && MO.isDef() && MO.getReg() == *I)) {
|
||||
IE = RC->end(); I != IE; ++I)
|
||||
if (MO.clobbersPhysReg(*I)) {
|
||||
Pred.push_back(MO);
|
||||
Found = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user