blob: 4c95b5ec0974ad2756be2a9c11c96b0394b61c6f [file] [log] [blame]
Matt Arsenaultc791f392014-06-23 18:00:31 +00001//===- AMDGPUIntrinsicInfo.h - AMDGPU Intrinsic Information ------*- C++ -*-===//
Tom Stellard75aadc22012-12-11 21:25:42 +00002//
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/// \file
11/// \brief Interface for the AMDGPU Implementation of the Intrinsic Info class.
12//
13//===-----------------------------------------------------------------------===//
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000014#ifndef LLVM_LIB_TARGET_R600_AMDGPUINTRINSICINFO_H
15#define LLVM_LIB_TARGET_R600_AMDGPUINTRINSICINFO_H
Tom Stellard75aadc22012-12-11 21:25:42 +000016
Chandler Carruth9fb823b2013-01-02 11:36:10 +000017#include "llvm/IR/Intrinsics.h"
Tom Stellard75aadc22012-12-11 21:25:42 +000018#include "llvm/Target/TargetIntrinsicInfo.h"
19
20namespace llvm {
21class TargetMachine;
22
23namespace AMDGPUIntrinsic {
24enum ID {
25 last_non_AMDGPU_intrinsic = Intrinsic::num_intrinsics - 1,
26#define GET_INTRINSIC_ENUM_VALUES
27#include "AMDGPUGenIntrinsics.inc"
28#undef GET_INTRINSIC_ENUM_VALUES
29 , num_AMDGPU_intrinsics
30};
31
32} // end namespace AMDGPUIntrinsic
33
34class AMDGPUIntrinsicInfo : public TargetIntrinsicInfo {
35public:
Eric Christopherac4b69e2014-07-25 22:22:39 +000036 AMDGPUIntrinsicInfo();
Matt Arsenaultc791f392014-06-23 18:00:31 +000037 std::string getName(unsigned IntrId, Type **Tys = nullptr,
38 unsigned numTys = 0) const override;
39 unsigned lookupName(const char *Name, unsigned Len) const override;
40 bool isOverloaded(unsigned IID) const override;
41 Function *getDeclaration(Module *M, unsigned ID,
Craig Toppere73658d2014-04-28 04:05:08 +000042 Type **Tys = nullptr,
Matt Arsenaultc791f392014-06-23 18:00:31 +000043 unsigned numTys = 0) const override;
Tom Stellard75aadc22012-12-11 21:25:42 +000044};
45
46} // end namespace llvm
47
Benjamin Kramera7c40ef2014-08-13 16:26:38 +000048#endif