mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
Added saveBBreferences() for BasicBlock resolution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7800b5458
commit
da3a8b19ce
@ -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