1 //===-- llvm/Target/TargetIntrinsicInfo.h - Instruction Info ----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the target intrinsic instructions to the code generator.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_TARGET_TARGETINTRINSICINFO_H
15 #define LLVM_TARGET_TARGETINTRINSICINFO_H
23 //---------------------------------------------------------------------------
25 /// TargetIntrinsicInfo - Interface to description of machine instruction set
27 class TargetIntrinsicInfo {
29 const char **Intrinsics; // Raw array to allow static init'n
30 unsigned NumIntrinsics; // Number of entries in the desc array
32 TargetIntrinsicInfo(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT
33 void operator=(const TargetIntrinsicInfo &); // DO NOT IMPLEMENT
35 TargetIntrinsicInfo(const char **desc, unsigned num);
36 virtual ~TargetIntrinsicInfo();
38 unsigned getNumIntrinsics() const { return NumIntrinsics; }
40 virtual Function *getDeclaration(Module *M, const char *BuiltinName) const {
44 // Returns the Function declaration for intrinsic BuiltinName. If the
45 // intrinsic can be overloaded, uses Tys to return the correct function.
46 virtual Function *getDeclaration(Module *M, const char *BuiltinName,
47 const Type **Tys, unsigned numTys) const {
51 // Returns true if the Builtin can be overloaded.
52 virtual bool isOverloaded(Module *M, const char *BuiltinName) const {
56 virtual unsigned getIntrinsicID(Function *F) const { return 0; }
59 } // End llvm namespace