OSDN Git Service

Rewrite chain handling validation and input TokenFactor handling
authorChris Lattner <sabre@nondot.org>
Tue, 2 Mar 2010 02:22:10 +0000 (02:22 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 2 Mar 2010 02:22:10 +0000 (02:22 +0000)
commitd9245c391fe16261902c9840e26a3d82a26f50f6
treebe488a71fff4b5e6dfdb04a71898879a39937557
parent978e526b88f014cbbeb11afe1a27c76806e9ac9b
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
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
test/CodeGen/X86/store_op_load_fold2.ll
test/CodeGen/X86/vec_shuffle-18.ll
utils/TableGen/DAGISelMatcher.cpp
utils/TableGen/DAGISelMatcher.h
utils/TableGen/DAGISelMatcherEmitter.cpp
utils/TableGen/DAGISelMatcherGen.cpp