From d6b7a242d345fd79a337afd384bb586c5619cfe7 Mon Sep 17 00:00:00 2001 From: Nate Begeman Date: Wed, 18 Feb 2009 08:31:02 +0000 Subject: Add support to the JIT for true non-lazy operation. When a call to a function that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64906 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachOWriter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/MachOWriter.cpp') diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp index ef37db8ac9..22c21578ec 100644 --- a/lib/CodeGen/MachOWriter.cpp +++ b/lib/CodeGen/MachOWriter.cpp @@ -147,6 +147,11 @@ namespace llvm { assert(0 && "JIT specific function called!"); abort(); } + virtual void startGVStub(const GlobalValue* F, void *Buffer, + unsigned StubSize) { + assert(0 && "JIT specific function called!"); + abort(); + } virtual void *finishGVStub(const GlobalValue* F) { assert(0 && "JIT specific function called!"); abort(); -- cgit v1.2.3