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
Brian Gaeke
e99247512f
Allow the user to set the LLVMINTERP environment variable as a workaround, for
...
when they have to run a gccld shell script without having lli in their path.
This is intended to address Bug 289.
Also, emit the traditional syntax ${1+"$@"} for passing all of a shell script's
args to a subprocess. If you have arguments that have spaces in them, $* will
not preserve the quoting (i.e., the quoted string "foo bar" as an argument will
end up as two arguments "foo" "bar" to lli.)
llvm-svn: 13414
2004-05-07 21:47:36 +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
2c7503786d
Add command-line option to select whether to isolate or delete function from
...
module. Default is `isolate' as before.
llvm-svn: 13113
2004-04-22 23:07:39 +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
Alkis Evlogimenos
904f4f9a21
Include cerrno (gcc-3.4 fix)
...
llvm-svn: 13091
2004-04-21 16:11:40 +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
0caf28f4ff
Move loop optimization passes up, add loop unroller
...
llvm-svn: 13030
2004-04-18 05:21:01 +00:00
Misha Brukman
ab36a84bda
Don't use invalid HTML in a doxygen comment.
...
llvm-svn: 12962
2004-04-15 15:23:45 +00:00
Chris Lattner
0bb60b108d
Add a couple more IPO's
...
llvm-svn: 12863
2004-04-12 05:38:15 +00:00
Chris Lattner
4b1e880424
finegrainify namespacification
...
llvm-svn: 12862
2004-04-12 05:38: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
Chris Lattner
caefe03e39
Disable strict alias analysis in the backend c compiler, as the code we
...
generate is not TBAA safe.
llvm-svn: 12774
2004-04-08 15:18:59 +00:00
Chris Lattner
825c162788
Revert previous patch, I'm a moron :)
...
llvm-svn: 12773
2004-04-08 15:18:03 +00:00
Chris Lattner
5608c6da7e
Right, we break strict aliasing requirements. Make sure to disable strict
...
aliasing in the C compiler.
llvm-svn: 12772
2004-04-08 15:14:43 +00:00
Misha Brukman
e2d817bc26
Wrap at 80 cols.
...
llvm-svn: 12701
2004-04-06 17:04:30 +00:00
Chris Lattner
1a40aaf3ba
Minor cleanups
...
llvm-svn: 12700
2004-04-06 16:54:04 +00:00
Chris Lattner
3259504cce
Add a new gccld -native-cbe option which causes gccld to generate native code
...
for the application with the C backend instead of the native LLVM code generator
llvm-svn: 12698
2004-04-06 16:43:13 +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
f592eff643
Remove obsolete analyses
...
llvm-svn: 12634
2004-04-02 20:56:33 +00:00
Chris Lattner
5ad71e4688
Tweak libraries for scev changes
...
llvm-svn: 12625
2004-04-02 20:32:46 +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
a262913211
Fix wonky header
...
Address PR305: LLVM tools will happily spew bytecode onto your terminal
llvm-svn: 12602
2004-04-02 05:06:57 +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
Brian Gaeke
f6f76523cb
Add a better head-of-file comment.
...
llvm-svn: 12447
2004-03-16 21:47:20 +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