Home | History | Annotate | Download | only in JIT

Lines Matching refs:Function

26 #include "llvm/IR/Function.h"
42 // to the function.
80 // libgcc defines the __register_frame function to dynamically register new
83 // function here so that code generated by the JIT cooperates with the unwinding
87 // The __register_frame function works with Linux.
162 /// libgcc,we provide our own function, which "tricks" libgcc by modifying the
229 /// bugpoint or gdb users to search for a function by name without any context.
245 //search function in every instance of JIT
249 if (Function *F = (*Jit)->FindFunctionNamed(Name))
252 // The function is not available : fallback on the first created (will
260 // getPointerToNamedFunction - This function is used as a global wrapper to
263 // need to resolve function(s) that are being mis-codegenerated, so we need to
387 /// run - Start execution with the specified function and arguments.
389 GenericValue JIT::runFunction(Function *F,
391 assert(F && "Function *F was null at entry to run()");
400 "Wrong number of arguments passed into function!");
415 // Call the function.
428 // Call the function.
456 default: llvm_unreachable("Unknown return type for function call!");
492 // full FFI, we have to codegen a nullary stub function that just calls the
493 // function we are interested in, passing in constants for all of the
494 // arguments. Make this function and return.
496 // First, create the function.
498 Function *Stub = Function::Create(STy, Function::InternalLinkage, "",
512 default: llvm_unreachable("Unknown argument type for function call!");
552 // Finally, call our nullary stub function.
554 // Erase it, since no other function can have a reference to it.
578 const Function &F,
598 void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) {
605 virtual void NotifyFunctionEmitted(const Function &,
622 void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) {
627 // If the function referred to another function that had not yet been
630 Function *PF = jitstate->getPendingFunctions(locked).back();
634 "Externally-defined function should not be in pending list.");
638 // Now that the function has been jitted, ask the JITEmitter to rewrite
639 // the stub with real address of the function.
644 void JIT::jitTheFunction(Function *F, const MutexGuard &locked) {
649 // clear basic block addresses after this function is done
654 /// specified function, compiling it if necessary.
656 void *JIT::getPointerToFunction(Function *F) {
659 return Addr; // Check if function already code gen'd
663 // Now that this thread owns the lock, make sure we read in the function if it
667 report_fatal_error("Error reading function '" + F->getName()+
671 // ... and check if another thread has already code gen'd the function.
685 assert(Addr && "Code generation didn't add function to GlobalAddress table!");
707 // make sure it's function is compiled by JIT
731 /// If a LazyFunctionCreator is installed, use it to get/create the function.
737 report_fatal_error("Program used external function '"+Name+
775 /// recompileAndRelinkFunction - This method is used to force a function
781 void *JIT::recompileAndRelinkFunction(Function *F) {
787 // Delete the old function mapping.
790 // Recodegen the function
793 // Update state, forward the old function to the new function.
795 assert(Addr && "Code generation didn't add function to GlobalAddress table!");
842 void JIT::addPendingFunction(Function *F) {