Home | History | Annotate | Download | only in bugpoint

Lines Matching refs:Function

176   class ReduceMiscompilingFunctions : public ListReducer<Function*> {
185 virtual TestResult doTest(std::vector<Function*> &Prefix,
186 std::vector<Function*> &Suffix,
205 bool TestFuncs(const std::vector<Function*> &Prefix, std::string &Error);
213 /// argument is set to true then this function deletes both input
246 bool ReduceMiscompilingFunctions::TestFuncs(const std::vector<Function*> &Funcs,
248 // Test to see if the function is misoptimized if we ONLY run it on the
251 << (Funcs.size()==1 ? "this function is" : "these functions are")
258 // * If the optimization passes delete any function, the deleted function
261 // a function, we want to continue with the original function. Otherwise
262 // we can conclude that a function triggers the bug when in fact one
268 std::vector<Function*> FuncsOnClone;
270 Function *F = cast<Function>(VMap[Funcs[i]]);
307 std::vector<Function*> &MiscompiledFunctions,
368 // Clone modules, the tester function will free them.
407 // All of the Function*'s in the MiscompiledFunctions list are in the old
412 Function *NewF = ToNotOptimize->getFunction(MisCompFunctions[i].first);
414 assert(NewF && "Function not found??");
427 Function*> FunctionsBeingTested;
432 const std::vector<Function*> &Fns)
464 // Test to see if the function is misoptimized if we ONLY run it on the
481 std::vector<Function*> FuncsOnClone;
484 Function *F = cast<Function>(VMap[FunctionsBeingTested[i]]);
522 std::vector<Function*> &MiscompiledFunctions,
528 for (Function::iterator I = MiscompiledFunctions[i]->begin(),
594 Function *NewF = ProgClone->getFunction(MisCompFunctions[i].first);
595 assert(NewF && "Function not found??");
606 static std::vector<Function*>
615 std::vector<Function*> MiscompiledFunctions;
629 outs() << "\n*** The following function"
654 outs() << "\n*** The following function"
677 outs() << "\n*** The following function"
688 /// TestOptimizer - This is the predicate function used to check to see if the
733 std::vector<Function *> MiscompiledFunctions =
768 // First, if the main function is in the Safe module, we must add a stub to
769 // the Test module to call into it. Thus, we create a new function `main'
771 if (Function *oldMain = Safe->getFunction("main"))
775 // Create a NEW `main' function with same type in the test module.
776 Function *newMain = Function::Create(oldMain->getFunctionType(),
780 // corresponds to the real main function in the same module.
781 Function *oldMainProto = Function::Create(oldMain->getFunctionType(),
784 // Set up and remember the argument list for the main function.
786 for (Function::arg_iterator
793 // Call the old main function and return its result
797 // If the type of old function wasn't void, return value of call
814 // Use the function we just added to get addresses of functions we need.
818 Function *TestFn = Test->getFunction(F->getName());
830 // sbyte* so it matches the signature of the resolver function.
840 // function that dynamically resolves the calls to F via our JIT API
842 // Create a new global to hold the cached function pointer.
849 // Construct a new stub function that will re-route calls to F
851 Function *FuncWrapper = Function::Create(FuncTy,
868 // Resolve the call to function F via the JIT API:
874 // Cast the result from the resolver to correctly-typed function.
891 for (Function::arg_iterator i = FuncWrapper->arg_begin(),
895 // Pass on the arguments to the real function, return its result
905 // Use the wrapper function instead of the old function
920 /// TestCodeGenerator - This is the predicate function used to check to see if
968 // The function returns whether or not the new output differs from reference.
1004 std::vector<Function*> Funcs = DebugAMiscompilation(*this, TestCodeGenerator,