#include "R600.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/Cloning.h"
usingnamespacellvm;
static StringRef GetImageSizeFunc = …;
static StringRef GetImageFormatFunc = …;
static StringRef GetImageResourceIDFunc = …;
static StringRef GetSamplerResourceIDFunc = …;
static StringRef ImageSizeArgMDType = …;
static StringRef ImageFormatArgMDType = …;
static StringRef KernelsMDNodeName = …;
static StringRef KernelArgMDNodeNames[] = …;
static const unsigned NumKernelArgMDNodes = …;
namespace {
MDVector;
struct KernelArgMD { … };
}
static inline bool
IsImageType(StringRef TypeString) { … }
static inline bool
IsSamplerType(StringRef TypeString) { … }
static Function *
GetFunctionFromMDNode(MDNode *Node) { … }
static StringRef
AccessQualFromMD(MDNode *KernelMDNode, unsigned ArgIdx) { … }
static StringRef
ArgTypeFromMD(MDNode *KernelMDNode, unsigned ArgIdx) { … }
static MDVector
GetArgMD(MDNode *KernelMDNode, unsigned OpIdx) { … }
static void
PushArgMD(KernelArgMD &MD, const MDVector &V) { … }
namespace {
class R600OpenCLImageTypeLoweringPass : public ModulePass { … };
}
char R600OpenCLImageTypeLoweringPass::ID = …;
ModulePass *llvm::createR600OpenCLImageTypeLoweringPass() { … }