Stop emitting predicate functions. They are no longer used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112924 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2010-09-03 00:39:50 +00:00
parent e5734105da
commit ecf93e4ab3
2 changed files with 0 additions and 50 deletions

View File

@ -57,51 +57,6 @@ static unsigned getResultPatternSize(TreePatternNode *P,
return Cost;
}
//===----------------------------------------------------------------------===//
// Predicate emitter implementation.
//
void DAGISelEmitter::EmitPredicateFunctions(raw_ostream &OS) {
OS << "\n// Predicate functions.\n";
// Walk the pattern fragments, adding them to a map, which sorts them by
// name.
typedef std::map<std::string, std::pair<Record*, TreePattern*> > PFsByNameTy;
PFsByNameTy PFsByName;
for (CodeGenDAGPatterns::pf_iterator I = CGP.pf_begin(), E = CGP.pf_end();
I != E; ++I)
PFsByName.insert(std::make_pair(I->first->getName(), *I));
for (PFsByNameTy::iterator I = PFsByName.begin(), E = PFsByName.end();
I != E; ++I) {
Record *PatFragRecord = I->second.first;// Record that derives from PatFrag.
TreePattern *P = I->second.second;
// If there is a code init for this fragment, emit the predicate code.
std::string Code = PatFragRecord->getValueAsCode("Predicate");
if (Code.empty()) continue;
if (P->getOnlyTree()->isLeaf())
OS << "inline bool Predicate_" << PatFragRecord->getName()
<< "(SDNode *N) const {\n";
else {
std::string ClassName =
CGP.getSDNodeInfo(P->getOnlyTree()->getOperator()).getSDClassName();
const char *C2 = ClassName == "SDNode" ? "N" : "inN";
OS << "inline bool Predicate_" << PatFragRecord->getName()
<< "(SDNode *" << C2 << ") const {\n";
if (ClassName != "SDNode")
OS << " " << ClassName << " *N = cast<" << ClassName << ">(inN);\n";
}
OS << Code << "\n}\n";
}
OS << "\n\n";
}
namespace {
// PatternSortingPredicate - return true if we prefer to match LHS before RHS.
// In particular, we want to match maximal patterns first and lowest cost within
@ -168,9 +123,6 @@ void DAGISelEmitter::run(raw_ostream &OS) {
errs() << "\n";
});
// FIXME: These are being used by hand written code, gross.
EmitPredicateFunctions(OS);
// Add all the patterns to a temporary list so we can sort them.
std::vector<const PatternToMatch*> Patterns;
for (CodeGenDAGPatterns::ptm_iterator I = CGP.ptm_begin(), E = CGP.ptm_end();

View File

@ -31,8 +31,6 @@ public:
// run - Output the isel, returning true on failure.
void run(raw_ostream &OS);
private:
void EmitPredicateFunctions(raw_ostream &OS);
};
} // End llvm namespace