[llvm-commits] [llvm] r97029 - in /llvm/trunk/utils/TableGen: CMakeLists.txt DAGISelEmitter.cpp DAGISelMatcher.h DAGISelMatcherOpt.cpp
Chris Lattner
sabre at nondot.org
Tue Feb 23 23:06:51 PST 2010
Author: lattner
Date: Wed Feb 24 01:06:50 2010
New Revision: 97029
URL: http://llvm.org/viewvc/llvm-project?rev=97029&view=rev
Log:
The new isel passes all tests, time to start making it go fast.
Also add an easy macro at the top of DAGISelEmitter.cpp to enable
it. Lets see if I can avoid accidentally turning it on :)
Added:
llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
Modified:
llvm/trunk/utils/TableGen/CMakeLists.txt
llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
llvm/trunk/utils/TableGen/DAGISelMatcher.h
Modified: llvm/trunk/utils/TableGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CMakeLists.txt?rev=97029&r1=97028&r2=97029&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CMakeLists.txt (original)
+++ llvm/trunk/utils/TableGen/CMakeLists.txt Wed Feb 24 01:06:50 2010
@@ -11,6 +11,7 @@
DAGISelEmitter.cpp
DAGISelMatcherEmitter.cpp
DAGISelMatcherGen.cpp
+ DAGISelMatcherOpt.cpp
DAGISelMatcher.cpp
DisassemblerEmitter.cpp
EDEmitter.cpp
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.cpp?rev=97029&r1=97028&r2=97029&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.cpp Wed Feb 24 01:06:50 2010
@@ -24,6 +24,9 @@
#include <iostream>
using namespace llvm;
+//#define ENABLE_NEW_ISEL
+
+
static cl::opt<bool>
GenDebug("gen-debug", cl::desc("Generate debug code"), cl::init(false));
@@ -1791,6 +1794,9 @@
OS << "// The main instruction selector code.\n"
<< "SDNode *SelectCode(SDNode *N) {\n"
+#ifdef ENABLE_NEW_ISEL
+ << " return SelectCode2(N);\n"
+#endif
<< " MVT::SimpleValueType NVT = N->getValueType(0).getSimpleVT().SimpleTy;\n"
<< " switch (N->getOpcode()) {\n"
<< " default:\n"
@@ -1946,7 +1952,7 @@
// definitions. Emit the resultant instruction selector.
EmitInstructionSelector(OS);
-#if 0
+#ifdef ENABLE_NEW_ISEL
MatcherNode *Matcher = 0;
// Add all the patterns to a temporary list so we can sort them.
@@ -1977,7 +1983,7 @@
Matcher = new PushMatcherNode(N, Matcher);
}
- // OptimizeMatcher(Matcher);
+ OptimizeMatcher(Matcher);
//Matcher->dump();
EmitMatcherTable(Matcher, OS);
delete Matcher;
Modified: llvm/trunk/utils/TableGen/DAGISelMatcher.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcher.h?rev=97029&r1=97028&r2=97029&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcher.h (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcher.h Wed Feb 24 01:06:50 2010
@@ -26,7 +26,7 @@
MatcherNode *ConvertPatternToMatcher(const PatternToMatch &Pattern,
const CodeGenDAGPatterns &CGP);
-
+void OptimizeMatcher(const MatcherNode *Matcher);
void EmitMatcherTable(const MatcherNode *Matcher, raw_ostream &OS);
Added: llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp?rev=97029&view=auto
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp (added)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherOpt.cpp Wed Feb 24 01:06:50 2010
@@ -0,0 +1,19 @@
+//===- DAGISelMatcherOpt.cpp - Optimize a DAG Matcher ---------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the DAG Matcher optimizer.
+//
+//===----------------------------------------------------------------------===//
+
+#include "DAGISelMatcher.h"
+using namespace llvm;
+
+void llvm::OptimizeMatcher(const MatcherNode *Matcher) {
+ // Nothing yet.
+}
More information about the llvm-commits
mailing list