Home | History | Annotate | Download | only in JIT

Lines Matching refs:Function

18 #include "llvm/Function.h"
41 // to the function.
79 // libgcc defines the __register_frame function to dynamically register new
82 // function here so that code generated by the JIT cooperates with the unwinding
86 // The __register_frame function works with Linux.
161 /// 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
385 /// run - Start execution with the specified function and arguments.
387 GenericValue JIT::runFunction(Function *F,
389 assert(F && "Function *F was null at entry to run()");
398 "Wrong number of arguments passed into function!");
413 // Call the function.
426 // Call the function.
449 default: llvm_unreachable("Unknown return type for function call!");
486 // full FFI, we have to codegen a nullary stub function that just calls the
487 // function we are interested in, passing in constants for all of the
488 // arguments. Make this function and return.
490 // First, create the function.
492 Function *Stub = Function::Create(STy, Function::InternalLinkage, "",
506 default: llvm_unreachable("Unknown argument type for function call!");
545 // Finally, call our nullary stub function.
547 // Erase it, since no other function can have a reference to it.
571 const Function &F,
591 void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) {
598 virtual void NotifyFunctionEmitted(const Function &,
615 void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) {
620 // If the function referred to another function that had not yet been
623 Function *PF = jitstate->getPendingFunctions(locked).back();
627 "Externally-defined function should not be in pending list.");
631 // Now that the function has been jitted, ask the JITEmitter to rewrite
632 // the stub with real address of the function.
637 void JIT::jitTheFunction(Function *F, const MutexGuard &locked) {
642 // clear basic block addresses after this function is done
647 /// specified function, compiling it if necessary.
649 void *JIT::getPointerToFunction(Function *F) {
652 return Addr; // Check if function already code gen'd
656 // Now that this thread owns the lock, make sure we read in the function if it
660 report_fatal_error("Error reading function '" + F->getName()+
664 // ... and check if another thread has already code gen'd the function.
678 assert(Addr && "Code generation didn't add function to GlobalAddress table!");
700 // make sure it's function is compiled by JIT
748 /// recompileAndRelinkFunction - This method is used to force a function
754 void *JIT::recompileAndRelinkFunction(Function *F) {
760 // Delete the old function mapping.
763 // Recodegen the function
766 // Update state, forward the old function to the new function.
768 assert(Addr && "Code generation didn't add function to GlobalAddress table!");
815 void JIT::addPendingFunction(Function *F) {