[llvm-commits] [llvm] r63265 - /llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Dan Gohman
gohman at apple.com
Wed Jan 28 17:37:18 PST 2009
Author: djg
Date: Wed Jan 28 19:37:18 2009
New Revision: 63265
URL: http://llvm.org/viewvc/llvm-project?rev=63265&view=rev
Log:
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.
Modified:
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=63265&r1=63264&r2=63265&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Jan 28 19:37:18 2009
@@ -1825,9 +1825,6 @@
} 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 @@
// 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);
More information about the llvm-commits
mailing list