1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 13:33:37 +02:00
Commit Graph

520 Commits

Author SHA1 Message Date
Misha Brukman
914429c42b Made a bunch of cleanups, as per Chris' recommendations:
* Removed unused global and member variables
* Fixed comments (CodeGeneratorBug.cpp)
* Check for possibly failing GCC::create() and CBE::create()
* Remove generated files after diffing the output (e.g., shared object)
* Instead of using std::for_each, use explicit loops as std::for_each may
  duplicate the functor, and ours carries state
* Changed member var from cl::opt<std::string> to just std::string
* Fixed doxygen comments
* Fixed string comparisons to use [ str.empty() ] instead of [ str == "" ]
* Cache instances of CBE and GCC in BugDriver across compilations and executions
  while testing tools.

llvm-svn: 7302
2003-07-24 21:59:10 +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
f5b33e92c2 Fixed misspelling.
llvm-svn: 7223
2003-07-21 21:58:16 +00:00
Chris Lattner
7f36f7e9f0 Remove instloops library
llvm-svn: 7210
2003-07-21 19:07:27 +00:00
Misha Brukman
582cf5be31 Initialize the target architecture based on compiler defines, so if compiled on
x86 or Sparc, LLC will automatically default to that platform, no guessing
required. On another platform, it will default to `noarch' and will have to
guess which architecture to compile to.

llvm-svn: 7207
2003-07-18 22:21:40 +00:00
Anand Shukla
fa520f62c4 Added pass to instrument backedges for lightweight tracing
llvm-svn: 7202
2003-07-18 16:25:40 +00:00
Misha Brukman
5de3e14206 The word separate' only has one e'.
llvm-svn: 7173
2003-07-14 17:20:40 +00:00
Misha Brukman
6b2cd003d4 Converted tabs to spaces.
llvm-svn: 7139
2003-07-10 16:35:17 +00:00
Misha Brukman
543aedd7d0 Fixed indentation.
llvm-svn: 7122
2003-07-07 22:28:42 +00:00
Misha Brukman
009e42dd43 * If compiling on X86 or Sparc, automagically enable the JIT for that arch
* Setting ENABLE_X86_JIT or ENABLE_SPARC_JIT on the `make' command-line will
  force the inclusion of that JIT on a different architecture
* If neither JIT is enabled (e.g., compiling on a different architecture), the
  -march option will not be available to LLI.
* As a side effect of the $ARCH variable, the Sparc LLI can now link just a bit
  faster by not including the x86 library.

llvm-svn: 7070
2003-07-02 17:53:19 +00:00
John Criswell
258dfc0319 Merged in autoconf branch. This provides configuration via the autoconf
system.

llvm-svn: 7014
2003-06-30 21:59:07 +00:00
Chris Lattner
caa0d010d6 Run the simplify CFG pass after instcombine which has the effect of deleting
ALL of the global ctor/dtor stuff if it is not used!

llvm-svn: 6916
2003-06-26 05:29:50 +00:00
Chris Lattner
622df692df Move the instcombine pass before globaldce, so that if globals are made dead by instcombine, that they can be deleted.
llvm-svn: 6910
2003-06-26 04:32:31 +00:00
Chris Lattner
ca92cc4853 Try to run cleanups even if nothing was modified in the preview passes
llvm-svn: 6897
2003-06-25 04:13:52 +00:00
Chris Lattner
bc15c235dd 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
1eb4533b66 Add tail duplication pass to the pipeline, move the verifier pass to the front
Other minor reorganizations

llvm-svn: 6849
2003-06-22 20:11:45 +00:00
Chris Lattner
85559692cb Minor cleanups
llvm-svn: 6799
2003-06-20 15:49:04 +00:00
Chris Lattner
daebdb2358 Funcresolve no longer performs nicification of resolved functions
instcombine does this

llvm-svn: 6787
2003-06-19 17:03:51 +00:00
Brian Gaeke
667447173d tools/llc/llc.cpp: Make "-o -" work.
llvm-svn: 6780
2003-06-18 21:43:33 +00:00
Brian Gaeke
19420e8daf lib/Target/Sparc/Sparc.cpp:
Move LowerAllocations, PrintFunction, and SymbolStripping passes, and
  the corresponding -disable-strip and -d options, over here to the SPARC
  target-specific bits of llc. Rename -d to -dump-asm.

tools/llc/Makefile:
 Reindent. Add x86 library so that llc compiles again.

tools/llc/llc.cpp:
 Remove support for running arbitrary optimization passes. Use opt instead.
 Remove LowerAllocations, PrintFunction, and SymbolStripping passes, as noted
  above.
 Allow user to select a backend (x86 or SPARC); default to guessing from
  the endianness/pointer size of the input bytecode file.
 Fix typos.
 Delete empty .s file and exit with error status if target does not support
  static compilation.

llvm-svn: 6776
2003-06-18 21:14:23 +00:00
Chris Lattner
a7bf3dea5c Reindent code to match the rest of the file
llvm-svn: 6772
2003-06-18 18:46:08 +00:00
Chris Lattner
7b1df04748 Add new DAE pass to gccld. It does not add cause any regressions in the test-suite
llvm-svn: 6770
2003-06-18 16:29:02 +00:00
Brian Gaeke
17f041ba98 Use $(PLATFORMLIBDL) to selectively bring in -ldl only on those platforms where
it is needed.

llvm-svn: 6753
2003-06-17 20:09:18 +00:00
Chris Lattner
6d0553444b Life is too short. Link in too much stuff on Linux to make building on sun easier
llvm-svn: 6748
2003-06-17 19:14:59 +00:00
Chris Lattner
0fc18257a9 The never-ending odyssey trying to get sparc to link
llvm-svn: 6747
2003-06-17 18:19:52 +00:00
Chris Lattner
85f1b38638 Make sure to get the value of ARCH before we use it
llvm-svn: 6746
2003-06-17 17:53:35 +00:00
Chris Lattner
0c7e4fdfa2 Do not link in the Sparc JIT when building on X86. Eventually the sparc will not
link in the X86 JIT either, but this makes testing easier.

For some reason, the sparc JIT was breaking the X86 JIT when it was linked in. :(

llvm-svn: 6745
2003-06-17 15:54:52 +00:00
Chris Lattner
ed38cd7aa9 Whoops, didn't mean to check that in :(
llvm-svn: 6743
2003-06-17 15:46:34 +00:00
Chris Lattner
1afd194a33 Use more structured command line option processing
llvm-svn: 6742
2003-06-17 15:43:13 +00:00
Chris Lattner
493103ea3b Actually, change it to use explicit new/delete, which is more likely to be
optimized INTO an alloca

llvm-svn: 6727
2003-06-16 22:29:09 +00:00
Chris Lattner
9fa396e6c7 Remove usage of alloca
llvm-svn: 6726
2003-06-16 22:22:11 +00:00
Brian Gaeke
4681b27a92 Isolate machine-dependent use of <alloca.h> in "Support/Alloca.h",
so that we can easily change its use to be conditional on the result of
an autoconf test later.

llvm-svn: 6723
2003-06-16 21:54:01 +00:00
Chris Lattner
15bfe02e6f Fix major bug in my last checkin. :(
llvm-svn: 6688
2003-06-13 16:10:26 +00:00
Chris Lattner
f90b0e49fa Remove obsolete comments about llvm-ar
llvm-svn: 6686
2003-06-12 18:57:42 +00:00
Chris Lattner
dec82c2ca1 Remove duplicate pass
llvm-svn: 6631
2003-06-05 20:51:10 +00:00
Chris Lattner
c3373f42ce Remove stupid thinko that was preventing bugpoint from working
llvm-svn: 6533
2003-06-02 04:54:29 +00:00
Chris Lattner
b7a4d035d7 Give better information about how the passes crash
llvm-svn: 6532
2003-06-02 04:54:16 +00:00
Chris Lattner
037fce29a8 Add support for: -o -
llvm-svn: 6485
2003-05-31 21:47:16 +00:00
Chris Lattner
a05571b144 Add SRoA pass to gccas
llvm-svn: 6442
2003-05-30 19:24:06 +00:00
Chris Lattner
e4108c9550 Move indvars pass after mem2reg pass where it is more likely to be useful
llvm-svn: 6441
2003-05-30 19:23:10 +00:00
Chris Lattner
67b4289b39 Fix formatting in file
llvm-svn: 6398
2003-05-29 15:13:15 +00:00
Misha Brukman
4931c59635 Link in Sparc libs for the JIT, even on X86 to be able to support debugging
of Sparc JIT (printing out instrs) on X86. Con: this increases linking time.

llvm-svn: 6361
2003-05-27 21:42:05 +00:00
Chris Lattner
f8db81aac0 Remove ugly hack (that I put in originally) for building in trace stuff
automatically in LLC

llvm-svn: 6358
2003-05-27 21:23:02 +00:00
Chris Lattner
c8e346caeb Add compatibility option
llvm-svn: 6354
2003-05-27 19:15:11 +00:00
Brian Gaeke
b9ec46415f Remove ".bc" from the end of InputFile if it is there, in
tools/lli/lli.cpp:main().

llvm-svn: 6317
2003-05-23 20:28:07 +00:00
Brian Gaeke
b599881570 gccld.cpp:
Fix typo in header.
 Add IsArchive static method.
 Roll LoadLibraryFromDirectory() into LoadLibrary(), and factor
  LoadLibraryExactName() out of the result. Instead of treating the current
  directory specially, just insert it into LibPaths in the beginning of
  main().
 Make LoadLibrary() take a "search" flag that says whether to search for the
  correct library, or just trust that LibName is right.
 Make LinkLibrary() take a "search" flag, and pass it to LoadLibrary().
 Change the for-loop over InputFilenames to detect ar archives and link them
  in as libraries without searching.
 Change the for-loop over Libraries to explicitly turn on the "search" flag
  to LinkLibrary() that makes LoadLibrary() search for the correct library
  (i.e., when processing -lNAME options.)

llvm-svn: 6316
2003-05-23 20:27:07 +00:00
Brian Gaeke
5eee0dd116 Clarify BugDriver.cpp:BugDriver::ParseInputFile()'s return values in its
explanatory comment.

llvm-svn: 6308
2003-05-23 05:34:32 +00:00
Chris Lattner
ea946cf5c1 Kill using declarations
llvm-svn: 6292
2003-05-22 20:13:16 +00:00
Chris Lattner
4875906a69 Allow disabling final cleanups
llvm-svn: 6271
2003-05-21 20:38:59 +00:00
Chris Lattner
5a8e740420 Increase odds that this won't bork things
llvm-svn: 6267
2003-05-21 19:41:31 +00:00