diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:27:15 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-03-03 17:27:15 +0000 | 
| commit | 67a71b3184ce20a901e874d0ee25e01397dd87ef (patch) | |
| tree | 836a05cff50ca46176117b86029f061fa4db54f0 /include/llvm/CodeGen/MachineInstr.h | |
| parent | 6fe5c7aa327e188b7176daa5595bbf075a6b94df (diff) | |
Notes
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
| -rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 25 | 
1 files changed, 12 insertions, 13 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 6e33fb3e905e..66be26c950a7 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -179,17 +179,16 @@ public:      return MemRefsEnd - MemRefs == 1;    } +  enum MICheckType { +    CheckDefs,      // Check all operands for equality +    IgnoreDefs,     // Ignore all definitions +    IgnoreVRegDefs  // Ignore virtual register definitions +  }; +    /// isIdenticalTo - Return true if this instruction is identical to (same    /// opcode and same operands as) the specified instruction. -  bool isIdenticalTo(const MachineInstr *Other) const { -    if (Other->getOpcode() != getOpcode() || -        Other->getNumOperands() != getNumOperands()) -      return false; -    for (unsigned i = 0, e = getNumOperands(); i != e; ++i) -      if (!getOperand(i).isIdenticalTo(Other->getOperand(i))) -        return false; -    return true; -  } +  bool isIdenticalTo(const MachineInstr *Other, +                     MICheckType Check = CheckDefs) const;    /// removeFromParent - This method unlinks 'this' from the containing basic    /// block, and returns it, but does not delete it. @@ -331,13 +330,13 @@ public:    /// isSafeToMove - Return true if it is safe to move this instruction. If    /// SawStore is set to true, it means that there is a store (or call) between    /// the instruction's location and its intended destination. -  bool isSafeToMove(const TargetInstrInfo *TII, bool &SawStore, -                    AliasAnalysis *AA) const; +  bool isSafeToMove(const TargetInstrInfo *TII, AliasAnalysis *AA, +                    bool &SawStore) const;    /// isSafeToReMat - Return true if it's safe to rematerialize the specified    /// instruction which defined the specified register instead of copying it. -  bool isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg, -                     AliasAnalysis *AA) const; +  bool isSafeToReMat(const TargetInstrInfo *TII, AliasAnalysis *AA, +                     unsigned DstReg) const;    /// hasVolatileMemoryRef - Return true if this instruction may have a    /// volatile memory reference, or if the information describing the  | 
