llvm-6502/tools/bugpoint
Hal Finkel e8bc700a87 Fix invalid function pointers in bugpoint ExtractLoops
The ExtractLoops function tries to reduce the failing test case by extracting
one or more loops from the misoptimized piece of the program. In doing this,
ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
that the pointers refer to functions in the current failing program.
Unfortunately, this is not trivial because:

 - ExtractLoops is iterative, and there are several early exits (and the
   MiscompiledFunctions vector must be consistent with the current program at
every non-fatal exit point).
 - Several of the utility functions used by ExtractLoops (such as
   TestOptimizer, some of which are called through the TestFn callback
parameter, and Linker::LinkModules) delete their inputs upon success.

This change adds several updates of the MiscompiledFunctions vector at
different points. The first is after the initial call to TestMergedProgram
which checks that the loop-extracted program still works. The second is after
the call to TestFn (TestOptimizer, for example). This function will delete its
inputs (which is why the existing ExtractLoops logic cloned the inputs first).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187674 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 21:13:42 +00:00
..
BugDriver.cpp Remove PathV1.h use from BugDriver.cpp. 2013-06-18 16:21:54 +00:00
BugDriver.h Fix bugpoint execution/reference output file name 2013-06-28 16:37:52 +00:00
bugpoint.cpp Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer. 2013-01-28 01:35:51 +00:00
CMakeLists.txt Don't export symbols in every binary on linux. 2013-04-04 01:01:32 +00:00
CrashDebugger.cpp Don't use PathV1.h in CrashDebugger.cpp. 2013-06-17 19:33:18 +00:00
ExecutionDriver.cpp Add a createUniqueFile function and switch llvm's users of unique_file. 2013-07-05 21:01:08 +00:00
ExtractFunction.cpp Add a createUniqueFile function and switch llvm's users of unique_file. 2013-07-05 21:01:08 +00:00
FindBugs.cpp Remove usage of PathV1.h in FindBugs.cpp. 2013-06-17 20:48:36 +00:00
ListReducer.h Sort the #include lines for tools/... 2012-12-04 10:44:52 +00:00
LLVMBuild.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
Makefile Manually update the dependencies in the Makefiles. It turns out that all 2013-03-26 03:45:47 +00:00
Miscompilation.cpp Fix invalid function pointers in bugpoint ExtractLoops 2013-08-02 21:13:42 +00:00
OptimizerDriver.cpp Add a wrapper for open. 2013-07-16 19:44:17 +00:00
ToolRunner.cpp Add a createUniqueFile function and switch llvm's users of unique_file. 2013-07-05 21:01:08 +00:00
ToolRunner.h Don't use PathV1.h in ToolRunner.h. 2013-06-17 19:21:38 +00:00