llvm/llvm/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp

//===-- NVPTXReplaceImageHandles.cpp - Replace image handles for Fermi ----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// On Fermi, image handles are not supported. To work around this, we traverse
// the machine code and replace image handles with concrete symbols. For this
// to work reliably, inlining of all function call must be performed.
//
//===----------------------------------------------------------------------===//
#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() {}