aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-14 21:11:53 +0000
committerChris Lattner <sabre@nondot.org>2010-02-14 21:11:53 +0000
commitc87bf389dc48935a0347f117fc1df739d0eb8430 (patch)
tree2429f4156b2a794566448cbbf468dfdf1f08d29a /utils
parent383fed9c7aa3b09195bcc2f5f2635ff8bc7819e3 (diff)
downloadexternal_llvm-c87bf389dc48935a0347f117fc1df739d0eb8430.zip
external_llvm-c87bf389dc48935a0347f117fc1df739d0eb8430.tar.gz
external_llvm-c87bf389dc48935a0347f117fc1df739d0eb8430.tar.bz2
remove the DisablePatternForFastISel predicate, which is a check
that predated -fast-isel which attempted to speed up the dag pattern matchers at -O0. Since fast-isel is around, this is basically obsolete and removing it shrinks the generated dag isels. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96188 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 6281b89..355a438 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -261,24 +261,6 @@ static std::string getOpcodeName(Record *Op, CodeGenDAGPatterns &CGP) {
return CGP.getSDNodeInfo(Op).getEnumName();
}
-static
-bool DisablePatternForFastISel(TreePatternNode *N, CodeGenDAGPatterns &CGP) {
- bool isStore = !N->isLeaf() &&
- getOpcodeName(N->getOperator(), CGP) == "ISD::STORE";
- if (!isStore && NodeHasProperty(N, SDNPHasChain, CGP))
- return false;
-
- bool HasChain = false;
- for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i) {
- TreePatternNode *Child = N->getChild(i);
- if (PatternHasProperty(Child, SDNPHasChain, CGP)) {
- HasChain = true;
- break;
- }
- }
- return HasChain;
-}
-
//===----------------------------------------------------------------------===//
// Node Transformation emitter implementation.
//
@@ -594,10 +576,6 @@ void PatternCodeEmitter::EmitMatchCode(TreePatternNode *N, TreePatternNode *P,
if (isRoot) {
// Record input varargs info.
NumInputRootOps = N->getNumChildren();
-
- if (DisablePatternForFastISel(N, CGP))
- emitCheck("OptLevel != CodeGenOpt::None");
-
emitCheck(PredicateCheck);
}
@@ -1506,7 +1484,8 @@ void DAGISelEmitter::GenerateCodeForPattern(const PatternToMatch &Pattern,
bool FoundChain = false;
Emitter.EmitMatchCode(Pattern.getSrcPattern(), NULL, "N", "", FoundChain);
- // TP - Get *SOME* tree pattern, we don't care which.
+ // TP - Get *SOME* tree pattern, we don't care which. It is only used for
+ // diagnostics, which we know are impossible at this point.
TreePattern &TP = *CGP.pf_begin()->second;
// At this point, we know that we structurally match the pattern, but the
@@ -1699,7 +1678,7 @@ void DAGISelEmitter::EmitInstructionSelector(raw_ostream &OS) {
for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(),
E = CGP.ptm_end(); I != E; ++I) {
const PatternToMatch &Pattern = *I;
-
+
TreePatternNode *Node = Pattern.getSrcPattern();
if (!Node->isLeaf()) {
PatternsByOpcode[getOpcodeName(Node->getOperator(), CGP)].