aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-28 22:38:43 +0000
committerChris Lattner <sabre@nondot.org>2010-02-28 22:38:43 +0000
commit14df8dc680d40173f34d693f9dc451f8a30c907b (patch)
tree8b5385d359973347a96060d1db70e583585f73f8 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent2a49d57d2d9dd19125a9ba302e883f6ba6c38b83 (diff)
eliminate GetInt1/2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 68a53a657a..8b25defb8c 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1479,20 +1479,6 @@ static bool IsChainCompatible(SDNode *Chain, SDNode *Op) {
}
-// These functions are marked always inline so that Idx doesn't get pinned to
-// the stack.
-ALWAYS_INLINE static int8_t
-GetInt1(const unsigned char *MatcherTable, unsigned &Idx) {
- return MatcherTable[Idx++];
-}
-
-ALWAYS_INLINE static int16_t
-GetInt2(const unsigned char *MatcherTable, unsigned &Idx) {
- int16_t Val = (uint8_t)GetInt1(MatcherTable, Idx);
- Val |= int16_t(GetInt1(MatcherTable, Idx)) << 8;
- return Val;
-}
-
/// GetVBR - decode a vbr encoding whose top bit is set.
ALWAYS_INLINE static uint64_t
GetVBR(uint64_t Val, const unsigned char *MatcherTable, unsigned &Idx) {
@@ -1502,7 +1488,7 @@ GetVBR(uint64_t Val, const unsigned char *MatcherTable, unsigned &Idx) {
unsigned Shift = 7;
uint64_t NextBits;
do {
- NextBits = GetInt1(MatcherTable, Idx);
+ NextBits = MatcherTable[Idx++];
Val |= (NextBits&127) << Shift;
Shift += 7;
} while (NextBits & 128);
@@ -2035,7 +2021,8 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
case OPC_EmitNode:
case OPC_MorphNodeTo: {
- uint16_t TargetOpc = GetInt2(MatcherTable, MatcherIndex);
+ uint16_t TargetOpc = MatcherTable[MatcherIndex++];
+ TargetOpc |= (unsigned short)MatcherTable[MatcherIndex++] << 8;
unsigned EmitNodeInfo = MatcherTable[MatcherIndex++];
// Get the result VT list.
unsigned NumVTs = MatcherTable[MatcherIndex++];