Commit Graph

132 Commits

Author SHA1 Message Date
Devang Patel 901a27d892 Now LoopUnswitch is a LoopPass.
llvm-svn: 34992
2007-03-07 00:26:10 +00:00
Chris Lattner a0e49f2ead 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
Reid Spencer 3aaaa0b2bd For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.

llvm-svn: 33918
2007-02-05 20:47:22 +00:00
Reid Spencer 8de97bba5a For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.

llvm-svn: 33844
2007-02-03 23:15:56 +00:00
Reid Spencer 22dbfb626f For PR1152:
Step 1: Copy gccas functionality to opt. This endows opt with a new
-std-compile-opts option to get the set of optimization passes that
gccas used. It also adds -disable-inlining and -disable-opt which
both apply only if -std-compile-opts is given. The -strip-debug option
was also removed. It just makes sure that "-strip" gets done early and
is mostly there for compatibility with gccas. Finally, a new
-verify-each option will cause the verify pass to be run after each pass.

llvm-svn: 33786
2007-02-02 14:46:29 +00:00
Chris Lattner d700d9dde4 shutdown at end of run
llvm-svn: 33697
2007-01-31 04:45:28 +00:00
Chris Lattner 19bb6b996b default to emiting an uncompressed .bc file
llvm-svn: 33420
2007-01-21 06:34:18 +00:00
Bill Wendling f3baad3ee1 Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.

llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner 76d4632d92 make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.
With this change, I can now move -stats to print when llvm_shutdown is called.

llvm-svn: 32250
2006-12-06 01:18:01 +00:00
Chris Lattner 571dd5778f target constructors are never used
llvm-svn: 32099
2006-12-01 21:59:37 +00:00
Nick Lewycky e5a8617778 Fix opt -o option. Don't pass a pointer to an auto variable which is going
away before it's needed, and don't try to delete that pointer!

llvm-svn: 32055
2006-12-01 00:43:14 +00:00
Bill Wendling afd54eb8b6 Replacing std::iostreams with llvm iostreams. Some of these changes involve
adding a temporary wrapper around the ostream to make it friendly to
functions expecting an LLVM stream. This should be fixed in the future.

llvm-svn: 31990
2006-11-29 00:19:40 +00:00
Bill Wendling a531ac291c Convert to using llvm streams instead of iostreams.
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Reid Spencer de46e48420 For PR786:
Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting
fall out by removing unused variables. Remaining warnings have to do with
unused functions (I didn't want to delete code without review) and unused
variables in generated code. Maintainers should clean up the remaining
issues when they see them. All changes pass DejaGnu tests and Olden.

llvm-svn: 31380
2006-11-02 20:25:50 +00:00
Chris Lattner 29619a9a01 Add a --disable-compression option like llvm-link/llvm-as etc have
llvm-svn: 29941
2006-08-28 17:31:55 +00:00
Chris Lattner dc729ee32b -analyze mode shouldn't output a .bc file.
llvm-svn: 29923
2006-08-27 22:40:26 +00:00
Chris Lattner 8e5e13b4fe Merge the 'analyze' mode code with the 'opt' mode code. Eliminate the
'autodetect .ll files' functionality.

llvm-svn: 29915
2006-08-27 22:07:01 +00:00
Reid Spencer a322366501 For PR885:
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.

llvm-svn: 29787
2006-08-21 05:34:03 +00:00
Nate Begeman a12dc61def Fix a build failure
llvm-svn: 29786
2006-08-21 04:57:01 +00:00
Reid Spencer c295914b7a For PR797:
Make sys::Program::ExecuteAndWait not throw exceptions and update any
affected code. It now return -9999 to signal that the program couldn't be
executed. Only one case (in bugpoint) actually examines the result code.

llvm-svn: 29785
2006-08-21 02:04:43 +00:00
Reid Spencer 713eedc1fb 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
Reid Spencer 378f7d5d20 For PR872:
Shrinkify LLVM's footprint by removing the analyze tool and moving its
functionality into the opt tool. THis eliminates one of the largest tools
from LLVM and doesn't make opt much bigger because it already included
most of the analysis passes.  To get the old analyze functionality pass
the -analyze option to opt. Note that the integeration here is dead
simple. The "main" of analyze was just copied to opt and invoked if the
-analyze option was given. There may be opportunities for further
integration such as removing the distinction between transform passes
and analysis passes.

To use the analysis functionality, if you previously did this:
  analyze $FNAME -domset -disable-verify
you would now do this:
  opt -analyze $FNAME -domset -disable-verify
Pretty simple.

llvm-svn: 29762
2006-08-18 06:34:30 +00:00
Chris Lattner 16cf81306e Don't pass target name into TargetData anymore, it is never used or needed.
llvm-svn: 28831
2006-06-16 18:23:49 +00:00
Reid Spencer 5113dc5cfe For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.

llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Owen Anderson 8c2c1e90c4 Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.

llvm-svn: 28238
2006-05-12 06:33:49 +00:00
Misha Brukman 650ba8eb56 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Jeff Cohen c8f1f4bc8e Use binary mode for reading/writing bytecode files
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Jeff Cohen 72f8f4cc3d Get the #ifdef right on LinkAllPasses.h.
llvm-svn: 19310
2005-01-06 07:01:08 +00:00
Jeff Cohen 13932fb27f Fix minor mistakes
llvm-svn: 19309
2005-01-06 06:29:42 +00:00
Jeff Cohen 00d5508496 Add project opt to Visual Studio.
llvm-svn: 19307
2005-01-06 06:02:53 +00:00
Reid Spencer 1fbccbe786 Make opt honor the quiet option when printing the bytecode warning.
llvm-svn: 19294
2005-01-05 17:31:55 +00:00
Reid Spencer c967184a50 Move the code for printing out a warning about bytecode output to a console
into lib/Support so it can be used with other tools.

llvm-svn: 19238
2005-01-01 23:57:01 +00:00
Reid Spencer 996ec72d48 For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.

llvm-svn: 19192
2004-12-30 05:36:08 +00:00
Reid Spencer b2d0fa0823 Fix usage of changed function prototype
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Misha Brukman b889b2ad97 Fix hyphenation and quoting style for great justice
llvm-svn: 17024
2004-10-15 23:22:48 +00:00
Reid Spencer 7c16caa336 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
Reid Spencer e3263ecaf0 The functions in Signal.h are now in the llvm::sys namespace - adjust
llvm-svn: 16091
2004-08-29 19:28:55 +00:00
Chris Lattner a29ca1b7df Prune unused #include
llvm-svn: 14753
2004-07-11 04:05:32 +00:00
Chris Lattner ec2a1566cc Add -load option
llvm-svn: 14740
2004-07-11 01:08:19 +00:00
Chris Lattner 1553edc2da Neuter the -q option. Stop printing the "program modified" message, ever
llvm-svn: 13844
2004-05-27 20:32:10 +00:00
Reid Spencer c8878edc5a Re-introduce the -q option and make opt always return 0, even if the
optimization pasess fail. This is necessary to avoid breaking feature
tests in the tests suite that depend on this behavior. *sigh*

llvm-svn: 13832
2004-05-27 16:28:54 +00:00
Reid Spencer 7873671463 Removed the -q option and the default message written to stderr. The
output produces confusing results in TestRunner.sh

llvm-svn: 13828
2004-05-27 08:26:22 +00:00
Chris Lattner 278f5152d3 Header file moved
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner 46e18c7f87 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 12439ffbac 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 98cd4bf06f Make 'opt -o -' work correctly instead of creating a file named './-'
llvm-svn: 10359
2003-12-10 14:41:33 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell 567fe2f312 Removed extraneous comment line.
llvm-svn: 9308
2003-10-20 20:40:30 +00:00
John Criswell 09344dcf97 Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Misha Brukman d67697411a Fix grammar.
llvm-svn: 9026
2003-10-10 17:56:49 +00:00