blob: 0f3f0e72b6fa4f0fd2d0730577a22340cb90409b [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001//===- IntrinsicEmitter.h - Generate intrinsic information ------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattnerfd6c2f02007-12-29 20:37:13 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This tablegen backend emits information about intrinsic functions.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef INTRINSIC_EMITTER_H
15#define INTRINSIC_EMITTER_H
16
17#include "CodeGenIntrinsics.h"
18#include "TableGenBackend.h"
19
20namespace llvm {
21 class IntrinsicEmitter : public TableGenBackend {
22 RecordKeeper &Records;
Dale Johannesenfe5921a2009-02-05 01:49:45 +000023 bool TargetOnly;
24 std::string TargetPrefix;
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025
26 public:
Dale Johannesenfe5921a2009-02-05 01:49:45 +000027 IntrinsicEmitter(RecordKeeper &R, bool T = false)
28 : Records(R), TargetOnly(T) {}
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029
30 void run(std::ostream &OS);
31
32 void EmitEnumInfo(const std::vector<CodeGenIntrinsic> &Ints,
33 std::ostream &OS);
34
35 void EmitFnNameRecognizer(const std::vector<CodeGenIntrinsic> &Ints,
36 std::ostream &OS);
37 void EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints,
38 std::ostream &OS);
39 void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
40 std::ostream &OS);
41 void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
42 std::ostream &OS);
Duncan Sands79d28872007-12-03 20:06:50 +000043 void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints,
Dan Gohmanf17a25c2007-07-18 16:29:46 +000044 std::ostream &OS);
Dan Gohmanf17a25c2007-07-18 16:29:46 +000045 void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints,
46 std::ostream &OS);
47 void EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints,
48 std::ostream &OS);
49 };
50
51} // End llvm namespace
52
53#endif
54
55
56