diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-08-08 01:49:35 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-08-08 01:49:35 +0000 |
commit | 18e853f458caee9676c2e29a39aacb7914d85dc4 (patch) | |
tree | d1087f666ed3a0a795688f64ad8524d6fb4bdc1c /llvm/include | |
parent | 6ff7161d51a9e5a43fd7e69ab2df69a67fcd12e3 (diff) | |
download | bcm5719-llvm-18e853f458caee9676c2e29a39aacb7914d85dc4.tar.gz bcm5719-llvm-18e853f458caee9676c2e29a39aacb7914d85dc4.zip |
Add back in r109901, which adds a Compare flag to the target instructions. It's
useful after all.
llvm-svn: 110531
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Target/Target.td | 1 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetInstrDesc.h | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/include/llvm/Target/Target.td b/llvm/include/llvm/Target/Target.td index ad1a816a95c..809e088e2b0 100644 --- a/llvm/include/llvm/Target/Target.td +++ b/llvm/include/llvm/Target/Target.td @@ -198,6 +198,7 @@ class Instruction { bit isReturn = 0; // Is this instruction a return instruction? bit isBranch = 0; // Is this instruction a branch instruction? bit isIndirectBranch = 0; // Is this instruction an indirect branch? + bit isCompare = 0; // Is this instruction a comparison instruction? bit isBarrier = 0; // Can control flow fall through this instruction? bit isCall = 0; // Is this instruction a call instruction? bit canFoldAsLoad = 0; // Can this be folded as a simple memory operand? diff --git a/llvm/include/llvm/Target/TargetInstrDesc.h b/llvm/include/llvm/Target/TargetInstrDesc.h index 8f0a6cb1a68..6a08e8f24c0 100644 --- a/llvm/include/llvm/Target/TargetInstrDesc.h +++ b/llvm/include/llvm/Target/TargetInstrDesc.h @@ -105,6 +105,7 @@ namespace TID { IndirectBranch, Predicable, NotDuplicable, + Compare, DelaySlot, FoldableAsLoad, MayLoad, @@ -315,7 +316,7 @@ public: bool isIndirectBranch() const { return Flags & (1 << TID::IndirectBranch); } - + /// isConditionalBranch - Return true if this is a branch which may fall /// through to the next instruction or may transfer control flow to some other /// block. The TargetInstrInfo::AnalyzeBranch method can be used to get more @@ -340,6 +341,11 @@ public: return Flags & (1 << TID::Predicable); } + /// isCompare - Return true if this instruction is a comparison. + bool isCompare() const { + return Flags & (1 << TID::Compare); + } + /// isNotDuplicable - Return true if this instruction cannot be safely /// duplicated. For example, if the instruction has a unique labels attached /// to it, duplicating it would cause multiple definition errors. |