diff options
| author | Dan Gohman <gohman@apple.com> | 2008-02-25 19:08:02 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-02-25 19:08:02 +0000 |
| commit | 6610e9ec83cc3391aef1373e588b91ddc9bd7333 (patch) | |
| tree | 8582c94ada29959c90a98821ce52744be6bda9df /llvm/include | |
| parent | 89838915313258721f2c0b9e06341c2534b4d985 (diff) | |
| download | bcm5719-llvm-6610e9ec83cc3391aef1373e588b91ddc9bd7333.tar.gz bcm5719-llvm-6610e9ec83cc3391aef1373e588b91ddc9bd7333.zip | |
Add a new method to SDNode/SDOperand named getValueSizeInBits
that combines getValueType and MVT::getSizeInBits, since this
occurrs frequently.
llvm-svn: 47552
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/CodeGen/SelectionDAGNodes.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h index d47e0a69a7d..6996c69545f 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -831,6 +831,12 @@ public: /// inline MVT::ValueType getValueType() const; + /// getValueSizeInBits - Returns MVT::getSizeInBits(getValueType()). + /// + unsigned getValueSizeInBits() const { + return MVT::getSizeInBits(getValueType()); + } + // Forwarding methods - These forward to the corresponding methods in SDNode. inline unsigned getOpcode() const; inline unsigned getNumOperands() const; @@ -1011,6 +1017,12 @@ public: return ValueList[ResNo]; } + /// getValueSizeInBits - Returns MVT::getSizeInBits(getValueType(ResNo)). + /// + unsigned getValueSizeInBits(unsigned ResNo) const { + return MVT::getSizeInBits(getValueType(ResNo)); + } + typedef const MVT::ValueType* value_iterator; value_iterator value_begin() const { return ValueList; } value_iterator value_end() const { return ValueList+NumValues; } |

