mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
Remove NumImplicitOps which is now unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0c01bc385a
commit
cc84cda919
@ -58,8 +58,6 @@ public:
|
||||
};
|
||||
private:
|
||||
const MCInstrDesc *MCID; // Instruction descriptor.
|
||||
uint16_t NumImplicitOps; // Number of implicit operands (which
|
||||
// are determined at construction time).
|
||||
|
||||
uint8_t Flags; // Various bits of additional
|
||||
// information about machine
|
||||
@ -78,9 +76,6 @@ private:
|
||||
MachineBasicBlock *Parent; // Pointer to the owning basic block.
|
||||
DebugLoc debugLoc; // Source line information.
|
||||
|
||||
// OperandComplete - Return true if it's illegal to add a new operand
|
||||
bool OperandsComplete() const;
|
||||
|
||||
MachineInstr(const MachineInstr&); // DO NOT IMPLEMENT
|
||||
void operator=(const MachineInstr&); // DO NOT IMPLEMENT
|
||||
|
||||
|
@ -464,7 +464,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const MachineMemOperand &MMO) {
|
||||
/// MachineInstr ctor - This constructor creates a dummy MachineInstr with
|
||||
/// MCID NULL and no operands.
|
||||
MachineInstr::MachineInstr()
|
||||
: MCID(0), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(0), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0),
|
||||
Parent(0) {
|
||||
// Make sure that we get added to a machine basicblock
|
||||
@ -484,8 +484,9 @@ void MachineInstr::addImplicitDefUseOperands() {
|
||||
/// implicit operands. It reserves space for the number of operands specified by
|
||||
/// the MCInstrDesc.
|
||||
MachineInstr::MachineInstr(const MCInstrDesc &tid, bool NoImp)
|
||||
: MCID(&tid), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(&tid), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0) {
|
||||
unsigned NumImplicitOps = 0;
|
||||
if (!NoImp)
|
||||
NumImplicitOps = MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
Operands.reserve(NumImplicitOps + MCID->getNumOperands());
|
||||
@ -498,8 +499,9 @@ MachineInstr::MachineInstr(const MCInstrDesc &tid, bool NoImp)
|
||||
/// MachineInstr ctor - As above, but with a DebugLoc.
|
||||
MachineInstr::MachineInstr(const MCInstrDesc &tid, const DebugLoc dl,
|
||||
bool NoImp)
|
||||
: MCID(&tid), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(&tid), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0), debugLoc(dl) {
|
||||
unsigned NumImplicitOps = 0;
|
||||
if (!NoImp)
|
||||
NumImplicitOps = MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
Operands.reserve(NumImplicitOps + MCID->getNumOperands());
|
||||
@ -513,10 +515,11 @@ MachineInstr::MachineInstr(const MCInstrDesc &tid, const DebugLoc dl,
|
||||
/// that the MachineInstr is created and added to the end of the specified
|
||||
/// basic block.
|
||||
MachineInstr::MachineInstr(MachineBasicBlock *MBB, const MCInstrDesc &tid)
|
||||
: MCID(&tid), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(&tid), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0) {
|
||||
assert(MBB && "Cannot use inserting ctor with null basic block!");
|
||||
NumImplicitOps = MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
unsigned NumImplicitOps =
|
||||
MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
Operands.reserve(NumImplicitOps + MCID->getNumOperands());
|
||||
addImplicitDefUseOperands();
|
||||
// Make sure that we get added to a machine basicblock
|
||||
@ -528,10 +531,11 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, const MCInstrDesc &tid)
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineBasicBlock *MBB, const DebugLoc dl,
|
||||
const MCInstrDesc &tid)
|
||||
: MCID(&tid), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(&tid), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(0), MemRefsEnd(0), Parent(0), debugLoc(dl) {
|
||||
assert(MBB && "Cannot use inserting ctor with null basic block!");
|
||||
NumImplicitOps = MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
unsigned NumImplicitOps =
|
||||
MCID->getNumImplicitDefs() + MCID->getNumImplicitUses();
|
||||
Operands.reserve(NumImplicitOps + MCID->getNumOperands());
|
||||
addImplicitDefUseOperands();
|
||||
// Make sure that we get added to a machine basicblock
|
||||
@ -542,7 +546,7 @@ MachineInstr::MachineInstr(MachineBasicBlock *MBB, const DebugLoc dl,
|
||||
/// MachineInstr ctor - Copies MachineInstr arg exactly
|
||||
///
|
||||
MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI)
|
||||
: MCID(&MI.getDesc()), NumImplicitOps(0), Flags(0), AsmPrinterFlags(0),
|
||||
: MCID(&MI.getDesc()), Flags(0), AsmPrinterFlags(0),
|
||||
MemRefs(MI.MemRefs), MemRefsEnd(MI.MemRefsEnd),
|
||||
Parent(0), debugLoc(MI.getDebugLoc()) {
|
||||
Operands.reserve(MI.getNumOperands());
|
||||
@ -550,7 +554,6 @@ MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI)
|
||||
// Add operands
|
||||
for (unsigned i = 0; i != MI.getNumOperands(); ++i)
|
||||
addOperand(MI.getOperand(i));
|
||||
NumImplicitOps = MI.NumImplicitOps;
|
||||
|
||||
// Copy all the flags.
|
||||
Flags = MI.Flags;
|
||||
@ -799,15 +802,6 @@ void MachineInstr::eraseFromParent() {
|
||||
}
|
||||
|
||||
|
||||
/// OperandComplete - Return true if it's illegal to add a new operand
|
||||
///
|
||||
bool MachineInstr::OperandsComplete() const {
|
||||
unsigned short NumOperands = MCID->getNumOperands();
|
||||
if (!MCID->isVariadic() && getNumOperands()-NumImplicitOps >= NumOperands)
|
||||
return true; // Broken: we have all the operands of this instruction!
|
||||
return false;
|
||||
}
|
||||
|
||||
/// getNumExplicitOperands - Returns the number of non-implicit operands.
|
||||
///
|
||||
unsigned MachineInstr::getNumExplicitOperands() const {
|
||||
|
Loading…
Reference in New Issue
Block a user