Commit Graph

1570 Commits

Author SHA1 Message Date
Chris Lattner
279015226e lli uses LinkAllCodegenComponents, so it needs this. Thanks to
Rafael Esp?ndola for pointing this out


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 18:34:16 +00:00
Chris Lattner
a563208898 Use llvm-config instead of magic JIT thing to link in libs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30091 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 06:01:43 +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
54eae9e1ec Allow things like --libs CBackend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:35:23 +00:00
Chris Lattner
ebfc3a9fc2 Switch to using llvm-config to build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30088 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 05:24:16 +00:00
Chris Lattner
9bf8ea26a9 Switch to using llvm-config to select components to link in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30085 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:47:49 +00:00
Chris Lattner
1911fd4f85 Completely rearchitect the interface between targets and the pass manager.
This pass:

1. Splits TargetMachine into TargetMachine (generic targets, can be implemented
any way, like the CBE) and LLVMTargetMachine (subclass of TM that is used by
things using libcodegen and other support).
2. Instead of having each target fully populate the passmgr for file or JIT
   output, move all this to common code, and give targets hooks they can
   implement.
3. Commonalize the target population stuff between file emission and JIT
   emission.
4. All (native code) codegen stuff now happens in a FunctionPassManager, which
   paves the way for "fast -O0" stuff in the CFE later, and now LLC could
   lazily stream .bc files from disk to use less memory.
5. There are now many fewer #includes and the targets don't depend on the
   scalar xforms or libanalysis anymore (but codegen does).
6. Changing common code generator pass ordering stuff no longer requires
   touching all targets.
7. The JIT now has the option of "-fast" codegen or normal optimized codegen,
   which is now orthogonal to the fact that JIT'ing is being done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30081 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:14:57 +00:00
Chris Lattner
3f2e0e6165 rearrange targets to satisfy dependencies. Too bad we aren't using llvm-config.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30077 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 04:04:41 +00:00
Chris Lattner
80930eb414 If a cycle exists, don't succeed building the second time around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30076 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 01:49:10 +00:00
Chris Lattner
40ad304709 remove message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30075 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 01:48:32 +00:00
Chris Lattner
de1cce7e14 Remove use of target::getName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30069 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-03 18:38:30 +00:00
Anton Korobeynikov
7d51544903 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30026 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-01 20:35:17 +00:00
Chris Lattner
1bb6f0643d Code cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29969 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 23:38:20 +00:00
Reid Spencer
e3a1069870 Delete a no-longer-supported configuration item.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29960 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-29 20:52:44 +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
7f8897f22e eliminate RegisterOpt. It does the same thing as RegisterPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:42:52 +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
a4be053d7d analyze no longer exists, don't offer to run it :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29919 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:12:06 +00:00
Chris Lattner
30967a54f4 eliminate only use of FilteredPassNameParser
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-27 22:07:43 +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
0b5a504d10 For PR797:
Remove exception throwing/handling from lib/Bytecode, and adjust its users
to compensate for changes in the interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 17:43:11 +00:00
Reid Spencer
30836fc74c Fix a bug introduced by a change in the Archive::writeToDisk interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29870 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 05:29:36 +00:00
Reid Spencer
09069b3bf5 Fix a bug caused by change in the interface of Archive::writeToDisk.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29869 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-25 05:28:17 +00:00
Reid Spencer
0ff2d31766 For PR797:
Remove exception handling from the bytecode archiver and adjust the llvm-ar
tool to accommodate the new interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29866 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-24 23:45:08 +00:00
Nate Begeman
712b835de0 Make sure that both non-asm file types are marked as experimental
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29851 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:29:52 +00:00
Nate Begeman
eb883af390 Initial checkin of the Mach-O emitter. There's plenty of fixmes, but it
does emit linkable .o files in very simple cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29850 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 21:08:52 +00:00
Reid Spencer
51c5a286ba For PR797:
Final removal of exceptions from lib/System and adjustment of users to
accommodate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 20:34:57 +00:00
Devang Patel
ca64012ac6 If unable to create tmp. file on disk then return LTO_WRITE_FAILURE status.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29844 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 16:59:25 +00:00
Reid Spencer
5a060775da For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29843 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 07:30:48 +00:00
Reid Spencer
142ca8e818 For PR797:
Remove exception throwing from Path::getDirectoryContents and its users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 06:56:27 +00:00
Reid Spencer
e5c9cb5eb6 For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29840 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:39:35 +00:00
Reid Spencer
b590a75eb5 Rearrange order to build more frequently used tools first and make the
triplet ordering (large, small, small) explicit with one triplet per line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29839 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:12:11 +00:00
Reid Spencer
c6a561e2ca Fix a typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29838 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-23 00:06:14 +00:00
Reid Spencer
e1647f4698 For PR797:
Change the Path::make*OnDisk methods exception free and adjust their usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:27:23 +00:00
Reid Spencer
ab96bb1df3 Rearrange the build order to better accommodate parallel build by reducing
memory pressure. This order spaces out large executables with small ones in
between so that in a -j2 or -j3 build, it only attempts to build only one
large executable at time. If you're doing -j4, you probably have enuogh
memory anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29835 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 23:21:21 +00:00
Reid Spencer
487447626c Make the sys::Path::GetTemporaryDirectory method not throw exceptions and
adjust users of it to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29831 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-22 19:01:30 +00:00
Reid Spencer
8ea5ecb056 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29791 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-21 06:04:45 +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
dcee9d093f Make sure the verify pass gets run after the user's loaded passes as well
when the verify-each option is given.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29783 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 20:54:38 +00:00
Reid Spencer
ec9f050560 Rename the -verify option to be -verify-each so that it doesn't conflict
with the -verify pass option. It is also more accurate in that this option
causes a verify option to be run after every pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29782 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 20:48:44 +00:00
Reid Spencer
8e33fae0ed Convert llvm-ld to use the PluginLoader like opt instead of having its
one-off (and broken) RunOptimizations function. Also, run some cleanup
passes after the user's loaded passes run. This make sure to clean up
any cruft left around by thos passes.

This patch was inspired by a patch submitted by Bram Adams.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29781 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-20 19:18:36 +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
c0431fe1ca fit in 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29754 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 18:51:28 +00:00
Chris Lattner
7f27570ae0 minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29753 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-17 18:49:52 +00:00
Reid Spencer
3b4c5d72e0 Patches to correct several bugs in llvmc.
Patches contributed by Bram Adams. Thanks Bram.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29729 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-16 20:31:44 +00:00