blob: 1619d02242929635a92b9101fa92b60b84ea996c [file] [log] [blame]
Chris Lattner9e493cf2006-03-03 02:32:46 +00001//===- IntrinsicEmitter.h - Generate intrinsic information ------*- 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 Lattner9e493cf2006-03-03 02:32: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 Johannesen49de9822009-02-05 01:49:45 +000023 bool TargetOnly;
24 std::string TargetPrefix;
Chris Lattner9e493cf2006-03-03 02:32:46 +000025
26 public:
Dale Johannesen49de9822009-02-05 01:49:45 +000027 IntrinsicEmitter(RecordKeeper &R, bool T = false)
28 : Records(R), TargetOnly(T) {}
Chris Lattner9e493cf2006-03-03 02:32:46 +000029
30 void run(std::ostream &OS);
31
32 void EmitEnumInfo(const std::vector<CodeGenIntrinsic> &Ints,
33 std::ostream &OS);
Chris Lattner9b843b22006-03-09 20:34:19 +000034
35 void EmitFnNameRecognizer(const std::vector<CodeGenIntrinsic> &Ints,
36 std::ostream &OS);
Chris Lattnerfda6aff2006-03-15 01:55:21 +000037 void EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints,
38 std::ostream &OS);
Mon P Wang0d52ff12009-02-24 23:17:49 +000039 void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints,
40 std::ostream &OS);
Chris Lattnerf97a00e2006-03-09 22:05:04 +000041 void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints,
42 std::ostream &OS);
Jim Laskey95af5922007-02-07 20:38:26 +000043 void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints,
44 std::ostream &OS);
Duncan Sandsa3355ff2007-12-03 20:06:50 +000045 void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints,
Chris Lattner6448ee42006-03-09 22:30:49 +000046 std::ostream &OS);
Duncan Sandsd869b382009-02-14 10:56:35 +000047 void EmitModRefBehavior(const std::vector<CodeGenIntrinsic> &Ints,
48 std::ostream &OS);
Chris Lattner022f64f2006-03-13 23:08:44 +000049 void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints,
50 std::ostream &OS);
Chris Lattner3f8b8912006-03-15 01:33:26 +000051 void EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints,
52 std::ostream &OS);
Chris Lattner9e493cf2006-03-03 02:32:46 +000053 };
54
55} // End llvm namespace
56
57#endif
58
59
60