summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelMatcher.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-02 02:22:10 +0000
committerChris Lattner <sabre@nondot.org>2010-03-02 02:22:10 +0000
commitc6d7ad3c7d83e9af29bf3ba3bf3280e72a952f98 (patch)
treebe488a71fff4b5e6dfdb04a71898879a39937557 /utils/TableGen/DAGISelMatcher.h
parent5b870aff81da0c07413f0241087bb3722954b83d (diff)
downloadllvm-c6d7ad3c7d83e9af29bf3ba3bf3280e72a952f98.tar.gz
llvm-c6d7ad3c7d83e9af29bf3ba3bf3280e72a952f98.tar.bz2
llvm-c6d7ad3c7d83e9af29bf3ba3bf3280e72a952f98.tar.xz
Rewrite chain handling validation and input TokenFactor handling
stuff now that we don't care about emulating the old broken behavior of the old isel. This eliminates the 'CheckChainCompatible' check (along with IsChainCompatible) which did an incorrect and inefficient scan *up* the chain nodes which happened as the pattern was being formed and does the validation at the end in HandleMergeInputChains when it forms a structural pattern. This scans "down" the graph, which means that it is quickly bounded by nodes already selected. This also handles token factors that get "trapped" in the dag. Removing the CheckChainCompatible nodes also shrinks the generated tables by about 6K for X86 (down to 83K). There are two pieces remaining before I can nuke PreprocessRMW: 1. I xfailed a test because we're now producing worse code in a case that has nothing to do with the change: it turns out that our use of MorphNodeTo will leave dead nodes in the graph which (depending on how the graph is walked) end up causing bogus uses of chains and blocking matches. This is really bad for other reasons, so I'll fix this in a follow-up patch. 2. CheckFoldableChainNode needs to be improved to handle the TF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97539 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/DAGISelMatcher.h')
-rw-r--r--utils/TableGen/DAGISelMatcher.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/utils/TableGen/DAGISelMatcher.h b/utils/TableGen/DAGISelMatcher.h
index 1634cd2ecd..3eb6755674 100644
--- a/utils/TableGen/DAGISelMatcher.h
+++ b/utils/TableGen/DAGISelMatcher.h
@@ -64,7 +64,6 @@ public:
CheckAndImm,
CheckOrImm,
CheckFoldableChainNode,
- CheckChainCompatible,
// Node creation/emisssion.
EmitInteger, // Create a TargetConstant
@@ -671,30 +670,6 @@ private:
virtual unsigned getHashImpl() const { return 0; }
};
-/// CheckChainCompatibleMatcher - Verify that the current node's chain
-/// operand is 'compatible' with the specified recorded node's.
-class CheckChainCompatibleMatcher : public Matcher {
- unsigned PreviousOp;
-public:
- CheckChainCompatibleMatcher(unsigned previousop)
- : Matcher(CheckChainCompatible), PreviousOp(previousop) {}
-
- unsigned getPreviousOp() const { return PreviousOp; }
-
- static inline bool classof(const Matcher *N) {
- return N->getKind() == CheckChainCompatible;
- }
-
- virtual bool isSafeToReorderWithPatternPredicate() const { return true; }
-
-private:
- virtual void printImpl(raw_ostream &OS, unsigned indent) const;
- virtual bool isEqualImpl(const Matcher *M) const {
- return cast<CheckChainCompatibleMatcher>(M)->PreviousOp == PreviousOp;
- }
- virtual unsigned getHashImpl() const { return PreviousOp; }
-};
-
/// EmitIntegerMatcher - This creates a new TargetConstant.
class EmitIntegerMatcher : public Matcher {
int64_t Val;