Home | History | Annotate | Download | only in JIT

Lines Matching refs:Function

21 #include "llvm/Function.h"
39 Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
43 Function *F = Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M);
54 std::string DumpFunction(const Function *F) {
74 StartFunctionBodyCall(uint8_t *Result, const Function *F,
79 const Function *F;
85 virtual uint8_t *startFunctionBody(const Function *F,
100 EndFunctionBodyCall(const Function *F, uint8_t *FunctionStart,
104 const Function *F;
110 virtual void endFunctionBody(const Function *F, uint8_t *FunctionStart,
141 StartExceptionTableCall(uint8_t *Result, const Function *F,
146 const Function *F;
152 virtual uint8_t* startExceptionTable(const Function* F,
161 EndExceptionTableCall(const Function *F, uint8_t *TableStart,
166 const Function *F;
173 virtual void endExceptionTable(const Function *F, uint8_t *TableStart,
216 // memory block used for the function, and when the function code was freed,
217 // the global was left in the same place. This test allocates a function
248 // Make a function that points to a global.
249 Function *F1 = makeReturnGlobal("F1", G, M);
251 // Get the pointer to the native code to force it to JIT the function and
265 // Make a second function identical to the first, referring to the same
267 Function *F2 = makeReturnGlobal("F2", G, M);
298 Function *KnownFunction = Function::Create(
304 Function *TestFunction = Function::Create(
321 // Test a function C which calls A and B which call each other.
331 Function *Func1 = Function::Create(Func1Ty, Function::ExternalLinkage,
333 Function *Func2 = Function::Create(FuncTy, Function::InternalLinkage,
335 Function *Func3 = Function::Create(FuncTy, Function::InternalLinkage,
369 // Compile the function to native code
377 // JIT's Function to stub mapping.
384 Function *Func1 = Function::Create(FuncTy, Function::ExternalLinkage,
386 Function *Func2 = Function::Create(FuncTy, Function::InternalLinkage,
391 // The first function calls the second and returns the result
396 // The second function just returns a constant
400 // Compile the function to native code
407 // Delete the first function (and show that is has no users)
411 // Delete the second function (and show that it has no users - it had one,
427 Function *func = M->getFunction("main");
440 << "Function leaked: \n" << RJMM->startFunctionBodyCalls[i].F_dump;
460 << "Function's exception table leaked: \n"
492 Function *foo = M->getFunction("foo");
501 Function *func = M->getFunction("main");
504 Function *bar = M->getFunction("bar");
520 Function *F_get_foo_addr = M->getFunction("get_foo_addr");
538 Function *F_foo = M->getFunction("foo");
549 Function *F = Function::Create(TypeBuilder<int(void), false>::get(Context),
557 // Compile the function once, and make sure it works.
562 // Now change the function to return a different value.
568 // Recompile it, which should produce a new function pointer _and_ update the
574 << "The new pointer should call the new version of the function";
597 Function *loaderIR = M->getFunction("loader");
606 // This function is intentionally defined differently in the statically-compiled
628 Function *funcIR = M->getFunction("func");
648 Function *get_stubIR = M->getFunction("get_stub");
723 Function *funcIR = M->getFunction("func");
724 Function *availableFunctionIR =
727 // Double-check that the available_externally function is still unmaterialized
762 Function *recur1IR = M->getFunction("recur1");
763 Function *recur2IR = M->getFunction("recur2");