Deleted Added
full compact
JIT.h (198090) JIT.h (198892)
1//===-- JIT.h - Class definition for the JIT --------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 114 unchanged lines hidden (view full) ---

123 //
124 static void CompilationCallback();
125
126 /// getPointerToFunction - This returns the address of the specified function,
127 /// compiling it if necessary.
128 ///
129 void *getPointerToFunction(Function *F);
130
1//===-- JIT.h - Class definition for the JIT --------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 114 unchanged lines hidden (view full) ---

123 //
124 static void CompilationCallback();
125
126 /// getPointerToFunction - This returns the address of the specified function,
127 /// compiling it if necessary.
128 ///
129 void *getPointerToFunction(Function *F);
130
131 void *getPointerToBasicBlock(BasicBlock *BB) {
132 assert(0 && "JIT does not support address-of-label yet!");
133 return 0;
134 }
135
131 /// getOrEmitGlobalVariable - Return the address of the specified global
132 /// variable, possibly emitting it to memory if needed. This is used by the
133 /// Emitter.
134 void *getOrEmitGlobalVariable(const GlobalVariable *GV);
135
136 /// getPointerToFunctionOrStub - If the specified function has been
137 /// code-gen'd, return a pointer to the function. If not, compile it, or use
138 /// a stub to implement lazy compilation if available.

--- 39 unchanged lines hidden (view full) ---

178 virtual void RegisterJITEventListener(JITEventListener *L);
179 virtual void UnregisterJITEventListener(JITEventListener *L);
180 /// These functions correspond to the methods on JITEventListener. They
181 /// iterate over the registered listeners and call the corresponding method on
182 /// each.
183 void NotifyFunctionEmitted(
184 const Function &F, void *Code, size_t Size,
185 const JITEvent_EmittedFunctionDetails &Details);
136 /// getOrEmitGlobalVariable - Return the address of the specified global
137 /// variable, possibly emitting it to memory if needed. This is used by the
138 /// Emitter.
139 void *getOrEmitGlobalVariable(const GlobalVariable *GV);
140
141 /// getPointerToFunctionOrStub - If the specified function has been
142 /// code-gen'd, return a pointer to the function. If not, compile it, or use
143 /// a stub to implement lazy compilation if available.

--- 39 unchanged lines hidden (view full) ---

183 virtual void RegisterJITEventListener(JITEventListener *L);
184 virtual void UnregisterJITEventListener(JITEventListener *L);
185 /// These functions correspond to the methods on JITEventListener. They
186 /// iterate over the registered listeners and call the corresponding method on
187 /// each.
188 void NotifyFunctionEmitted(
189 const Function &F, void *Code, size_t Size,
190 const JITEvent_EmittedFunctionDetails &Details);
186 void NotifyFreeingMachineCode(const Function &F, void *OldPtr);
191 void NotifyFreeingMachineCode(void *OldPtr);
187
188private:
189 static JITCodeEmitter *createEmitter(JIT &J, JITMemoryManager *JMM,
190 TargetMachine &tm);
191 void runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked);
192 void updateFunctionStub(Function *F);
193 void updateDlsymStubTable();
194
195protected:
196
197 /// getMemoryforGV - Allocate memory for a global variable.
198 virtual char* getMemoryForGV(const GlobalVariable* GV);
199
200};
201
202} // End llvm namespace
203
204#endif
192
193private:
194 static JITCodeEmitter *createEmitter(JIT &J, JITMemoryManager *JMM,
195 TargetMachine &tm);
196 void runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked);
197 void updateFunctionStub(Function *F);
198 void updateDlsymStubTable();
199
200protected:
201
202 /// getMemoryforGV - Allocate memory for a global variable.
203 virtual char* getMemoryForGV(const GlobalVariable* GV);
204
205};
206
207} // End llvm namespace
208
209#endif