File tree Expand file tree Collapse file tree 2 files changed +15
-13
lines changed
llvm/lib/ExecutionEngine/JIT Expand file tree Collapse file tree 2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -265,19 +265,6 @@ void *JIT::getPointerToFunction(Function *F) {
265
265
return Addr;
266
266
}
267
267
268
- // getPointerToFunctionOrStub - If the specified function has been
269
- // code-gen'd, return a pointer to the function. If not, compile it, or use
270
- // a stub to implement lazy compilation if available.
271
- //
272
- void *JIT::getPointerToFunctionOrStub (Function *F) {
273
- // If we have already code generated the function, just return the address.
274
- if (void *Addr = getPointerToGlobalIfAvailable (F))
275
- return Addr;
276
-
277
- // Otherwise, if the target doesn't support it, just codegen the function.
278
- return getPointerToFunction (F);
279
- }
280
-
281
268
// / getOrEmitGlobalVariable - Return the address of the specified global
282
269
// / variable, possibly emitting it to memory if needed. This is used by the
283
270
// / Emitter.
Original file line number Diff line number Diff line change @@ -208,6 +208,21 @@ void *JITResolver::JITCompilerFn(void *Stub) {
208
208
}
209
209
210
210
211
+ // getPointerToFunctionOrStub - If the specified function has been
212
+ // code-gen'd, return a pointer to the function. If not, compile it, or use
213
+ // a stub to implement lazy compilation if available.
214
+ //
215
+ void *JIT::getPointerToFunctionOrStub (Function *F) {
216
+ // If we have already code generated the function, just return the address.
217
+ if (void *Addr = getPointerToGlobalIfAvailable (F))
218
+ return Addr;
219
+
220
+ // Get a stub if the target supports it
221
+ return getJITResolver (MCE).getFunctionStub (F);
222
+ }
223
+
224
+
225
+
211
226
// ===----------------------------------------------------------------------===//
212
227
// JITEmitter code.
213
228
//
You can’t perform that action at this time.
0 commit comments