blob: 2117e65455ac442f58dfb7c75c63c29515927d2b [file] [log] [blame]
Chris Lattner4a24c642005-09-03 01:14:03 +00001//===- DAGISelEmitter.h - Generate an instruction selector ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner30609102007-12-29 20:37:13 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Chris Lattner4a24c642005-09-03 01:14:03 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This tablegen backend emits a DAG instruction selector.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef DAGISEL_EMITTER_H
15#define DAGISEL_EMITTER_H
16
Dan Gohmanee4fa192008-04-03 00:02:49 +000017#include "TableGenBackend.h"
Chris Lattner6cefb772008-01-05 22:25:12 +000018#include "CodeGenDAGPatterns.h"
Evan Cheng21ad3922006-02-07 00:37:41 +000019#include <set>
Chris Lattner4a24c642005-09-03 01:14:03 +000020
21namespace llvm {
Evan Cheng58e84a62005-12-14 22:02:59 +000022
Chris Lattner09fb7d42006-01-17 21:31:18 +000023/// DAGISelEmitter - The top-level class which coordinates construction
Chris Lattner4a24c642005-09-03 01:14:03 +000024/// and emission of the instruction selector.
25///
26class DAGISelEmitter : public TableGenBackend {
27 RecordKeeper &Records;
Chris Lattnerfe718932008-01-06 01:10:31 +000028 CodeGenDAGPatterns CGP;
Chris Lattner4a24c642005-09-03 01:14:03 +000029public:
Dan Gohman38deef92009-02-18 16:37:45 +000030 explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
Chris Lattner4a24c642005-09-03 01:14:03 +000031
32 // run - Output the isel, returning true on failure.
Daniel Dunbar1a551802009-07-03 00:10:29 +000033 void run(raw_ostream &OS);
Chris Lattner4a24c642005-09-03 01:14:03 +000034};
35
36} // End llvm namespace
37
38#endif