2005-09-03 01:14:03 +00:00
|
|
|
//===- DAGISelEmitter.h - Generate an instruction selector ------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:37:13 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-09-03 01:14:03 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This tablegen backend emits a DAG instruction selector.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef DAGISEL_EMITTER_H
|
|
|
|
#define DAGISEL_EMITTER_H
|
|
|
|
|
2008-04-03 00:02:49 +00:00
|
|
|
#include "TableGenBackend.h"
|
2008-01-05 22:25:12 +00:00
|
|
|
#include "CodeGenDAGPatterns.h"
|
2006-02-07 00:37:41 +00:00
|
|
|
#include <set>
|
2005-09-03 01:14:03 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
2005-12-14 22:02:59 +00:00
|
|
|
|
2006-01-17 21:31:18 +00:00
|
|
|
/// DAGISelEmitter - The top-level class which coordinates construction
|
2005-09-03 01:14:03 +00:00
|
|
|
/// and emission of the instruction selector.
|
|
|
|
///
|
|
|
|
class DAGISelEmitter : public TableGenBackend {
|
|
|
|
RecordKeeper &Records;
|
2008-01-06 01:10:31 +00:00
|
|
|
CodeGenDAGPatterns CGP;
|
2005-09-03 01:14:03 +00:00
|
|
|
public:
|
2009-02-18 16:37:45 +00:00
|
|
|
explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
|
2005-09-03 01:14:03 +00:00
|
|
|
|
|
|
|
// run - Output the isel, returning true on failure.
|
2009-07-03 00:10:29 +00:00
|
|
|
void run(raw_ostream &OS);
|
2005-09-07 23:44:43 +00:00
|
|
|
private:
|
2009-07-03 00:10:29 +00:00
|
|
|
void EmitPredicateFunctions(raw_ostream &OS);
|
2005-09-03 01:14:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // End llvm namespace
|
|
|
|
|
|
|
|
#endif
|