JITCodeEmitter patch - up for comments

This is the JITCodeEmitter patch, this is to facilitate cordening off the JIT code from the
future direct object emission code (i) supporting the upcoming ObjectCodeEmitter
class, on the X86, ARM, Alpha, and PowerPC platforms. This involves generic
parameterization of backend code emitters to allow code emission to allotted
class types, JITCodeEmitter and ObjectCodeEmitter.

include/llvm/CodeGen/MachineCodeEmitter.h

  • untouched until ObjectCodeEmitter takes over its functionality in the
    MachO backend, then it will become an abstract class.

include/llvm/CodeGen/JITCodeEmitter.h

  • new file - JITCodeEmitter inherits from MachineCodeEmitter, this divides
    and isolates off and takes over JIT code emission, JIT functionality, and
    facilitates future JIT developments.

include/llvm/Target/TargetJITInfo.h

  • Replace references to MachineCodeEmitter instead of JITCodeEmitter.

include/llvm/Target/TargetMachine.h
lib/CodeGen/LLVMTargetMachine.cpp

  • added suport for JITCodeEmitter

lib/Target/X86/X86.h
lib/Target/X86/X86TargetMachine.h
lib/Target/X86/X86TargetMachine.cpp
lib/Target/X86/X86CodeEmitter.cpp

  • Parameterized to support JITCodeEmitter and in future ObjectCodeEmitter

lib/Target/X86/X86JITInfo.h
lib/Target/X86/X86JITInfo.cpp

  • Replaced references to MachineCodeEmitter with JITCodeEmitter.

lib/Target/PowerPC/PPC.h
lib/Target/PowerPC/PPCTargetMachine.h
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/PowerPC/PPCCodeEmitter.cpp

  • Parameterized to support JITCodeEmitter and in future ObjectCodeEmitter

lib/Target/PowerPC/PPCJITInfo.h
lib/Target/PowerPC/PPCJITInfo.cpp

  • Replaced references to MachineCodeEmitter with JITCodeEmitter.

lib/Target/ARM/ARM.h
lib/Target/ARM/ARMTargetMachine.h
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/ARMCodeEmitter.cpp

  • Parameterized to support JITCodeEmitter and in future ObjectCodeEmitter

lib/Target/ARM/ARMJITInfo.h
lib/Target/ARM/ARMJITInfo.cpp

  • Replaced references to MachineCodeEmitter with JITCodeEmitter.

lib/Target/Alpha/Alpha.h
lib/Target/Alpha/AlphaTargetMachine.h
lib/Target/Alpha/AlphaTargetMachine.cpp
lib/Target/Alpha/AlphaCodeEmitter.cpp

  • Parameterized to support JITCodeEmitter and in future ObjectCodeEmitter

lib/Target/Alpha/AlphaJITInfo.h
lib/Target/Alpha/AlphaJITInfo.cpp

  • Replaced references to MachineCodeEmitter with JITCodeEmitter.

lib/ExecutionEngine/JIT/JIT.h
lib/ExecutionEngine/JIT/JIT.cpp
lib/ExecutionEngine/JIT/JITEmitter.cpp
lib/ExecutionEngine/JIT/JITDwarfEmitter.h
lib/ExecutionEngine/JIT/JITDwarfEmitter.cpp

  • Modified to use JITCodeEmitter instead of MachineCodeEmitter

(i) http://wiki.llvm.org/Direct_Object_Code_Emission

JITCodeEmitter.patch (113 KB)