diff options
Diffstat (limited to 'utils/TableGen/IntrinsicEmitter.h')
-rw-r--r-- | utils/TableGen/IntrinsicEmitter.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.h b/utils/TableGen/IntrinsicEmitter.h new file mode 100644 index 0000000000000..1619d02242929 --- /dev/null +++ b/utils/TableGen/IntrinsicEmitter.h @@ -0,0 +1,60 @@ +//===- IntrinsicEmitter.h - Generate intrinsic information ------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This tablegen backend emits information about intrinsic functions. +// +//===----------------------------------------------------------------------===// + +#ifndef INTRINSIC_EMITTER_H +#define INTRINSIC_EMITTER_H + +#include "CodeGenIntrinsics.h" +#include "TableGenBackend.h" + +namespace llvm { + class IntrinsicEmitter : public TableGenBackend { + RecordKeeper &Records; + bool TargetOnly; + std::string TargetPrefix; + + public: + IntrinsicEmitter(RecordKeeper &R, bool T = false) + : Records(R), TargetOnly(T) {} + + void run(std::ostream &OS); + + void EmitEnumInfo(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + + void EmitFnNameRecognizer(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitIntrinsicToNameTable(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitIntrinsicToOverloadTable(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitVerifier(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitGenerator(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitAttributes(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitModRefBehavior(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitGCCBuiltinList(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + void EmitIntrinsicToGCCBuiltinMap(const std::vector<CodeGenIntrinsic> &Ints, + std::ostream &OS); + }; + +} // End llvm namespace + +#endif + + + |