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