Commit Graph

52 Commits

Author SHA1 Message Date
Chris Lattner dcc8bcc04d Code cleanups, no functionality change.
llvm-svn: 29969
2006-08-29 23:38:20 +00:00
Chris Lattner c2d3d3112e eliminate RegisterOpt. It does the same thing as RegisterPass.
llvm-svn: 29925
2006-08-27 22:42:52 +00:00
Patrick Jenkins 752d52cbb6 Updating the comments above SplitFunctionsOutOfModule in ExtractFunction.cpp to reflect the changes made to that function. Specifically I am removing the FIXME comment because the issue has been addressed.
llvm-svn: 29385
2006-07-28 18:03:01 +00:00
Patrick Jenkins b417a5c166 This commit improves bugpoints speed. On my G4 this changed caused kimwitu++ to run through bugpoint in 1091.15 seconds (user + system time). The time it took to run this on my G4 before I made these changes is 1420.82 seconds (user + system time). This is a speedup of about 5.5 minutes.
This is faster because SplitFunctionsOutOfModule no longer calls Clone Module and then removes the functions it doesnt want from the module returned. Instead it creates a module and copies over the specified functions, making changes to the new and old module where neccessary. This reduces the memory demand.

llvm-svn: 29379
2006-07-28 01:19:28 +00:00
Chris Lattner 16cf81306e Don't pass target name into TargetData anymore, it is never used or needed.
llvm-svn: 28831
2006-06-16 18:23:49 +00:00
Chris Lattner 917f8fd1d9 Remove dead return value.
llvm-svn: 28245
2006-05-12 17:28:36 +00:00
Chris Lattner fdb533a1f6 Fix a really annoying bug in bugpoint that made reducing C++ testcases
almost impossible with the new CFE.  It now guarantees that the static
ctor/dtor list is correctly split between the modules.

llvm-svn: 26624
2006-03-08 23:55:38 +00:00
Chris Lattner 03c032ce71 add explicit #includes of iostream
llvm-svn: 25510
2006-01-22 22:53:40 +00:00
Misha Brukman 650ba8eb56 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner 22b216a59e Replace more a*'s with arg_*'s, thanks to Gabor Greif!
llvm-svn: 20615
2005-03-15 15:48:06 +00:00
Chris Lattner 5e166a5f3e Fix a bugpoint crash that JeffC noticed, looking like this:
*** Attempting to perform final cleanups: Final cleanups failed.  Sorry. :(  Ple
ase report a bug!

<llc>llc.exe: bytecode didn't read correctly.
llc.exe: bytecode didn't read correctly.
<crash>
Assertion failed: M && "You can't write a null module!!", file c:\llvm\lib\bytec
ode\writer\writer.cpp, line 1094


The fact that llc bombed (in this case) is ok, but bugpoint shouldn't crash after this.

llvm-svn: 20285
2005-02-23 06:12:11 +00:00
Chris Lattner 8cb483b335 remove debugging code
llvm-svn: 17962
2004-11-18 19:40:13 +00:00
Chris Lattner d308797cae Make this code not depend on LinkModules leaving the second argument unmolested.
llvm-svn: 17874
2004-11-16 06:31:38 +00:00
Chris Lattner 4f2cf030e8 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.

llvm-svn: 16436
2004-09-20 04:48:05 +00:00
Reid Spencer 7c16caa336 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner af32dfa0f4 If the block extractor fails, actually emit the bc file that failed to extract
llvm-svn: 15675
2004-08-12 02:36:50 +00:00
Brian Gaeke 902dcf0729 These files don't need to include <iostream> since they include "Support/Debug.h".
llvm-svn: 15089
2004-07-21 20:50:33 +00:00
Reid Spencer f0ebb25d2b Add #include <iostream> since Value.h does not include it any more.
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Chris Lattner a060b10ee5 Implement basic block extraction for the miscompilation debugger. This still needs
two things: the FIXME in ExtractBlocks needs to be implemented, and the basic block
extractor itself needs to have enough bugs fixed for this to be more or less
useful.

Until the time that this is generally useful, it is hidden behind the new bugpoint
-enable-block-extraction option.  I hope to get the FIXME done tonight.

Also of note, this patch adds a -extract-bbs option to bugpoint which can be used
to debug the block extractor.  (hint hint Misha :)

llvm-svn: 13471
2004-05-11 21:54:13 +00:00
Chris Lattner 3838243d04 Minor speedup
llvm-svn: 12612
2004-04-02 16:28:32 +00:00
Chris Lattner af67dac7f4 Fix a fairly nasty bug that prevented bugpoint from working quite right when
hacking on programs with two functions that have the same name.

llvm-svn: 12604
2004-04-02 06:30:33 +00:00
Chris Lattner 7e51a502bc Fix an inverted condition that causes us to think that loop extraction
accomplished something when it really did not.  This does not fix the bigger problem tho.

llvm-svn: 12469
2004-03-17 17:37:18 +00:00
Chris Lattner bcec7875fb 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 6ce2d03352 Refactor to use a new method
llvm-svn: 12395
2004-03-14 21:17:22 +00:00
Chris Lattner fd72bed301 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 3fe96bc9fd Add a method to extract a loop
llvm-svn: 12391
2004-03-14 20:02:07 +00:00
Chris Lattner 5a5e414bc0 add a fixme
llvm-svn: 12388
2004-03-14 19:31:00 +00:00
Chris Lattner 567543f09e 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 0ee372cfe3 Fix the "infinite looping unless you disable adce" bug
Also remove an option to disable adce :)

llvm-svn: 12359
2004-03-13 19:35:54 +00:00
Chris Lattner b943b6b019 Make more stuff public. Make the instruction argument to
deleteInstructionFromProgram be const

llvm-svn: 11606
2004-02-18 21:50:26 +00:00
Chris Lattner 233b069113 Do not leave a bunch of crud lying around
llvm-svn: 10307
2003-12-07 02:31:03 +00:00
Chris Lattner 3f1ad878ac Do not DESTROY programs by default. No wonder bugpoint was not being useful all this time!
llvm-svn: 10175
2003-11-23 04:51:05 +00:00
Brian Gaeke 960707c335 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 2920100e4d I hate it when bugpoint is all ready to give me a bytecode file, then crashes
in final cleanups.  Then you had to run the whole mess again with
-disable-final-cleanups.

This makes bugpoint run the cleanups in a protected environment so that if
they crash, bugpoint itself doesn't crash.  This makes things much happier,
implements a FIXME, and gets rid of YABPO (yet another bugpoint option).

llvm-svn: 9743
2003-11-05 21:45:35 +00:00
Chris Lattner debac38f5e Simplify the performFinalCleanups interface
llvm-svn: 9740
2003-11-05 21:15:19 +00:00
Chris Lattner f3e8f97d7e Fix an assertion failure in Bugpoint
llvm-svn: 9406
2003-10-23 15:42:55 +00:00
Chris Lattner ebec8030d6 fix file headers
llvm-svn: 9293
2003-10-20 17:57:13 +00:00
John Criswell 09344dcf97 Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Brian Gaeke ef4327037a Check in the fix I meant to apply here, but mistakenly applied to
tools/extract instead..... heh

llvm-svn: 8464
2003-09-10 21:11:42 +00:00
Misha Brukman 0c2305b110 Re-grouped and alphabetized headers for easier reading and cleaner style.
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Chris Lattner d1e2aaef4f If we're debugging the SimplifyCFG pass, we _REALLY_ don't want to use it for
narrowing, no matter what.

llvm-svn: 7596
2003-08-05 15:51:05 +00:00
Chris Lattner f7e125403b Parameterize the performFinalCleanups a bit
llvm-svn: 7477
2003-08-01 16:13:49 +00:00
Chris Lattner 0192b72fde Run dead arg elimination, and tell it that it's ok to hack up non-internal functions
llvm-svn: 6896
2003-06-25 04:13:36 +00:00
Chris Lattner d9b159587b Allow disabling final cleanups
llvm-svn: 6271
2003-05-21 20:38:59 +00:00
Chris Lattner 2b3ab562f6 Increase odds that this won't bork things
llvm-svn: 6267
2003-05-21 19:41:31 +00:00
Chris Lattner 8d8de422dd Add options to disable simplification with passes, in case one of them crashes
llvm-svn: 5950
2003-04-25 22:08:12 +00:00
Chris Lattner b0143880f4 When cleaning up the final bytecode file, make sure to run DTE as well
llvm-svn: 5917
2003-04-25 00:52:30 +00:00
Chris Lattner 10c0469be1 Remove dead functions
llvm-svn: 5913
2003-04-24 22:53:24 +00:00
Chris Lattner 44ffd7c373 Make sure that intermediate code is verifier clean to avoid wierd problems.
llvm-svn: 5723
2003-03-07 18:17:13 +00:00
Chris Lattner 514c02eb26 * Reduce the number of useless bytecode files produced by bugpoint.
- This also speeds it up as the bytecode writer isn't terribly fast.
* Add a new cleanup pass after everything else to run -funcresolve -globaldce

llvm-svn: 5668
2003-02-28 16:13:20 +00:00