mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
ArrayRef'ize MI::setPhysRegsDeadExcept().
llvm-svn: 149709
This commit is contained in:
parent
17366fbd7e
commit
42c83746fc
@ -19,6 +19,7 @@
|
|||||||
#include "llvm/CodeGen/MachineOperand.h"
|
#include "llvm/CodeGen/MachineOperand.h"
|
||||||
#include "llvm/MC/MCInstrDesc.h"
|
#include "llvm/MC/MCInstrDesc.h"
|
||||||
#include "llvm/Target/TargetOpcodes.h"
|
#include "llvm/Target/TargetOpcodes.h"
|
||||||
|
#include "llvm/ADT/ArrayRef.h"
|
||||||
#include "llvm/ADT/ilist.h"
|
#include "llvm/ADT/ilist.h"
|
||||||
#include "llvm/ADT/ilist_node.h"
|
#include "llvm/ADT/ilist_node.h"
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
@ -791,7 +792,7 @@ public:
|
|||||||
|
|
||||||
/// setPhysRegsDeadExcept - Mark every physreg used by this instruction as
|
/// setPhysRegsDeadExcept - Mark every physreg used by this instruction as
|
||||||
/// dead except those in the UsedRegs list.
|
/// dead except those in the UsedRegs list.
|
||||||
void setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRegs,
|
void setPhysRegsDeadExcept(ArrayRef<unsigned> UsedRegs,
|
||||||
const TargetRegisterInfo &TRI);
|
const TargetRegisterInfo &TRI);
|
||||||
|
|
||||||
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
/// isSafeToMove - Return true if it is safe to move this instruction. If
|
||||||
|
@ -1793,7 +1793,7 @@ void MachineInstr::addRegisterDefined(unsigned IncomingReg,
|
|||||||
true /*IsImp*/));
|
true /*IsImp*/));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MachineInstr::setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRegs,
|
void MachineInstr::setPhysRegsDeadExcept(ArrayRef<unsigned> UsedRegs,
|
||||||
const TargetRegisterInfo &TRI) {
|
const TargetRegisterInfo &TRI) {
|
||||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||||
MachineOperand &MO = getOperand(i);
|
MachineOperand &MO = getOperand(i);
|
||||||
@ -1801,8 +1801,8 @@ void MachineInstr::setPhysRegsDeadExcept(const SmallVectorImpl<unsigned> &UsedRe
|
|||||||
unsigned Reg = MO.getReg();
|
unsigned Reg = MO.getReg();
|
||||||
if (!TargetRegisterInfo::isPhysicalRegister(Reg)) continue;
|
if (!TargetRegisterInfo::isPhysicalRegister(Reg)) continue;
|
||||||
bool Dead = true;
|
bool Dead = true;
|
||||||
for (SmallVectorImpl<unsigned>::const_iterator I = UsedRegs.begin(),
|
for (ArrayRef<unsigned>::iterator I = UsedRegs.begin(), E = UsedRegs.end();
|
||||||
E = UsedRegs.end(); I != E; ++I)
|
I != E; ++I)
|
||||||
if (TRI.regsOverlap(*I, Reg)) {
|
if (TRI.regsOverlap(*I, Reg)) {
|
||||||
Dead = false;
|
Dead = false;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user