Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 1 | //===- IntrinsicEmitter.h - Generate intrinsic information ------*- C++ -*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
Chris Lattner | 3060910 | 2007-12-29 20:37:13 +0000 | [diff] [blame] | 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 7 | // |
| 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 | |
| 20 | namespace llvm { |
| 21 | class IntrinsicEmitter : public TableGenBackend { |
| 22 | RecordKeeper &Records; |
Dale Johannesen | 49de982 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 23 | bool TargetOnly; |
| 24 | std::string TargetPrefix; |
Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 25 | |
| 26 | public: |
Dale Johannesen | 49de982 | 2009-02-05 01:49:45 +0000 | [diff] [blame] | 27 | IntrinsicEmitter(RecordKeeper &R, bool T = false) |
| 28 | : Records(R), TargetOnly(T) {} |
Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 29 | |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 30 | void run(raw_ostream &OS); |
Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 31 | |
| 32 | void EmitEnumInfo(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 33 | raw_ostream &OS); |
Chris Lattner | 9b843b2 | 2006-03-09 20:34:19 +0000 | [diff] [blame] | 34 | |
| 35 | void EmitFnNameRecognizer(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 36 | raw_ostream &OS); |
Chris Lattner | fda6aff | 2006-03-15 01:55:21 +0000 | [diff] [blame] | 37 | void EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 38 | raw_ostream &OS); |
Mon P Wang | 0d52ff1 | 2009-02-24 23:17:49 +0000 | [diff] [blame] | 39 | void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 40 | raw_ostream &OS); |
Chris Lattner | f97a00e | 2006-03-09 22:05:04 +0000 | [diff] [blame] | 41 | void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 42 | raw_ostream &OS); |
Jim Laskey | 95af592 | 2007-02-07 20:38:26 +0000 | [diff] [blame] | 43 | void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 44 | raw_ostream &OS); |
Duncan Sands | a3355ff | 2007-12-03 20:06:50 +0000 | [diff] [blame] | 45 | void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 46 | raw_ostream &OS); |
Duncan Sands | d869b38 | 2009-02-14 10:56:35 +0000 | [diff] [blame] | 47 | void EmitModRefBehavior(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 48 | raw_ostream &OS); |
Chris Lattner | 022f64f | 2006-03-13 23:08:44 +0000 | [diff] [blame] | 49 | void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 50 | raw_ostream &OS); |
Chris Lattner | 3f8b891 | 2006-03-15 01:33:26 +0000 | [diff] [blame] | 51 | void EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints, |
Daniel Dunbar | 1a55180 | 2009-07-03 00:10:29 +0000 | [diff] [blame^] | 52 | raw_ostream &OS); |
Chris Lattner | 9e493cf | 2006-03-03 02:32:46 +0000 | [diff] [blame] | 53 | }; |
| 54 | |
| 55 | } // End llvm namespace |
| 56 | |
| 57 | #endif |
| 58 | |
| 59 | |
| 60 | |