aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-22 23:55:39 +0000
committerChris Lattner <sabre@nondot.org>2010-02-22 23:55:39 +0000
commit3e22f2d489d6d1cff5123ae606cdea10d2c631f6 (patch)
tree8d40f080123488e67acce3d16802c6a4bb68273b /include/llvm/CodeGen
parentc6feeb7fa97eabe7701a6df9d5da69bd79fd8344 (diff)
add a new Push2 opcode for targets (like cellspu) which have
ridiculously ginormous patterns and need more than one byte of displacement for encodings. This fixes CellSPU/fdiv.ll. SPU is still doing something else ridiculous though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96833 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/DAGISelHeader.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h
index 0ebb9f10f6..29d66f5995 100644
--- a/include/llvm/CodeGen/DAGISelHeader.h
+++ b/include/llvm/CodeGen/DAGISelHeader.h
@@ -201,7 +201,7 @@ GetInt8(const unsigned char *MatcherTable, unsigned &Idx) {
}
enum BuiltinOpcodes {
- OPC_Push,
+ OPC_Push, OPC_Push2,
OPC_RecordNode,
OPC_RecordMemRef,
OPC_CaptureFlagInput,
@@ -359,6 +359,19 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
MatchScopes.push_back(NewEntry);
continue;
}
+ case OPC_Push2: {
+ unsigned NumToSkip = GetInt2(MatcherTable, MatcherIndex);
+ MatchScope NewEntry;
+ NewEntry.FailIndex = MatcherIndex+NumToSkip;
+ NewEntry.NodeStackSize = NodeStack.size();
+ NewEntry.NumRecordedNodes = RecordedNodes.size();
+ NewEntry.NumMatchedMemRefs = MatchedMemRefs.size();
+ NewEntry.InputChain = InputChain;
+ NewEntry.InputFlag = InputFlag;
+ NewEntry.HasChainNodesMatched = !ChainNodesMatched.empty();
+ MatchScopes.push_back(NewEntry);
+ continue;
+ }
case OPC_RecordNode:
// Remember this node, it may end up being an operand in the pattern.
RecordedNodes.push_back(N);