Mercurial > hg > CbC > CbC_llvm
comparison lib/Target/NVPTX/NVPTXUtilities.h @ 77:54457678186b LLVM3.6
LLVM 3.6
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Sep 2014 22:06:00 +0900 |
parents | 95c75e76d11b |
children | 7d135dc70f03 |
comparison
equal
deleted
inserted
replaced
34:e874dbf0ad9d | 77:54457678186b |
---|---|
9 // | 9 // |
10 // This file contains the declaration of the NVVM specific utility functions. | 10 // This file contains the declaration of the NVVM specific utility functions. |
11 // | 11 // |
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #ifndef NVPTXUTILITIES_H | 14 #ifndef LLVM_LIB_TARGET_NVPTX_NVPTXUTILITIES_H |
15 #define NVPTXUTILITIES_H | 15 #define LLVM_LIB_TARGET_NVPTX_NVPTXUTILITIES_H |
16 | 16 |
17 #include "llvm/IR/Function.h" | 17 #include "llvm/IR/Function.h" |
18 #include "llvm/IR/GlobalVariable.h" | 18 #include "llvm/IR/GlobalVariable.h" |
19 #include "llvm/IR/IntrinsicInst.h" | 19 #include "llvm/IR/IntrinsicInst.h" |
20 #include "llvm/IR/Value.h" | 20 #include "llvm/IR/Value.h" |
26 namespace llvm { | 26 namespace llvm { |
27 | 27 |
28 #define NVCL_IMAGE2D_READONLY_FUNCNAME "__is_image2D_readonly" | 28 #define NVCL_IMAGE2D_READONLY_FUNCNAME "__is_image2D_readonly" |
29 #define NVCL_IMAGE3D_READONLY_FUNCNAME "__is_image3D_readonly" | 29 #define NVCL_IMAGE3D_READONLY_FUNCNAME "__is_image3D_readonly" |
30 | 30 |
31 void clearAnnotationCache(const llvm::Module *); | |
32 | |
31 bool findOneNVVMAnnotation(const llvm::GlobalValue *, std::string, unsigned &); | 33 bool findOneNVVMAnnotation(const llvm::GlobalValue *, std::string, unsigned &); |
32 bool findAllNVVMAnnotation(const llvm::GlobalValue *, std::string, | 34 bool findAllNVVMAnnotation(const llvm::GlobalValue *, std::string, |
33 std::vector<unsigned> &); | 35 std::vector<unsigned> &); |
34 | 36 |
35 bool isTexture(const llvm::Value &); | 37 bool isTexture(const llvm::Value &); |
36 bool isSurface(const llvm::Value &); | 38 bool isSurface(const llvm::Value &); |
37 bool isSampler(const llvm::Value &); | 39 bool isSampler(const llvm::Value &); |
38 bool isImage(const llvm::Value &); | 40 bool isImage(const llvm::Value &); |
39 bool isImageReadOnly(const llvm::Value &); | 41 bool isImageReadOnly(const llvm::Value &); |
40 bool isImageWriteOnly(const llvm::Value &); | 42 bool isImageWriteOnly(const llvm::Value &); |
43 bool isImageReadWrite(const llvm::Value &); | |
44 bool isManaged(const llvm::Value &); | |
41 | 45 |
42 std::string getTextureName(const llvm::Value &); | 46 std::string getTextureName(const llvm::Value &); |
43 std::string getSurfaceName(const llvm::Value &); | 47 std::string getSurfaceName(const llvm::Value &); |
44 std::string getSamplerName(const llvm::Value &); | 48 std::string getSamplerName(const llvm::Value &); |
45 | 49 |