1894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//===- DAGISelEmitter.h - Generate an instruction selector ------*- C++ -*-===//
2894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
3894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//                     The LLVM Compiler Infrastructure
4894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
5894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman// This file is distributed under the University of Illinois Open Source
6894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman// License. See LICENSE.TXT for details.
7894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
8894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//===----------------------------------------------------------------------===//
9894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
10894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman// This tablegen backend emits a DAG instruction selector.
11894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//
12894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman//===----------------------------------------------------------------------===//
13894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
14894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#ifndef DAGISEL_EMITTER_H
15894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#define DAGISEL_EMITTER_H
16894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
1719bac1e08be200c31efd26f0f5fd144c9b3eefd3John Bauman#include "llvm/TableGen/TableGenBackend.h"
18894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#include "CodeGenDAGPatterns.h"
19894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
20894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Baumannamespace llvm {
21894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
22894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman/// DAGISelEmitter - The top-level class which coordinates construction
23894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman/// and emission of the instruction selector.
24894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman///
25894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Baumanclass DAGISelEmitter : public TableGenBackend {
26894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  RecordKeeper &Records;
27894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  CodeGenDAGPatterns CGP;
28894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Baumanpublic:
29894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
30894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
31894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  // run - Output the isel, returning true on failure.
32894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman  void run(raw_ostream &OS);
33894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman};
34894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
35894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman} // End llvm namespace
36894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman
37894018228b0e0bdbd7aa7e8f47d4a9458789ca82John Bauman#endif
38