Home | History | Annotate | Download | only in JIT

Lines Matching refs:Function

20 #include "llvm/IR/Function.h"
38 Function *makeReturnGlobal(std::string Name, GlobalVariable *G, Module *M) {
42 Function *F = Function::Create(FTy, GlobalValue::ExternalLinkage, Name, M);
53 std::string DumpFunction(const Function *F) {
77 StartFunctionBodyCall(uint8_t *Result, const Function *F,
82 const Function *F;
88 virtual uint8_t *startFunctionBody(const Function *F,
103 EndFunctionBodyCall(const Function *F, uint8_t *FunctionStart,
107 const Function *F;
113 virtual void endFunctionBody(const Function *F, uint8_t *FunctionStart,
153 StartExceptionTableCall(uint8_t *Result, const Function *F,
158 const Function *F;
164 virtual uint8_t *startExceptionTable(const Function *F,
173 EndExceptionTableCall(const Function *F, uint8_t *TableStart,
178 const Function *F;
185 virtual void endExceptionTable(const Function *F, uint8_t *TableStart,
238 // memory block used for the function, and when the function code was freed,
239 // the global was left in the same place. This test allocates a function
270 // Make a function that points to a global.
271 Function *F1 = makeReturnGlobal("F1", G, M);
273 // Get the pointer to the native code to force it to JIT the function and
287 // Make a second function identical to the first, referring to the same
289 Function *F2 = makeReturnGlobal("F2", G, M);
309 // for an emitted function.
313 virtual uint8_t *startExceptionTable(const Function *F,
335 Function *F = Function::Create(TypeBuilder<void(void), false>::get(Context),
336 Function::ExternalLinkage,
362 Function *KnownFunction = Function::Create(
368 Function *TestFunction = Function::Create(
385 // Test a function C which calls A and B which call each other.
395 Function *Func1 = Function::Create(Func1Ty, Function::ExternalLinkage,
397 Function *Func2 = Function::Create(FuncTy, Function::InternalLinkage,
399 Function *Func3 = Function::Create(FuncTy, Function::InternalLinkage,
433 // Compile the function to native code
441 // JIT's Function to stub mapping.
448 Function *Func1 = Function::Create(FuncTy, Function::ExternalLinkage,
450 Function *Func2 = Function::Create(FuncTy, Function::InternalLinkage,
455 // The first function calls the second and returns the result
460 // The second function just returns a constant
464 // Compile the function to native code
471 // Delete the first function (and show that is has no users)
475 // Delete the second function (and show that it has no users - it had one,
491 Function *func = M->getFunction("main");
504 << "Function leaked: \n" << RJMM->startFunctionBodyCalls[i].F_dump;
524 << "Function's exception table leaked: \n"
557 Function *foo = M->getFunction("foo");
566 Function *func = M->getFunction("main");
569 Function *bar = M->getFunction("bar");
588 Function *F_get_foo_addr = M->getFunction("get_foo_addr");
606 Function *F_foo = M->getFunction("foo");
621 Function *F = Function::Create(TypeBuilder<int(void), false>::get(Context),
629 // Compile the function once, and make sure it works.
634 // Now change the function to return a different value.
640 // Recompile it, which should produce a new function pointer _and_ update the
646 << "The new pointer should call the new version of the function";
672 Function *loaderIR = M->getFunction("loader");
681 // This function is intentionally defined differently in the statically-compiled
704 Function *funcIR = M->getFunction("func");
724 Function *get_stubIR = M->getFunction("get_stub");
799 Function *funcIR = M->getFunction("func");
800 Function *availableFunctionIR =
803 // Double-check that the available_externally function is still unmaterialized
838 Function *recur1IR = M->getFunction("recur1");
839 Function *recur2IR = M->getFunction("recur2");