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

64 Commits

Author SHA1 Message Date
David Goodwin
85da1c6622 Support remote execute for ARM.
llvm-svn: 75292
2009-07-10 21:39:28 +00:00
Chris Lattner
739a32b190 switch the .ll parser into SMDiagnostic.
llvm-svn: 74734
2009-07-02 22:46:18 +00:00
Owen Anderson
4fa7e54329 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.

llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson
cf112e59c3 Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson
81b8dabb53 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.

llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Chris Lattner
f28c74870f Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.

llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Dan Gohman
df0e24acce Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.

This enables the following use cases:
 - bugpoint llc against an llc command from a different build
 - bugpoint llc against the same llc with different command-line options
 - and more...

Also, document the existing "custom" interpreter options.

llvm-svn: 60681
2008-12-08 04:02:47 +00:00
Bill Wendling
9f23194fe2 Detabify.
llvm-svn: 47596
2008-02-26 10:46:10 +00:00
Chris Lattner
309aeb140b remove attributions from tools.
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Gabor Greif
9e76bbf30e Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage

llvm-svn: 37877
2007-07-04 21:55:50 +00:00
Chris Lattner
e24a5def42 use the new MemoryBuffer interfaces to simplify error reporting in clients.
llvm-svn: 36900
2007-05-06 23:45:49 +00:00
Chris Lattner
ad70a3024f switch tools to bitcode from bytecode
llvm-svn: 36872
2007-05-06 09:32:02 +00:00
Chris Lattner
ec83593e41 add bitcode support
llvm-svn: 36849
2007-05-06 05:47:06 +00:00
Anton Korobeynikov
87e945c62d Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688

llvm-svn: 34349
2007-02-16 19:11:07 +00:00
Chris Lattner
43d0b955a3 push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.

llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Bill Wendling
b9780660dd Fix for PR960. Improves bugpoint so that it removes global variable
initializers as well. This is only a first pass. It can be slow because
it clones the module for each pass. An obvious improvement is not to do that.

llvm-svn: 31182
2006-10-25 18:36:14 +00:00
Reid Spencer
c7c0e6c6ef For PR797:
Rid the Assembly Parser of exceptions. This is a really gross hack but it
will do until the Assembly Parser is re-written as a recursive descent.
The basic premise is that wherever the old "ThrowException" function was
called (new name: GenerateError) we set a flag (TriggerError). Every
production checks that flag and calls YYERROR if it is set. Additionally,
each call to ThrowException in the grammar is replaced with GEN_ERROR
which calls GenerateError and then YYERROR immediately. This prevents
the remaining production from continuing after an error condition.

llvm-svn: 29763
2006-08-18 08:43:06 +00:00
Patrick Jenkins
689b3e1549 This commit adds a new feature called find-bugs. The find-bugs option can be invoked on a .bc file from the command like with -find-bugs and a list of passes you wish to test. This procedure takes the set of optimization passes the user specifies, randomizes the passes, runs the passes on the specified .bc file, compiles the program, and finally runs the program checking its output vs the .bc file with no optimizations. This process repeats until either the user kills bugpoint or an error occurs in the optimizations, program complitation, or the running of the program. If an error occurs, bugpoint attempts to diagnose the error by eliminating passes that are not at fault and code that is not needed.
llvm-svn: 29703
2006-08-15 16:40:49 +00:00
Chris Lattner
05b6364eef Teach bugpoint to kill optimization passes that run over the timeout limit,
which allows it to debug optimizer infinite loops.  This patch is contributed
by Nick Lewycky, thanks!

llvm-svn: 28763
2006-06-13 03:10:48 +00:00
Chris Lattner
a9bca01256 Move ToolRunner.(cpp|h) into the bugpoint directory
llvm-svn: 28699
2006-06-06 22:30:59 +00:00
Chris Lattner
084de55c60 print a nice error if bugpoint gets an error reading inputs. Bug identified
by coverity.

llvm-svn: 28298
2006-05-14 19:15:56 +00:00
Reid Spencer
36b05575fe For PR351:
Generally, remove use of fork/exec from bugpoint in favor of the portable
sys::Program::ExecuteAndWait method. This change requires two new options
to bugpoint to tell it that it is running in "child" mode. In this mode,
it reads its input and runs the passes. The result code signals to the
parent instance of bugpoint what happened (success, fail, crash).

This change should make bugpoint usable on Win32 systems.

llvm-svn: 24961
2005-12-22 20:02:55 +00:00
Misha Brukman
960a8d47d7 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Reid Spencer
6676fe75c3 Allow compilers that can't distinguish between a class instantiation and
the declaration of a function to compile this.

llvm-svn: 19073
2004-12-20 19:16:12 +00:00
Reid Spencer
e2af7fb67b For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names

llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Reid Spencer
f89154ee5c LinkModules is now in the Linker class
llvm-svn: 18863
2004-12-13 03:01:03 +00:00
Reid Spencer
7a004d2749 Linker.h has a new home.
llvm-svn: 17801
2004-11-14 23:00:08 +00:00
Reid Spencer
c4abcbefb1 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.

llvm-svn: 16137
2004-09-01 22:55:40 +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
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
Misha Brukman
e2d817bc26 Wrap at 80 cols.
llvm-svn: 12701
2004-04-06 17:04:30 +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
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
ddbd4a598b Format a bit more nicely
llvm-svn: 11651
2004-02-20 05:56:48 +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
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
2621ce4cef ctor arguments changed order
llvm-svn: 11595
2004-02-18 20:22:25 +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
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
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
Brian Gaeke
53682403cf Flush output after writing out the list of function names.
llvm-svn: 9138
2003-10-15 20:42:48 +00:00
Chris Lattner
32f66afbad Eliminate the bugpoint -mode option, by making bugpoint automatically infer the root of all of your problems
llvm-svn: 9115
2003-10-14 20:52:55 +00:00
Chris Lattner
5851e74388 Unbreak code generator debug mode
llvm-svn: 9106
2003-10-13 21:04:26 +00:00
Chris Lattner
20dd7a8b54 Use new method
llvm-svn: 8573
2003-09-17 05:00:07 +00:00