Chris Lattner
8966ce8f41
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
Misha Brukman
58104df77b
Fix #includes of i*.h => Instructions.h as per PR403.
...
llvm-svn: 15334
2004-07-29 17:30:56 +00:00
Chris Lattner
0d3969f3d1
Finally give bugpoint -timeout support!
...
llvm-svn: 15163
2004-07-24 07:53:26 +00:00
Misha Brukman
b521637a8d
* Convert "\n" -> '\n'
...
* Print out another '\n' after printing out program execution status
* Make sure code wraps at 80 cols
llvm-svn: 15123
2004-07-23 01:30:49 +00:00
Brian Gaeke
f18cdca667
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
7f33869f9b
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
llvm-svn: 14953
2004-07-18 00:44:37 +00:00
Chris Lattner
9b03d18729
IA64 compat
...
llvm-svn: 14867
2004-07-16 00:08:28 +00:00
Chris Lattner
9e43df4c37
Add -load option
...
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Reid Spencer
6d8b0985d1
Add #include <iostream> since Value.h does not include it any more.
...
llvm-svn: 14623
2004-07-04 12:20:55 +00:00
Misha Brukman
5b0111dddd
Linker.h moved to include/llvm/Support
...
llvm-svn: 14351
2004-06-23 17:33:09 +00:00
Chris Lattner
6f0bab5b9d
Header file moved
...
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Reid Spencer
fec48b0d9d
Convert to SymbolTable's new iteration interface.
...
llvm-svn: 13754
2004-05-25 08:53:40 +00:00
Chris Lattner
387b7a11ce
Turn the block extractor on by default now that it basically works, eliminating the option.
...
llvm-svn: 13502
2004-05-12 19:02:44 +00:00
Chris Lattner
54d077797b
Check to see if all blocks are extractible first.
...
llvm-svn: 13491
2004-05-12 16:08:01 +00:00
Chris Lattner
cf43edc33e
Don't leave dead bytecode.output files around if the optimizer/block extractor crashes.
...
llvm-svn: 13477
2004-05-12 02:55:45 +00:00
Chris Lattner
9bb62d5754
Implement the final missing bits for block extractor support. Now bugpoint
...
can extract basic blocks up to the limit of the block extractor implementation.
llvm-svn: 13475
2004-05-12 02:43:24 +00:00
Chris Lattner
bc83892156
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
c698aea90a
A class that is meant to be a base class should have a virtual destructor
...
llvm-svn: 13470
2004-05-11 20:41:07 +00:00
Chris Lattner
d055a56886
Use the new commandline flag to allow us to call bugpoint like this:
...
bugpoint ... --tool-args -enable-correct-eh-support -regalloc=linearscan --args -- -foo
So that tool-args option gets the -enable-correct-eh-support -regalloc=linearscan flags instead of bugpoint.
llvm-svn: 13389
2004-05-06 22:05:35 +00:00
Chris Lattner
f1cb30f481
Remove a really old comment
...
llvm-svn: 13385
2004-05-06 19:29:58 +00:00
Brian Gaeke
433b49b796
Add --tool-args flag which lets you pass arguments to llc or lli.
...
This is intended to address Bug 40.
llvm-svn: 13358
2004-05-04 21:09:16 +00:00
Chris Lattner
7902d8fd02
Teach bugpoint to be a little bit smarter and avoid repeating work
...
llvm-svn: 13132
2004-04-23 20:36:51 +00:00
Misha Brukman
1e9b5281d0
Add a space before result for readability on the command line.
...
llvm-svn: 13109
2004-04-22 20:02:09 +00:00
Misha Brukman
f8b15005bf
Add doxygenified comments to functions.
...
llvm-svn: 13097
2004-04-21 18:36:43 +00:00
Misha Brukman
85b8b45f7b
As per Chris, greatly simplify handling of external functions by using the
...
wrapper idea uniformly: we can use Value::replaceAllUsesWith() instead of
special-casing by class of user.
llvm-svn: 13063
2004-04-19 03:36:47 +00:00
Misha Brukman
eba5545346
* Reorder #includes
...
* Wrap a long line
llvm-svn: 13061
2004-04-19 03:12:35 +00:00
Misha Brukman
e7ccafce7e
Finally implement rewriting global initializers which use external functions
...
by creating an internal wrapper function with same signature as the external
function, and use it instead of the "real" function.
The wrapper then calls the external function using the same JIT function
resolution API that has been used before for rewriting instructions, since the
wrapper has an explicit call instruction which we can rewrite.
llvm-svn: 13054
2004-04-19 01:12:01 +00:00
Chris Lattner
903a90b9de
Disambiguate symbols after loop extraction so that we can diagnose a code
...
generator bug if multiple loops are extracted from a function.
llvm-svn: 12847
2004-04-11 23:52:35 +00:00
Chris Lattner
ff16e6b701
Fix an obvious bug in the refactoring I did a few days ago
...
llvm-svn: 12797
2004-04-09 22:28:33 +00:00
Misha Brukman
e2d817bc26
Wrap at 80 cols.
...
llvm-svn: 12701
2004-04-06 17:04:30 +00:00
Chris Lattner
d2c51f2cc3
Merge the code generator miscompilation code into the optimizer miscompilation
...
code. This "instantly" gives us loop-extractor power to assist with the
debugment of our nasty codegen issues. :)
llvm-svn: 12678
2004-04-05 22:58:16 +00:00
Chris Lattner
0442a87f47
Make a method public
...
llvm-svn: 12677
2004-04-05 22:01:48 +00:00
Chris Lattner
f856e42795
Minor cleanups, remove some old debug code
...
llvm-svn: 12676
2004-04-05 21:37:55 +00:00
Chris Lattner
5c943cebf1
Refactor and genericize code
...
llvm-svn: 12675
2004-04-05 21:37:38 +00:00
Chris Lattner
5ac19e9daf
Make full use of the Mangler interface to simplify code
...
llvm-svn: 12671
2004-04-05 19:31:02 +00:00
Chris Lattner
61dcf6709b
Minor change
...
llvm-svn: 12655
2004-04-05 01:31:50 +00:00
Chris Lattner
b9a26ff8fc
Minor speedup
...
llvm-svn: 12612
2004-04-02 16:28:32 +00:00
Chris Lattner
ec5b2f9597
minor formatting change
...
llvm-svn: 12606
2004-04-02 06:32:45 +00:00
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
54aa691a5c
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
b3f5ab8d5b
If the program returns a non-zero exit value, don't leave files laying
...
around
llvm-svn: 12603
2004-04-02 05:33:06 +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
e2b4b9ca3f
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
9a8238e477
Fix an iterator invalidation problem in a "buggy" pass
...
llvm-svn: 12468
2004-03-17 17:29:08 +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
acf045e970
Fix a minor bug in runPassesOn
...
llvm-svn: 12397
2004-03-14 21:37:41 +00:00
Chris Lattner
d82b46916c
Add a new "AutoDebugCrashes" option
...
llvm-svn: 12396
2004-03-14 21:21:57 +00:00
Chris Lattner
d4b06def93
Refactor to use a new method
...
llvm-svn: 12395
2004-03-14 21:17:22 +00:00
Chris Lattner
c3bbd5a66d
Add new method
...
llvm-svn: 12394
2004-03-14 21:17:03 +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
07b9a2c117
Add a method to extract a loop
...
llvm-svn: 12391
2004-03-14 20:02:07 +00:00
Chris Lattner
da20cdaaf2
add a fixme
...
llvm-svn: 12388
2004-03-14 19:31:00 +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
a2f653d0cc
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
Brian Gaeke
3cae3bad22
Revise comment and error message for the Bug 38 situation. Also, make it
...
print out the name of the function being used.
llvm-svn: 12347
2004-03-12 21:37:46 +00:00
Chris Lattner
483712708a
If bugpoint can't match the reference output, at LEAST provide the output
...
we can get.
llvm-svn: 11653
2004-02-20 06:12:58 +00:00
Chris Lattner
a112c05aa6
Wild and passionate uncontrolled goose chases are amusing to watch, but not
...
very helpful. Let bugpoint favor being helpful instead of determined.
llvm-svn: 11652
2004-02-20 05:58:58 +00:00
Chris Lattner
ddbd4a598b
Format a bit more nicely
...
llvm-svn: 11651
2004-02-20 05:56:48 +00:00
Chris Lattner
d4f7ef8b1e
Make sure to print a stack trace whenever an error signal is delivered
...
to the tool.
llvm-svn: 11634
2004-02-19 20:33:00 +00:00
Chris Lattner
9e02d336e7
Be a bit more robust. Explicitly check for a code generator crash.
...
llvm-svn: 11624
2004-02-19 17:03:49 +00:00
Alkis Evlogimenos
59c646da40
Make ToolExecutionError inherit std::exception and implement its
...
interface: getMessage() is gone, use what() instead.
llvm-svn: 11621
2004-02-19 07:39:26 +00:00
Chris Lattner
584b3d7379
Fix the "horribly N^2'd" problem when deleting individual instructions.
...
llvm-svn: 11617
2004-02-18 23:59:11 +00:00
Chris Lattner
f40a25ffa4
* Predicate the optimizer crash debugger on a function.
...
* Implement a new code generator crash debugger which uses this predicate
llvm-svn: 11614
2004-02-18 23:26:28 +00:00
Chris Lattner
2fba96f37e
Add a new method for use by the code generator crash debugger.
...
llvm-svn: 11613
2004-02-18 23:25:22 +00:00
Chris Lattner
3d405dc9c4
Don't crash if there are no passes in the PassesToRun list
...
llvm-svn: 11612
2004-02-18 23:24:56 +00:00
Chris Lattner
39e49b1940
Make the executeProgram method exception safe, not leaving around bytecode
...
files.
llvm-svn: 11607
2004-02-18 22:01:21 +00:00
Chris Lattner
6e7c1e5c5c
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
975c9272ef
make a bunch of methods public
...
llvm-svn: 11605
2004-02-18 21:35:28 +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
0eec2f9d9d
Cleanup and simplify manipulation of the program, eliminate the need for so
...
many 'friends' of bugdriver.
llvm-svn: 11603
2004-02-18 21:24:48 +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
1f2a818b9f
Update comments, if we are running with the CBE, make sure the Interpreter
...
variable and the CBE variable are pointer equal.
llvm-svn: 11599
2004-02-18 20:52:02 +00:00
Chris Lattner
2621ce4cef
ctor arguments changed order
...
llvm-svn: 11595
2004-02-18 20:22:25 +00:00
Chris Lattner
17d98cc298
Catch exception and print message as appropriate
...
llvm-svn: 11594
2004-02-18 20:22:11 +00:00
Chris Lattner
0437eb36db
Bugpoint will be throwing exceptions soon, perpare for the worst.
...
llvm-svn: 11584
2004-02-18 17:32:54 +00:00
Chris Lattner
bf9a487c2e
This class got moved to FileUtilities.h
...
llvm-svn: 11583
2004-02-18 17:17:10 +00:00
Chris Lattner
194353930c
The CBE is now in llc, not llvm-dis
...
llvm-svn: 11534
2004-02-17 06:40:51 +00:00
Brian Gaeke
04b8fe6b33
Add check-exit-code option, defaulting to true.
...
Add ProgramExitedNonzero argument to executeProgram(), and make it
tell its caller whether the program exited nonzero.
Move executeProgramWithCBE() out of line, to ExecutionDriver.cpp, and remove
its extra arguments which are always defaulted. Make it turn off
check-exit-code if the program exits nonzero while generating a reference
output.
Make diffProgram() assume that any nonzero exit code is a failure, if
check-exit-code is turned on.
llvm-svn: 11325
2004-02-11 18:37:32 +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
Chris Lattner
d7b71dadf5
Do not leave a bunch of crud lying around
...
llvm-svn: 10307
2003-12-07 02:31:03 +00:00
Chris Lattner
5b5415c547
be 3.4 happy
...
llvm-svn: 10265
2003-11-29 20:04:13 +00:00
Chris Lattner
fe396111ee
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
Chris Lattner
a2120947bb
Do not crash when dealing with invoke and unwind instructions!
...
llvm-svn: 10160
2003-11-22 02:10:38 +00:00
Chris Lattner
50d9290183
Use new interfaces
...
llvm-svn: 10159
2003-11-22 02:10:26 +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
62b495bd5c
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
c26574d777
Simplify the performFinalCleanups interface
...
llvm-svn: 9740
2003-11-05 21:15:19 +00:00
Chris Lattner
1844c58727
Do not print out lists with thousands of elements in them, that's kinda silly
...
llvm-svn: 9523
2003-10-27 04:44:59 +00:00
Chris Lattner
e4da5a79fc
Fix an assertion failure in Bugpoint
...
llvm-svn: 9406
2003-10-23 15:42:55 +00:00
Brian Gaeke
4034694fef
Fix the first FIXME in this file: automatically pick a "good"
...
interpreter by default, by picking the first one that works
from a hard-coded list.
llvm-svn: 9337
2003-10-21 17:41:35 +00:00
John Criswell
a8dfda0513
Added LLVM copyright to Makefiles.
...
llvm-svn: 9314
2003-10-20 22:29:16 +00:00
Misha Brukman
4303b02f66
Made error message more comprehensible.
...
llvm-svn: 9299
2003-10-20 19:43:47 +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
091340ca13
Don't bother forwarding function references which are external to the program entirely
...
llvm-svn: 9274
2003-10-19 23:32:50 +00:00
Chris Lattner
3a0b78c289
Ok, return an explicit path to the shared object, unbreaking code generator
...
debugging with the JIT
llvm-svn: 9273
2003-10-19 21:54:13 +00:00
Chris Lattner
84a991bc86
Fix iterator invalidation problem
...
llvm-svn: 9272
2003-10-19 21:48:27 +00:00
Chris Lattner
008529a320
Update compile information
...
llvm-svn: 9247
2003-10-18 21:55:47 +00:00