blob: da8aa16dbf67ed5694354c79f87ba7f9fed81611 [file] [log] [blame]
Dan Gohmanb0cf29c2008-08-13 20:19:35 +00001//===- FastISelEmitter.h - Generate an instruction selector -----*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This tablegen backend emits a "fast" instruction selector.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef FASTISEL_EMITTER_H
15#define FASTISEL_EMITTER_H
16
17#include "TableGenBackend.h"
18#include "CodeGenDAGPatterns.h"
Dan Gohmanb0cf29c2008-08-13 20:19:35 +000019
20namespace llvm {
21
Dan Gohmanc7f72de2008-08-21 00:19:05 +000022class CodeGenTarget;
23
Dan Gohmanb0cf29c2008-08-13 20:19:35 +000024/// FastISelEmitter - The top-level class which coordinates construction
25/// and emission of the instruction selector.
26///
27class FastISelEmitter : public TableGenBackend {
28 RecordKeeper &Records;
29 CodeGenDAGPatterns CGP;
Dan Gohmanc7f72de2008-08-21 00:19:05 +000030 const CodeGenTarget &Target;
31 const std::string InstNS;
Dan Gohmanb0cf29c2008-08-13 20:19:35 +000032public:
Dan Gohmanc7f72de2008-08-21 00:19:05 +000033 explicit FastISelEmitter(RecordKeeper &R);
Dan Gohmanb0cf29c2008-08-13 20:19:35 +000034
35 // run - Output the isel, returning true on failure.
36 void run(std::ostream &OS);
37};
38
39} // End llvm namespace
40
41#endif