llvm.org GIT mirror llvm / 4fc3d5d
Add a new method to SDNode/SDOperand named getValueSizeInBits that combines getValueType and MVT::getSizeInBits, since this occurrs frequently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47552 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 12 years ago
1 changed file(s) with 12 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
830830 ///
831831 inline MVT::ValueType getValueType() const;
832832
833 /// getValueSizeInBits - Returns MVT::getSizeInBits(getValueType()).
834 ///
835 unsigned getValueSizeInBits() const {
836 return MVT::getSizeInBits(getValueType());
837 }
838
833839 // Forwarding methods - These forward to the corresponding methods in SDNode.
834840 inline unsigned getOpcode() const;
835841 inline unsigned getNumOperands() const;
10081014 MVT::ValueType getValueType(unsigned ResNo) const {
10091015 assert(ResNo < NumValues && "Illegal result number!");
10101016 return ValueList[ResNo];
1017 }
1018
1019 /// getValueSizeInBits - Returns MVT::getSizeInBits(getValueType(ResNo)).
1020 ///
1021 unsigned getValueSizeInBits(unsigned ResNo) const {
1022 return MVT::getSizeInBits(getValueType(ResNo));
10111023 }
10121024
10131025 typedef const MVT::ValueType* value_iterator;