[PowerPC] Materialize more constants with CR-field set in late peephole
[llvm-core.git] / lib / Target / AMDGPU / AMDGPUIntrinsicInfo.h
blobef42f9a319af69ca3541040e0f15ef09d6e7790a
1 //===- AMDGPUIntrinsicInfo.h - AMDGPU Intrinsic Information ------*- C++ -*-===//
2 //
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 /// Interface for the AMDGPU Implementation of the Intrinsic Info class.
13 //===-----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_AMDGPU_AMDGPUINTRINSICINFO_H
15 #define LLVM_LIB_TARGET_AMDGPU_AMDGPUINTRINSICINFO_H
17 #include "llvm/IR/Intrinsics.h"
18 #include "llvm/Target/TargetIntrinsicInfo.h"
20 namespace llvm {
21 class TargetMachine;
23 namespace AMDGPUIntrinsic {
24 enum ID {
25 last_non_AMDGPU_intrinsic = Intrinsic::num_intrinsics - 1,
26 #define GET_INTRINSIC_ENUM_VALUES
27 #include "AMDGPUGenIntrinsicEnums.inc"
28 #undef GET_INTRINSIC_ENUM_VALUES
29 , num_AMDGPU_intrinsics
32 } // end namespace AMDGPUIntrinsic
34 class AMDGPUIntrinsicInfo final : public TargetIntrinsicInfo {
35 public:
36 AMDGPUIntrinsicInfo();
38 StringRef getName(unsigned IntrId, ArrayRef<Type *> Tys = None) const;
40 std::string getName(unsigned IntrId, Type **Tys = nullptr,
41 unsigned NumTys = 0) const override;
43 unsigned lookupName(const char *Name, unsigned Len) const override;
44 bool isOverloaded(unsigned IID) const override;
45 Function *getDeclaration(Module *M, unsigned ID,
46 Type **Tys = nullptr,
47 unsigned NumTys = 0) const override;
49 Function *getDeclaration(Module *M, unsigned ID,
50 ArrayRef<Type *> = None) const;
52 FunctionType *getType(LLVMContext &Context, unsigned ID,
53 ArrayRef<Type*> Tys = None) const;
56 } // end namespace llvm
58 #endif