1 //===- IntrinsicEmitter.h - Generate intrinsic information ------*- 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 information about intrinsic functions. 11 // 12 //===----------------------------------------------------------------------===// 13 14 #ifndef INTRINSIC_EMITTER_H 15 #define INTRINSIC_EMITTER_H 16 17 #include "CodeGenIntrinsics.h" 18 #include "llvm/TableGen/TableGenBackend.h" 19 20 namespace llvm { 21 class IntrinsicEmitter : public TableGenBackend { 22 RecordKeeper &Records; 23 bool TargetOnly; 24 std::string TargetPrefix; 25 26 public: 27 IntrinsicEmitter(RecordKeeper &R, bool T = false) Records(R)28 : Records(R), TargetOnly(T) {} 29 30 void run(raw_ostream &OS); 31 32 void EmitPrefix(raw_ostream &OS); 33 34 void EmitEnumInfo(const std::vector<CodeGenIntrinsic> &Ints, 35 raw_ostream &OS); 36 37 void EmitFnNameRecognizer(const std::vector<CodeGenIntrinsic> &Ints, 38 raw_ostream &OS); 39 void EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints, 40 raw_ostream &OS); 41 void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints, 42 raw_ostream &OS); 43 void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints, 44 raw_ostream &OS); 45 void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints, 46 raw_ostream &OS); 47 void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, 48 raw_ostream &OS); 49 void EmitModRefBehavior(const std::vector<CodeGenIntrinsic> &Ints, 50 raw_ostream &OS); 51 void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints, 52 raw_ostream &OS); 53 void EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints, 54 raw_ostream &OS); 55 void EmitSuffix(raw_ostream &OS); 56 }; 57 58 } // End llvm namespace 59 60 #endif 61 62 63 64