summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-01-29 01:37:18 +0000
committerDan Gohman <gohman@apple.com>2009-01-29 01:37:18 +0000
commit63e3e6350b14d04917268be07ca1c29e158fdfd7 (patch)
tree33b7f8fb7a7af23cf3ac9ae95a7e032c3ac66921 /utils
parent7ddee0ad249e69753a08356708fe3bfbedbb7712 (diff)
downloadllvm-63e3e6350b14d04917268be07ca1c29e158fdfd7.tar.gz
llvm-63e3e6350b14d04917268be07ca1c29e158fdfd7.tar.bz2
llvm-63e3e6350b14d04917268be07ca1c29e158fdfd7.tar.xz
Move the code that starts printing the Select_* functions
after the code that sorts the patterns. This doesn't affect the output, but it makes the code a little easier to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index 9f028ed495..d6bcce2703 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -1825,9 +1825,6 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
} else
OpVTI->second.push_back(OpVTStr);
- OS << "SDNode *Select_" << getLegalCName(OpName)
- << OpVTStr << "(const SDValue &N) {\n";
-
// We want to emit all of the matching code now. However, we want to emit
// the matches in order of minimal cost. Sort the patterns so the least
// cost one is at the start.
@@ -1869,6 +1866,9 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
// Next, reverse the list of patterns itself for the same reason.
std::reverse(CodeForPatterns.begin(), CodeForPatterns.end());
+ OS << "SDNode *Select_" << getLegalCName(OpName)
+ << OpVTStr << "(const SDValue &N) {\n";
+
// Emit all of the patterns now, grouped together to share code.
EmitPatterns(CodeForPatterns, 2, OS);