2003-05-08 03:33:54 +00:00
|
|
|
//===-- llvm/Instrinsics.h - LLVM Intrinsic Function Handling ---*- C++ -*-===//
|
2005-04-21 20:19:05 +00:00
|
|
|
//
|
2003-10-20 20:19:47 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-21 20:19:05 +00:00
|
|
|
//
|
2003-10-20 20:19:47 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2003-05-08 03:33:54 +00:00
|
|
|
//
|
|
|
|
// This file defines a set of enums which allow processing of intrinsic
|
|
|
|
// functions. Values of these enum types are returned by
|
|
|
|
// Function::getIntrinsicID.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_INTRINSICS_H
|
|
|
|
#define LLVM_INTRINSICS_H
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2007-04-01 07:26:35 +00:00
|
|
|
class Type;
|
2007-02-07 20:38:26 +00:00
|
|
|
class FunctionType;
|
|
|
|
class Function;
|
|
|
|
class Module;
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
/// Intrinsic Namespace - This namespace contains an enum with a value for
|
2003-06-03 15:30:13 +00:00
|
|
|
/// every intrinsic/builtin function known by LLVM. These enum values are
|
|
|
|
/// returned by Function::getIntrinsicID().
|
|
|
|
///
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace Intrinsic {
|
2003-05-08 03:33:54 +00:00
|
|
|
enum ID {
|
|
|
|
not_intrinsic = 0, // Must be zero
|
2003-05-17 22:26:33 +00:00
|
|
|
|
2006-03-09 20:03:31 +00:00
|
|
|
// Get the intrinsic enums generated from Intrinsics.td
|
|
|
|
#define GET_INTRINSIC_ENUM_VALUES
|
|
|
|
#include "llvm/Intrinsics.gen"
|
|
|
|
#undef GET_INTRINSIC_ENUM_VALUES
|
2006-03-25 06:32:07 +00:00
|
|
|
, num_intrinsics
|
2003-05-08 03:33:54 +00:00
|
|
|
};
|
2006-03-25 06:32:07 +00:00
|
|
|
|
|
|
|
/// Intrinsic::getName(ID) - Return the LLVM name for an intrinsic, such as
|
|
|
|
/// "llvm.ppc.altivec.lvx".
|
2007-04-01 07:26:35 +00:00
|
|
|
std::string getName(ID id, const Type **Tys = 0, unsigned numTys = 0);
|
2007-02-07 20:38:26 +00:00
|
|
|
|
|
|
|
/// Intrinsic::getType(ID) - Return the function type for an intrinsic.
|
|
|
|
///
|
2007-04-01 07:26:35 +00:00
|
|
|
const FunctionType *getType(ID id, const Type **Tys = 0, unsigned numTys = 0);
|
2007-02-07 20:38:26 +00:00
|
|
|
|
|
|
|
/// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function
|
|
|
|
/// declaration for an intrinsic, and return it.
|
2007-04-01 07:26:35 +00:00
|
|
|
Function *getDeclaration(Module *M, ID id, const Type **Tys = 0,
|
|
|
|
unsigned numTys = 0);
|
2007-02-07 20:38:26 +00:00
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End Intrinsic namespace
|
|
|
|
|
|
|
|
} // End llvm namespace
|
2003-05-08 03:33:54 +00:00
|
|
|
|
|
|
|
#endif
|