mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 07:39:31 +00:00
Added saveBBreferences() for BasicBlock resolution.
llvm-svn: 6451
This commit is contained in:
parent
62904a1538
commit
c5a1e94883
@ -10,7 +10,10 @@
|
||||
#ifndef LLVM_CODEGEN_MACHINE_CODE_EMITTER_H
|
||||
#define LLVM_CODEGEN_MACHINE_CODE_EMITTER_H
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
class BasicBlock;
|
||||
class MachineInstr;
|
||||
class MachineFunction;
|
||||
class MachineBasicBlock;
|
||||
class MachineConstantPool;
|
||||
@ -91,6 +94,11 @@ struct MachineCodeEmitter {
|
||||
///
|
||||
static MachineCodeEmitter*
|
||||
createFilePrinterMachineCodeEmitter(MachineCodeEmitter&);
|
||||
|
||||
///
|
||||
virtual void saveBBreference(BasicBlock* BB, MachineInstr &MI) {
|
||||
std::cerr << "Save BB reference unimplemented\n";
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -158,9 +158,7 @@ namespace {
|
||||
}
|
||||
}
|
||||
void emitPCRelativeDisp(Value *V) {
|
||||
// put block in mapping BB -> { instr, address }. when BB is beginning to
|
||||
// output, find instr, set disp, overwrite instr at addr using the
|
||||
// unsigned value gotten from emitter
|
||||
if (MCE) MCE->emitPCRelativeDisp(V);
|
||||
}
|
||||
|
||||
void emitGlobalAddress(GlobalValue *V, bool isPCRelative) {
|
||||
@ -173,9 +171,15 @@ namespace {
|
||||
void emitFunctionConstantValueAddress(unsigned ConstantNum, int Offset) {
|
||||
if (MCE) MCE->emitFunctionConstantValueAddress(ConstantNum, Offset);
|
||||
}
|
||||
|
||||
virtual void saveBBreference(BasicBlock* BB, MachineInstr &MI) {
|
||||
if (MCE) MCE->saveBBreference(BB, MI);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
MachineCodeEmitter *MachineCodeEmitter::createFilePrinterMachineCodeEmitter(MachineCodeEmitter &MCE) {
|
||||
MachineCodeEmitter *MachineCodeEmitter::createFilePrinterMachineCodeEmitter
|
||||
(MachineCodeEmitter &MCE) {
|
||||
return new FilePrinterMachineCodeEmitter(MCE, std::cerr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user