1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

34 Commits

Author SHA1 Message Date
Chris Lattner
950f3fac90 Fix two pretty serious bugs:
1. Each time the loop extractor extracted a loop, we would leak a module.
  2. When we extracted a loop, we didn't add the new function to the list of
     miscompiled functions.  Thus if the bug was in a loop nest and we
     extracted it, we could actually *LOSE THE BUG*, which is very bad.

With these patches, bugpoint has successfully found a bug for me in a function
with several nested loops, and cut it down to just one of them. :) :)

llvm-svn: 12605
2004-04-02 06:32:17 +00:00
Chris Lattner
e45504d887 When loop extraction succeeds, make sure to map the function pointers over
to avoid dangling references.

llvm-svn: 12470
2004-03-17 17:42:09 +00:00
Chris Lattner
83c74abb8e Fix thinko, and PR292
llvm-svn: 12426
2004-03-16 01:51:54 +00:00
Chris Lattner
4ef444f59b After reducing a miscompiled program down to the functions which are being
miscompiled, try to use the loop extractor to reduce the program down to a
loop nest that is being miscompiled.  In practice, the loop extractor appears
to have too many bugs for this to be useful, but hopefully they will be fixed
soon...

llvm-svn: 12398
2004-03-14 22:08:00 +00:00
Chris Lattner
491f3054b8 Refactor and clean up a bunch more code. No major functionality changes.
* Make several methods of bugdriver global functions (ParseInputFile, PrintFunctionList)
 * Make PrintFunctionList truncate the output after 10 entries, like the crash debugger
   did.  This allows code sharing.
 * Add a couple of methods to BugDriver that allows us to eliminate some friends
 * Improve comments in ExtractFunction.cpp
 * Make classes that used to be friends up bugdriver now live in anon namespaces
 * Rip a bunch of functionality in the miscompilation tester into a new
   TestMergedProgram function for future code sharing.
 * Fix a bug in the miscompilation tester induced in my last checkin

llvm-svn: 12393
2004-03-14 20:50:42 +00:00
Chris Lattner
36e8168af5 Refactor all of the "splitting a module into two pieces" code to avoid
code duplication.  Also, don't use ReduceMiscompilingFunctions::TestFuncs
to print out the final message.

llvm-svn: 12387
2004-03-14 19:27:19 +00:00
Chris Lattner
8a76047d63 A couple of minor cleanups: don't forward declare private classes, put private
classes in an anon namespace

llvm-svn: 11604
2004-02-18 21:29:46 +00:00
Chris Lattner
264e195392 Add a stub for debugging code generator crashes
llvm-svn: 11602
2004-02-18 21:02:04 +00:00
Chris Lattner
98f2200fb2 finegrainify namespacification
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Chris Lattner
21819d462c Bugpoint had appalingly bad grammar. Fix some of it.
llvm-svn: 10308
2003-12-07 02:43:09 +00:00
Brian Gaeke
d25f86d683 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
656ad51b9d fix file headers
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
John Criswell
d06dc1136b Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Chris Lattner
a65c470b02 If we detect a pass crash during miscompilation testing, immediately enter the
crash debugger

llvm-svn: 9234
2003-10-18 19:27:48 +00:00
Chris Lattner
d38efa85f5 Fix bug in my checkin
llvm-svn: 9217
2003-10-18 00:14:13 +00:00
Chris Lattner
10c281e015 Another formatting fix
llvm-svn: 9216
2003-10-18 00:05:05 +00:00
Chris Lattner
877bfd7e34 More cleanups
llvm-svn: 9215
2003-10-17 23:07:47 +00:00
Chris Lattner
2db02886eb Be more helpful if a pass fails while chasing down a miscompilation
llvm-svn: 9214
2003-10-17 23:03:16 +00:00
Chris Lattner
32f66afbad Eliminate the bugpoint -mode option, by making bugpoint automatically infer the root of all of your problems
llvm-svn: 9115
2003-10-14 20:52:55 +00:00
Misha Brukman
de33e42aa9 File-related functions moved to FileUtilities.h .
llvm-svn: 7696
2003-08-07 21:42:28 +00:00
Misha Brukman
6cb08f34b6 Re-grouped and alphabetized headers for easier reading and cleaner style.
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Misha Brukman
43f3b68016 Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
llvm-svn: 7687
2003-08-07 21:04:42 +00:00
Misha Brukman
a326e31a1c Do not attempt to reduce a test case if it is an empty set.
llvm-svn: 7570
2003-08-04 19:03:42 +00:00
Misha Brukman
3c2462bb76 CodeGeneratorBug.cpp:
* Temporarily externing InputArgv to print it out for the benefit of LLI command
  needed to reproduce the result.
* Print out the list of functions currently being tested
* ListReducer now returns a bool if there was a failure, so test for it

ListReducer.h:
* Handle the case where there is no problem by returning true if failure is
  found. Also correctly handles the case when there is only 1 pass/function.

Miscompilation.cpp:
* ListReducer now returns a bool if there was a failure, so test for it

llvm-svn: 7434
2003-07-30 20:15:56 +00:00
Misha Brukman
e98a7e97d9 Major addition to bugpoint: ability to debug code generators (LLC and LLI).
The C backend is assumed correct and is used to generate shared objects to be
loaded by the other two code generators.

LLC debugging should be functional now, LLI needs a few more additions to work,
the major one is renaming of external functions to call the JIT lazy function
resolver.

Bugpoint now has a command-line switch -mode with options 'compile' and
'codegen' to debug appropriate portions of tools.

ExecutionDriver.cpp: Added implementations of AbstractInterpreter for LLC and
GCC, broke out common code within other tools, and added ability to generate C
code with CBE individually, without executing the program, and the GCC tool can
generate executables shared objects or executables.

If no reference output is specified to Bugpoint, it will be generated with CBE,
because it is already assumed to be correct for the purposes of debugging using
this method. As a result, many functions now accept as an optional parameter a
shared object to be loaded in, if specified.

llvm-svn: 7293
2003-07-24 18:17:43 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Chris Lattner
8b8e1625e1 Print filename correctly
llvm-svn: 6119
2003-05-12 14:32:04 +00:00
Chris Lattner
7114e0ee34 Rename Kept -> Suffix
Fix problem where we accidentally returned KeepPrefix instead of KeepSuffix!

llvm-svn: 5925
2003-04-25 03:16:05 +00:00
Chris Lattner
e09e448832 Adjust to match new ListReducer interface
Move function to generic code

llvm-svn: 5910
2003-04-24 22:24:22 +00:00
Chris Lattner
f6d04c9d0c Move the ListReducer Class into it's own header file instead of living in Miscompilation.cpp
llvm-svn: 5907
2003-04-24 20:16:29 +00:00
Chris Lattner
d7a7ef633f Allow bugpoint to try new an different methods for pruning down lists
llvm-svn: 5905
2003-04-24 19:32:42 +00:00
Chris Lattner
0b66fe7194 Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling.

llvm-svn: 5893
2003-04-24 17:02:17 +00:00
Chris Lattner
343d952a53 Print where reference output goes
llvm-svn: 5891
2003-04-23 20:41:18 +00:00
Chris Lattner
2af84f79e3 New files for miscompilation detection
llvm-svn: 5120
2002-12-23 23:50:16 +00:00