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

910 Commits

Author SHA1 Message Date
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
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
228bd4e931 Turn on argument promotion in gccas. This can give us substantially better
code in cases where the file has lots of static functions or anon namespaces.

llvm-svn: 12361
2004-03-13 21:38:35 +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
Misha Brukman
34ab36e8c8 SparcV8 removed until it grows up becomes a mature backend.
llvm-svn: 12288
2004-03-11 18:16:33 +00:00
Chris Lattner
d07c6d9c03 Annotate functions with edge counts as well, if they are available.
llvm-svn: 12233
2004-03-08 20:04:32 +00:00
Chris Lattner
0179360703 Run the new pass in gccld now that it passes all tests
llvm-svn: 12196
2004-03-07 22:12:40 +00:00
Chris Lattner
ab9a9c4119 Add a hook to run with the V8 target, though it doesn't currently work. Also
mark the PPC backend as experimental

llvm-svn: 11962
2004-02-28 19:55:16 +00:00
Chris Lattner
dc004a7269 We have this snazzy link-time optimizer. How about we start using it? This
removes some cruft from 255.vortex, cleaning up after DAE and IPCP, which
do horrible, beautiful, things to vortex.

llvm-svn: 11861
2004-02-26 03:34:30 +00:00
Chris Lattner
24c4dd56b5 Add a new pass, run internalize first
llvm-svn: 11839
2004-02-25 21:35:13 +00:00
Chris Lattner
0dfe43a53a Add a new pass
llvm-svn: 11838
2004-02-25 21:35:02 +00:00
Brian Gaeke
c6de948cd1 Great renaming part II: Sparc --> SparcV9 (also includes command-line options and Makefiles)
llvm-svn: 11827
2004-02-25 19:08:12 +00:00
Alkis Evlogimenos
15ac9b976d Include Config/config.h for SHLIBEXT.
llvm-svn: 11779
2004-02-23 22:42:51 +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
3c9511b0ac Make sure to print a stack trace whenever an error signal is delivered to
the tool.

llvm-svn: 11633
2004-02-19 20:32:39 +00:00
Chris Lattner
f8c22e360b Make sure to print a stack trace whenever an error signal is delivered to the
tool.

llvm-svn: 11632
2004-02-19 20:32:12 +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
9a0bcd709d Give extract -o and -f options, just like every other tool!
llvm-svn: 11580
2004-02-18 16:53:59 +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
Chris Lattner
81eae02a9e When the user runs 'llc foo.bc -march=c', write the output to "foo.cbe.c", not
to "foo.s".

llvm-svn: 11485
2004-02-15 22:54:19 +00:00
Misha Brukman
b872c6fe8d Break a line that's over 80cols into two.
llvm-svn: 11423
2004-02-13 23:46:47 +00:00
Chris Lattner
e2a5f8c233 Do not advertise our -c option anymore
llvm-svn: 11413
2004-02-13 23:24:46 +00:00
Chris Lattner
a2896eaee0 Mercilessly rip the cbackend out of llvm-dis. Leave a helpful error message
for those who have not heard the news.

llvm-svn: 11412
2004-02-13 23:22:40 +00:00
Chris Lattner
5a793ef4b5 Add support for -march=c
llvm-svn: 11410
2004-02-13 23:19:09 +00:00
Chris Lattner
93da3b1886 Change how we create the cwriter, and add a buttload of libraries that it now
needs.  This will be fixed shortly

llvm-svn: 11407
2004-02-13 23:01:14 +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
8bacf91656 Factor profile information loading OUT of llvm-prof into libanalysis
llvm-svn: 11316
2004-02-11 05:56:07 +00:00
Brian Gaeke
b926a20f6c Fix indentation of selectiondag.
I don't know why its indentation has been bugging me, but it has.

llvm-svn: 11180
2004-02-08 05:49:29 +00:00
Chris Lattner
58a3a94fe7 Minor change to breakpoint (lack of) support
llvm-svn: 11169
2004-02-08 00:06:20 +00:00
Brian Gaeke
e3e4d098e1 Add a -march=powerpc option. Automatically select it if this looks like a
big-endian, 32-bit module, or if __ppc__, __POWERPC__, or __APPLE__ are
defined.

llvm-svn: 11075
2004-02-02 19:06:12 +00:00
Brian Gaeke
cc540cca84 Link in the PowerPC back-end.
llvm-svn: 11074
2004-02-02 19:05:52 +00:00
Chris Lattner
15ea2aa0ff Now that tailduplication does not bork SSA form, run mem2reg earlier in gccas.
This tremendously improves the code generated by the LLVM optimizer, primarily
by making the inliner more aggressive.  For example, it improves the stepanov
benchmark from 55.56 mega-additions/sec to 98.04 Ma/s.  It also improves the
oopack/iterator benchmark from 338.3MFLOPS/s to 1103.4MFLOPS/s.  Less noteworthy,
it improves oopack/matrix from 573 -> 641 MFLOPS/s.

llvm-svn: 11053
2004-02-01 07:24:53 +00:00
John Criswell
a43fe7d309 Fixed PR#197. The libcrtend library is removed from the library linking list
when creating native executables.

llvm-svn: 10979
2004-01-26 23:51:10 +00:00
John Criswell
3a994220ad Fixes for PR214. Use the SHLIBEXT variable instead of hardcoding .so into
every file.

llvm-svn: 10976
2004-01-26 20:59:41 +00:00
Chris Lattner
9ec6983d9e Make sure to verify the result before writing out the bytecode file. Not doing
so can cause obscure errors downstream.

llvm-svn: 10840
2004-01-14 03:39:46 +00:00
Chris Lattner
98f2200fb2 finegrainify namespacification
llvm-svn: 10839
2004-01-14 03:38:37 +00:00
Chris Lattner
e4a3a98db3 Remove standard C header wrappers
llvm-svn: 10748
2004-01-10 19:15:38 +00:00
Chris Lattner
ef4ace0cd9 Remove wrappers around std c files
llvm-svn: 10744
2004-01-10 19:12:09 +00:00
Chris Lattner
26d7d42141 Ugh, fix some copy and pasted code that somehow never got compiled or something
:(

llvm-svn: 10706
2004-01-06 23:46:17 +00:00
Chris Lattner
56a2afdc26 * Implement set/show args
* Implement support for arguments to the 'run' command
* Minor cleanups and fixes

llvm-svn: 10703
2004-01-06 05:37:16 +00:00
Chris Lattner
b699064224 implement the "null command" which repeats the last command
llvm-svn: 10702
2004-01-06 05:36:30 +00:00
Chris Lattner
cfeebf332f /me slaps head
llvm-svn: 10694
2004-01-05 05:47:19 +00:00
Chris Lattner
2bbc048d2c Add new directory
llvm-svn: 10688
2004-01-05 05:28:15 +00:00
Chris Lattner
3725336680 Initial checkin of the LLVM Source-Level Debugger. This is incomplete, but
a good start.  The status is documented in docs/SourceLevelDebugging.html

llvm-svn: 10687
2004-01-05 05:27:31 +00:00
Chris Lattner
3be2513e7d Remove some pointless #includes
llvm-svn: 10653
2003-12-30 07:50:31 +00:00
Chris Lattner
aac7c59bb7 Use getFileSize() instead of sys/stat.h directly
llvm-svn: 10652
2003-12-30 07:48:17 +00:00
Chris Lattner
ba378df132 Use new getFileSize function. Eliminate some using directives. Reorder #includes a bit
llvm-svn: 10651
2003-12-30 07:45:46 +00:00
Chris Lattner
886cc8ad49 Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just
like -Wl,-disable-opt

llvm-svn: 10647
2003-12-30 03:24:27 +00:00
Chris Lattner
2a1a75c9aa Pass extra arguments around n stuph
llvm-svn: 10631
2003-12-28 09:51:04 +00:00
Chris Lattner
66c9cb837b Factor out code to ExecutionEngine
llvm-svn: 10614
2003-12-26 06:49:53 +00:00
Chris Lattner
e0269dd42a Simplify code
llvm-svn: 10613
2003-12-26 06:36:20 +00:00
Chris Lattner
4c0d6c8d46 * eliminate the -f argument to lli, as it was silly and never useful anyway
* Inline callMain function
* Remove hack from the ExecutionEngines where the 'run' method would automatically
  run atExit functions.  Fixing this requires explicitly calling exit if main returns

llvm-svn: 10611
2003-12-26 06:14:47 +00:00
Chris Lattner
d530851235 update comment
llvm-svn: 10607
2003-12-26 05:07:35 +00:00
John Criswell
207cf0a20d Modified the logic so that library objects with main() are only linked in
if the program currently has main undefined.

llvm-svn: 10597
2003-12-23 20:27:14 +00:00
John Criswell
8f95f1d2ca Modified the linker so that it always links in an object from an archive
that defines the symbol "main."  This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.

There is probably a more correct way to do this, but this works for now.

llvm-svn: 10594
2003-12-23 17:37:06 +00:00
Chris Lattner
148767d3bd Rename method
llvm-svn: 10593
2003-12-23 09:41:45 +00:00