mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 16:16:45 +00:00
R600: Register R600EmitClauseMarkers pass
This enables -print-before-all to dump MachineInstrs after it is run. Reviewed-by: Vincent Lejeune <vljn at ovi.com> llvm-svn: 197056
This commit is contained in:
parent
e6b3d37d36
commit
22354cfe07
@ -28,7 +28,7 @@ class TargetMachine;
|
||||
FunctionPass *createR600VectorRegMerger(TargetMachine &tm);
|
||||
FunctionPass *createR600TextureIntrinsicsReplacer();
|
||||
FunctionPass *createR600ExpandSpecialInstrsPass(TargetMachine &tm);
|
||||
FunctionPass *createR600EmitClauseMarkers(TargetMachine &tm);
|
||||
FunctionPass *createR600EmitClauseMarkers();
|
||||
FunctionPass *createR600ClauseMergePass(TargetMachine &tm);
|
||||
FunctionPass *createR600Packetizer(TargetMachine &tm);
|
||||
FunctionPass *createR600ControlFlowFinalizer(TargetMachine &tm);
|
||||
|
@ -168,7 +168,7 @@ bool AMDGPUPassConfig::addPreSched2() {
|
||||
const AMDGPUSubtarget &ST = TM->getSubtarget<AMDGPUSubtarget>();
|
||||
|
||||
if (ST.getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS)
|
||||
addPass(createR600EmitClauseMarkers(*TM));
|
||||
addPass(createR600EmitClauseMarkers());
|
||||
if (ST.isIfCvtEnabled())
|
||||
addPass(&IfConverterID);
|
||||
if (ST.getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS)
|
||||
|
@ -25,12 +25,15 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
void initializeR600EmitClauseMarkersPass(PassRegistry&);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
class R600EmitClauseMarkersPass : public MachineFunctionPass {
|
||||
class R600EmitClauseMarkers : public MachineFunctionPass {
|
||||
|
||||
private:
|
||||
static char ID;
|
||||
const R600InstrInfo *TII;
|
||||
int Address;
|
||||
|
||||
@ -287,8 +290,11 @@ private:
|
||||
}
|
||||
|
||||
public:
|
||||
R600EmitClauseMarkersPass(TargetMachine &tm) : MachineFunctionPass(ID),
|
||||
TII(0), Address(0) { }
|
||||
static char ID;
|
||||
R600EmitClauseMarkers() : MachineFunctionPass(ID), TII(0), Address(0) {
|
||||
|
||||
initializeR600EmitClauseMarkersPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF) {
|
||||
TII = static_cast<const R600InstrInfo *>(MF.getTarget().getInstrInfo());
|
||||
@ -314,12 +320,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
char R600EmitClauseMarkersPass::ID = 0;
|
||||
char R600EmitClauseMarkers::ID = 0;
|
||||
|
||||
} // end anonymous namespace
|
||||
|
||||
INITIALIZE_PASS_BEGIN(R600EmitClauseMarkers, "emitclausemarkers",
|
||||
"R600 Emit Clause Markters", false, false)
|
||||
INITIALIZE_PASS_END(R600EmitClauseMarkers, "emitclausemarkers",
|
||||
"R600 Emit Clause Markters", false, false)
|
||||
|
||||
llvm::FunctionPass *llvm::createR600EmitClauseMarkers(TargetMachine &TM) {
|
||||
return new R600EmitClauseMarkersPass(TM);
|
||||
llvm::FunctionPass *llvm::createR600EmitClauseMarkers() {
|
||||
return new R600EmitClauseMarkers();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user