#include "NVPTX.h"
#include "NVPTXUtilities.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/Module.h"
#include "llvm/Pass.h"
usingnamespacellvm;
namespace {
class NVPTXImageOptimizer : public FunctionPass { … };
}
char NVPTXImageOptimizer::ID = …;
NVPTXImageOptimizer::NVPTXImageOptimizer()
: … { … }
bool NVPTXImageOptimizer::runOnFunction(Function &F) { … }
bool NVPTXImageOptimizer::replaceIsTypePSampler(Instruction &I) { … }
bool NVPTXImageOptimizer::replaceIsTypePSurface(Instruction &I) { … }
bool NVPTXImageOptimizer::replaceIsTypePTexture(Instruction &I) { … }
void NVPTXImageOptimizer::replaceWith(Instruction *From, ConstantInt *To) { … }
Value *NVPTXImageOptimizer::cleanupValue(Value *V) { … }
FunctionPass *llvm::createNVPTXImageOptimizerPass() { … }