diff options
author | Chris Lattner <sabre@nondot.org> | 2003-01-13 00:14:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-01-13 00:14:55 +0000 |
commit | 29dd209228125b7ae7431edb9278b6038ef4a87f (patch) | |
tree | 5c4a350f328ada851cdad9e625da9849caf3dd72 /include/llvm/CodeGen/MachineCodeEmitter.h | |
parent | 63757f5fd01eb7808a4b33d46a04e89aa56fcf65 (diff) | |
download | external_llvm-29dd209228125b7ae7431edb9278b6038ef4a87f.zip external_llvm-29dd209228125b7ae7431edb9278b6038ef4a87f.tar.gz external_llvm-29dd209228125b7ae7431edb9278b6038ef4a87f.tar.bz2 |
* Add support for values in the constant pool
* Add support for functions referenced by name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5206 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineCodeEmitter.h')
-rw-r--r-- | include/llvm/CodeGen/MachineCodeEmitter.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h index 6f47726..572772d 100644 --- a/include/llvm/CodeGen/MachineCodeEmitter.h +++ b/include/llvm/CodeGen/MachineCodeEmitter.h @@ -10,8 +10,10 @@ #ifndef LLVM_CODEGEN_MACHINE_CODE_EMITTER_H #define LLVM_CODEGEN_MACHINE_CODE_EMITTER_H +#include <string> class MachineFunction; class MachineBasicBlock; +class MachineConstantPool; class Value; class GlobalValue; @@ -28,6 +30,10 @@ struct MachineCodeEmitter { /// virtual void finishFunction(MachineFunction &F) {} + /// emitConstantPool - This callback is invoked to output the constant pool + /// for the function. + virtual void emitConstantPool(MachineConstantPool *MCP) {} + /// startBasicBlock - This callback is invoked when a new basic block is about /// to be emitted. /// @@ -48,8 +54,17 @@ struct MachineCodeEmitter { /// address of a global value to machine code. This is important for indirect /// calls as well as accessing global variables. /// - virtual void emitGlobalAddress(GlobalValue *V) {} + virtual void emitGlobalAddress(GlobalValue *V, bool isPCRelative) {} + virtual void emitGlobalAddress(const std::string &Name, bool isPCRelative) {} + /// emitFunctionConstantValueAddress - This callback is invoked when the + /// address of a constant, which was spilled to memory, needs to be addressed. + /// This is used for constants which cannot be directly specified as operands + /// to instructions, such as large integer values on the sparc, or floating + /// point constants on the X86. + /// + virtual void emitFunctionConstantValueAddress(unsigned ConstantNum, + int Offset) {} /// createDebugMachineCodeEmitter - Return a dynamically allocated machine /// code emitter, which just prints the opcodes and fields out the cout. This |