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

41 Commits

Author SHA1 Message Date
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
Misha Brukman
eba5545346 * Reorder #includes
* Wrap a long line

llvm-svn: 13061
2004-04-19 03:12:35 +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
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
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
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
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
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
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
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
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
23628ef2fb Don't leave a trail of bugpoint-execution-output-* breadcrumbs all over the place
llvm-svn: 9242
2003-10-18 21:02:51 +00:00
Chris Lattner
6dc01b06f7 Change run-lli -> run-int
Many people associate lli with the jit, so we don't want to suprise them

llvm-svn: 9238
2003-10-18 20:30:48 +00:00
Chris Lattner
aea6238a66 Default to using the CBE instead of the Interpreter if no -run-* option is specified
llvm-svn: 9237
2003-10-18 20:18:20 +00:00
Chris Lattner
c44998d315 add support forloading additional .so files on the command line
llvm-svn: 9131
2003-10-14 22:24:31 +00:00
Chris Lattner
1a8192c85e Change the execute methods to take the shared object filename by const reference.
Other adjustments to work with the new ToolRunner interfaces

llvm-svn: 9130
2003-10-14 21:59:36 +00:00
Chris Lattner
60503a16cf The return value of compileSharedObject was never used. Return the shared
object's name instead

llvm-svn: 9120
2003-10-14 21:09:11 +00:00
Chris Lattner
d6ed5425f4 This header file moved. Thanks to Bill and Nightly tester for noticing
llvm-svn: 8920
2003-10-07 13:45:51 +00:00
Misha Brukman
c253fa6c45 Use the newly abstracted interface for running our tools and gcc.
llvm-svn: 8756
2003-09-29 22:40:52 +00:00
Misha Brukman
7fbf15848b Renaming dis' -> llvm-dis'.
llvm-svn: 8197
2003-08-28 22:14:16 +00:00
Chris Lattner
31da13847a no-strict-aliasing redux
llvm-svn: 7965
2003-08-18 22:32:48 +00:00
Chris Lattner
de8083df45 The CBE generates code which violates the TBAA rules of C, thus we must disable
optimizations based on these rules.  :(

llvm-svn: 7964
2003-08-18 22:32:03 +00:00
Misha Brukman
6cb08f34b6 Re-grouped and alphabetized headers for easier reading and cleaner style.
llvm-svn: 7689
2003-08-07 21:19:30 +00:00
Misha Brukman
43f3b68016 Moved SystemUtils.h to include/Support and SystemUtils.cpp to lib/Support.
llvm-svn: 7687
2003-08-07 21:04:42 +00:00
Chris Lattner
929fe6d82c Make sure to flush the output stream so that we get incremental updates
llvm-svn: 7555
2003-08-04 00:56:43 +00:00
Chris Lattner
64fade1536 DEBUG got moved to Debug.h
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
cd252af3e1 Use the new FileUtilities library to do diff'ing of files
llvm-svn: 7484
2003-08-01 20:29:45 +00:00
Misha Brukman
10e9e036c2 * Moved InputArgv out of anonymous scope to be extern'd in another file.
* Added DEBUG() statements to print out parameters passed to executing programs
* Actually ADD parameters to a program running via the JIT (using vector<char*>)

llvm-svn: 7433
2003-07-30 20:15:44 +00:00
Misha Brukman
f41d2acc8d Moved definition of InputArgv into ExecutionDriver.cpp -- it is only used there.
llvm-svn: 7427
2003-07-30 17:59:23 +00:00
Misha Brukman
a38f409401 Use a vector<char*> instead of char*[] so that we can add arbitrary number of
parameters, such as command-line arguments that the executing program gets via
bugpoint.

llvm-svn: 7423
2003-07-30 17:44:15 +00:00
Misha Brukman
844d79f8f5 BugDriver.h:
* Added method to query if BugDriver is executing the JIT currently.
  This provides the ability in adding code that is conditionally executed in
  codegen debugging phase.

CodeGeneratorBug.cpp:
* Delete test functions from the Safe module
* Code conditionally added when debugging the JIT:
  use the lazy resolver function added to Emitter.cpp to get function pointer
  by name. When compiled into an .so, this is the only way to get a pointer to
  an external function
* Added a symbol disambiguator which will keep symbols uniquely named across
  modules
* Delete generated files by default
* The function `main' *must* stay in the .bc file for the JIT, but that prevents
  debugging it alone. This patch makes the old `main' become `old_main' and adds
  a new function named `main' which just calls the original with the same
  parameters, thereby keeping functionality the same.

ExecutionDriver.cpp:
* Returned to getting unique filenames
* Simplified code choosing between using and not using shared library option

llvm-svn: 7364
2003-07-28 19:16:14 +00:00
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
Chris Lattner
63f5ef84be Make a comment more accurate
llvm-svn: 5991
2003-05-03 03:20:36 +00:00
Chris Lattner
198cc8f556 Add support for debugging miscompilations with the use of the JIT or CBE!
llvm-svn: 5990
2003-05-03 03:19:41 +00:00
Chris Lattner
0b66fe7194 Implement support for bugpoint to identify which FUNCTION an optimization
is miscompiling.

llvm-svn: 5893
2003-04-24 17:02:17 +00:00
Chris Lattner
d44e355c9c Allow specifying an input file for the program being executed
llvm-svn: 5888
2003-04-23 20:31:37 +00:00
Chris Lattner
1214348847 Fix compilation on GCC 3.2
llvm-svn: 5136
2002-12-24 00:44:34 +00:00
Chris Lattner
2af84f79e3 New files for miscompilation detection
llvm-svn: 5120
2002-12-23 23:50:16 +00:00