#include "MCTargetDesc/NVPTXBaseInfo.h"
#include "NVPTX.h"
#include "NVPTXMachineFunctionInfo.h"
#include "NVPTXSubtarget.h"
#include "NVPTXTargetMachine.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
namespace {
class NVPTXReplaceImageHandles : public MachineFunctionPass { … };
}
char NVPTXReplaceImageHandles::ID = …;
NVPTXReplaceImageHandles::NVPTXReplaceImageHandles()
: … { … }
bool NVPTXReplaceImageHandles::runOnMachineFunction(MachineFunction &MF) { … }
static unsigned suldRegisterToIndexOpcode(unsigned RegOC) { … }
static unsigned sustRegisterToIndexOpcode(unsigned RegOC) { … }
static unsigned texRegisterToIndexOpcode(unsigned RegOC) { … }
static unsigned samplerRegisterToIndexOpcode(unsigned RegOC) { … }
static unsigned queryRegisterToIndexOpcode(unsigned RegOC) { … }
bool NVPTXReplaceImageHandles::processInstr(MachineInstr &MI) { … }
bool NVPTXReplaceImageHandles::replaceImageHandle(MachineOperand &Op,
MachineFunction &MF) { … }
bool NVPTXReplaceImageHandles::
findIndexForHandle(MachineOperand &Op, MachineFunction &MF, unsigned &Idx) { … }
MachineFunctionPass *llvm::createNVPTXReplaceImageHandlesPass() { … }