[llvm-commits] [llvm] r97426 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Chris Lattner
sabre at nondot.org
Sun Feb 28 14:38:43 PST 2010
Author: lattner
Date: Sun Feb 28 16:38:43 2010
New Revision: 97426
URL: http://llvm.org/viewvc/llvm-project?rev=97426&view=rev
Log:
eliminate GetInt1/2
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=97426&r1=97425&r2=97426&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Sun Feb 28 16:38:43 2010
@@ -1479,20 +1479,6 @@
}
-// 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 @@
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 @@
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++];
More information about the llvm-commits
mailing list