Commit Graph

222 Commits

Author SHA1 Message Date
Chris Lattner
f2e292ce58 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:41:02 +00:00
Reid Spencer
ef9b9a7939 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
7ba98a9000 For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 23:15:56 +00:00
Reid Spencer
74ed997d52 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33786 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 14:46:29 +00:00
Chris Lattner
0331524555 shutdown at end of run
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33697 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 04:45:28 +00:00
Reid Spencer
5cbf985dcb For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoid
confusion with external linkage types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33663 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-30 20:08:39 +00:00
Chris Lattner
17be6791b8 default to emiting an uncompressed .bc file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 06:34:18 +00:00
John Criswell
e026c070c4 Remove DSA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 16:54:24 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Chris Lattner
c30598bc3a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 01:18:01 +00:00
Chris Lattner
8257bee70b This needs the callgraph data structure to stick around as long as the
printer does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:43:42 +00:00
Chris Lattner
cd950a5308 target constructors are never used
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32099 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:59:37 +00:00
Nick Lewycky
5cbc63e91a 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32055 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 00:43:14 +00:00
Bill Wendling
68fe61d6a1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-29 00:19:40 +00:00
Bill Wendling
a5b31ca856 Convert to using llvm streams instead of iostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31989 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:33:06 +00:00
Bill Wendling
31bf2b4979 Need iostream to be included for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 10:05:07 +00:00
Reid Spencer
3ed469ccd7 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31380 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 20:25:50 +00:00
Chris Lattner
aea932d27f Use LINK_COMPONENTS to specify *components* to link against instead of
using USED_LIBS to specify *libraries* to link against.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:59:09 +00:00
Chris Lattner
5e9b177cb5 Add a --disable-compression option like llvm-link/llvm-as etc have
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29941 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 17:31:55 +00:00
Reid Spencer
3a9ec2463d For PR387:
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 01:02:49 +00:00
Chris Lattner
3b2493e2a1 -analyze mode shouldn't output a .bc file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29923 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:40:26 +00:00
Chris Lattner
5d8925c7c5 Eliminate RegisterAnalysis. RegisterPass now does all that is necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29921 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:30:17 +00:00
Chris Lattner
7f500f7f2a Merge the 'analyze' mode code with the 'opt' mode code. Eliminate the
'autodetect .ll files' functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:07:01 +00:00
Reid Spencer
62c5105adc For PR885:
Consolidate the LinkAllAnalyses.h and LinkAllPasses.h headers into one
so there is no dupliation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29787 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 05:34:03 +00:00
Nate Begeman
da6169b996 Fix a build failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 04:57:01 +00:00
Reid Spencer
023fcf9776 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29785 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 02:04:43 +00:00
Reid Spencer
61c83e023f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 08:43:06 +00:00
Reid Spencer
fd90dd5d55 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29762 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 06:34:30 +00:00
Chris Lattner
0465fa9cf8 Tools require EH for their top-level try blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29035 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 00:46:19 +00:00
Chris Lattner
831b121039 Don't pass target name into TargetData anymore, it is never used or needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-16 18:23:49 +00:00
Reid Spencer
af303d53e6 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:30:27 +00:00
Chris Lattner
d74ea2bbd8 Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov!  This is a step towards closing PR786.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Owen Anderson
07000c6f01 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:33:49 +00:00
Andrew Lenharth
0cafa92371 fix printing call graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 23:45:19 +00:00
Chris Lattner
e7988aae94 reorder some libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:59:06 +00:00
Chris Lattner
171eee5471 Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24959 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 19:26:06 +00:00
John Criswell
a115643357 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24036 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-27 15:54:34 +00:00
John Criswell
e96a1a576b 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 20:35:13 +00:00
Chris Lattner
ad62eef794 Remove a now-unneeded library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23942 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:31:05 +00:00
Chris Lattner
a322a5f58f Use archive versions of these libraries, using the LinkAllPasses header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23916 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:12:20 +00:00
Reid Spencer
5a870448d1 Two changes:
1. Get rid of TOOLLINKOPTS as it is a hold over from llvm-test and only
   used to communicate additional libraries to the linker. The *standard*
   way to do that is with the LIBS variable which this change supports.

2. Allow the TARGETS_TO_BUILD variable to be set from the configuration
   substitution. This is the result of the --enable-target= parameter to
   the configure script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:14:14 +00:00
Misha Brukman
3da94aec4d Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 00:00:37 +00:00
Misha Brukman
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Jeff Cohen
e67bc1384a Get the #ifdef right on LinkAllPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19310 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 07:01:08 +00:00
Jeff Cohen
00f3db6a4c Fix minor mistakes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:29:42 +00:00
Jeff Cohen
4b807e0381 Add project opt to Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:02:53 +00:00
Reid Spencer
564a571f62 Make opt honor the quiet option when printing the bytecode warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 17:31:55 +00:00
Reid Spencer
5737913c46 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19238 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 23:57:01 +00:00