It is no longer used.
FunctionPass *createSICodeEmitterPass(formatted_raw_ostream &OS);
FunctionPass *createAMDGPULowerInstructionsPass(TargetMachine &tm);
- FunctionPass *createAMDGPULowerShaderInstructionsPass(TargetMachine &tm);
FunctionPass *createAMDGPUDelimitInstGroupsPass(TargetMachine &tm);
+++ /dev/null
-//===-- AMDGPULowerShaderInstructions.cpp - TODO: Add brief description -------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// TODO: Add full description
-//
-//===----------------------------------------------------------------------===//
-
-
-#include "AMDGPULowerShaderInstructions.h"
-#include "llvm/CodeGen/MachineFunction.h"
-#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "llvm/CodeGen/MachineRegisterInfo.h"
-#include "llvm/Target/TargetInstrInfo.h"
-
-using namespace llvm;
-
-void AMDGPULowerShaderInstructionsPass::preloadRegister(MachineFunction * MF,
- const TargetInstrInfo * TII, unsigned physReg, unsigned virtReg) const
-{
- if (!MRI->isLiveIn(physReg)) {
- MRI->addLiveIn(physReg, virtReg);
- MachineBasicBlock &EntryMBB = MF->front();
- BuildMI(MF->front(), EntryMBB.begin(), DebugLoc(), TII->get(TargetOpcode::COPY),
- virtReg)
- .addReg(physReg);
- } else {
- /* We can't mark the same register as preloaded twice, but we still must
- * associate virtReg with the correct preloaded register. */
- unsigned newReg = MRI->getLiveInVirtReg(physReg);
- MRI->replaceRegWith(virtReg, newReg);
- }
-}
+++ /dev/null
-//===-- AMDGPULowerShaderInstructions.h - TODO: Add brief description -------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// TODO: Add full description
-//
-//===----------------------------------------------------------------------===//
-
-
-#ifndef AMDGPU_LOWER_SHADER_INSTRUCTIONS
-#define AMDGPU_LOWER_SHADER_INSTRUCTIONS
-
-namespace llvm {
-
-class MachineFunction;
-class MachineRegisterInfo;
-class TargetInstrInfo;
-
-class AMDGPULowerShaderInstructionsPass {
-
- protected:
- MachineRegisterInfo * MRI;
- /**
- * @param physReg The physical register that will be preloaded.
- * @param virtReg The virtual register that currently holds the
- * preloaded value.
- */
- void preloadRegister(MachineFunction * MF, const TargetInstrInfo * TII,
- unsigned physReg, unsigned virtReg) const;
-};
-
-} // end namespace llvm
-
-
-#endif // AMDGPU_LOWER_SHADER_INSTRUCTIONS
AMDGPUISelLowering.cpp \
AMDGPUConvertToISA.cpp \
AMDGPULowerInstructions.cpp \
- AMDGPULowerShaderInstructions.cpp \
AMDGPUInstrInfo.cpp \
AMDGPURegisterInfo.cpp \
AMDGPUUtil.cpp \
//===----------------------------------------------------------------------===//
#include "AMDGPU.h"
-#include "AMDGPULowerShaderInstructions.h"
#include "AMDGPUUtil.h"
#include "AMDIL.h"
#include "AMDILInstrInfo.h"
using namespace llvm;
namespace {
- class R600LowerShaderInstructionsPass : public MachineFunctionPass,
- public AMDGPULowerShaderInstructionsPass {
+ class R600LowerShaderInstructionsPass : public MachineFunctionPass {
private:
static char ID;
TargetMachine &TM;
+ MachineRegisterInfo * MRI;
void lowerEXPORT_REG_FAKE(MachineInstr &MI, MachineBasicBlock &MBB,
MachineBasicBlock::iterator I);
#include "AMDGPU.h"
-#include "AMDGPULowerShaderInstructions.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
using namespace llvm;
namespace {
- class SILowerShaderInstructionsPass : public MachineFunctionPass,
- public AMDGPULowerShaderInstructionsPass {
+ class SILowerShaderInstructionsPass : public MachineFunctionPass {
private:
static char ID;
TargetMachine &TM;
+ MachineRegisterInfo * MRI;
public:
SILowerShaderInstructionsPass(TargetMachine &tm) :