summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/AMDILIntrinsicInfo.h
blob: 072c26531d19508788dff57a10d67b11992d2e56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===- AMDILIntrinsicInfo.h - AMDIL Intrinsic Information ------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//==-----------------------------------------------------------------------===//
//
//   Interface for the AMDIL Implementation of the Intrinsic Info class.
//
//===-----------------------------------------------------------------------===//
#ifndef _AMDIL_INTRINSICS_H_
#define _AMDIL_INTRINSICS_H_

#include "llvm/Intrinsics.h"
#include "llvm/Target/TargetIntrinsicInfo.h"

namespace llvm {
  class TargetMachine;
  namespace AMDGPUIntrinsic {
    enum ID {
      last_non_AMDIL_intrinsic = Intrinsic::num_intrinsics - 1,
#define GET_INTRINSIC_ENUM_VALUES
#include "AMDGPUGenIntrinsics.inc"
#undef GET_INTRINSIC_ENUM_VALUES
      , num_AMDIL_intrinsics
    };

  }


  class AMDILIntrinsicInfo : public TargetIntrinsicInfo {
    TargetMachine *mTM;
    public:
      AMDILIntrinsicInfo(TargetMachine *tm);
      std::string getName(unsigned int IntrId, Type **Tys = 0,
          unsigned int numTys = 0) const;
      unsigned int lookupName(const char *Name, unsigned int Len) const;
      bool isOverloaded(unsigned int IID) const;
      Function *getDeclaration(Module *M, unsigned int ID,
          Type **Tys = 0,
          unsigned int numTys = 0) const;
      bool isValidIntrinsic(unsigned int) const;
  }; // AMDILIntrinsicInfo
}

#endif // _AMDIL_INTRINSICS_H_