Commit Graph

2220 Commits

Author SHA1 Message Date
Reid Spencer
7055dafa7f For PR1336:
Functions without names deserve to be created too. This fixes:
test/CodeGen/Generic/vector-constantexpr.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36105 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 03:04:13 +00:00
Reid Spencer
53bd704b99 For PR1336:
When upgrading global vars, look for conflicts with functions as well. This
fixes test/Transforms/GlobalDCE/2002-08-17-FunctionDGE.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36103 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 02:56:33 +00:00
Reid Spencer
ff0e448801 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36096 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 00:40:57 +00:00
Reid Spencer
d23c4dd08f For PR1336:
Rewrite the upgrade of GEP indices to be a little less obtuse. This fixes
test/Assembler/2002-08-19-BytecodeReader.llx
test/Assembler/2003-08-21-ConstantExprCast-Fold.llx
test/Assembler/2004-01-11-getelementptrfolding.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36095 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-16 00:39:39 +00:00
Reid Spencer
4d26a0619d Make the generated code for ConstantInt nicer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35902 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 13:02:56 +00:00
Reid Spencer
46fea10881 Teach llvm2cpp about packed structure types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35899 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:41:49 +00:00
Reid Spencer
07441666b6 Fix several bugs relating to changes in the LLVM IR API or just outright
typos in the output. This is sufficient to get most of the llvm2cpp tests
working again.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35898 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:28:56 +00:00
Reid Spencer
baba98ae88 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35897 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:10:58 +00:00
Reid Spencer
8486744214 Fix a crash-by-unknown-exception caused by attempting to use a null pointer
as the key for a map insertion.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35896 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 12:10:08 +00:00
Reid Spencer
a9297b1a09 Fix some issues with param attrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35894 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 10:01:32 +00:00
Reid Spencer
6abd3daae1 Add support for parameter attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35893 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 09:54:08 +00:00
Reid Spencer
18da072088 For PR1146:
Put the parameter attributes in their own ParamAttr name space. Adjust the
rest of llvm as a result.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-11 02:44:20 +00:00
Devang Patel
0aa37f472a Enable loop rotate pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35863 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-10 15:43:36 +00:00
Reid Spencer
7b5d466c88 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35813 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:16:21 +00:00
Reid Spencer
460dd9b644 For PR1146:
Adapt handling of parameter attributes to use ParamAttrsList class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35812 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-09 06:15:59 +00:00
Reid Spencer
b9125b1c85 Make TempDir a PathWithStatus so we don't have to cast it to one.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35772 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 20:08:01 +00:00
Reid Spencer
7b57fe3554 Avoid temporary construction and potential for corrupted data access.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35771 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 20:06:05 +00:00
Reid Spencer
184e67e208 Don't rely on destructed local storage. Thanks, Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35769 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-08 19:59:07 +00:00
Reid Spencer
c74b461507 For PR1291:
Change uses of sys::Path class to sys::PathWithStatus in those places where
the file status information is needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35743 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 18:53:16 +00:00
Reid Spencer
a3b12ddade Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35736 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 16:14:01 +00:00
Reid Spencer
b289f19eae For PR1312:
For the short CALL/INVOKE syntax, the signedness of the result type is two
extractions away from the type argument because its a POINTER to function
type, not a function type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-07 16:10:37 +00:00
Chris Lattner
c8c5752b2f run a late dce pass to clean up extra cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35684 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-05 16:50:20 +00:00
Reid Spencer
c82a5da049 For PR1302:
Rename LinkItems as NativeLinkItems since it is filled out by the Linker
library to contain only those items deemed to be native.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35654 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-04 06:34:22 +00:00
Reid Spencer
8166a6c61d Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35579 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-02 02:08:35 +00:00
Reid Spencer
8918cb42db Upgrade the bit count intrinsics to have an i32 result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35578 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-02 02:08:05 +00:00
Reid Spencer
41b213e532 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35571 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-02 01:14:00 +00:00
Reid Spencer
de704f36c6 Don't upgrade functions that look like a bswap intrinsic but aren't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35570 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-02 01:13:36 +00:00
Reid Spencer
1e70bb6660 Handle upgrade of llvm.bswap.iXX to llvm.bswap.iXX.iXX per new naming
rules for overloaded intrinsic functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35565 91177308-0d34-0410-b5e6-96231b3b80d8
2007-04-02 00:50:28 +00:00
Reid Spencer
a145c6d766 Remove some non-sensical logic that prevented llvm-nm from working on any
file other than one named "-".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35478 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 19:49:07 +00:00
Reid Spencer
8475ec068c For PR789:
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35476 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 19:05:44 +00:00
Jeff Cohen
cf525fcbae getFileStatus has a new parameter (caught by VC++).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35466 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-29 17:29:59 +00:00
Jeff Cohen
02c91ef2cb Fix problem with llvm-config that prevented JIT from being used on x86_64
systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35416 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-28 04:45:02 +00:00
Reid Spencer
497b0b0a45 For PR1277:
Implement error handling for bytecode parsing.

Patch by Scott Michel.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35364 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-26 22:38:01 +00:00
Evan Cheng
2b48420c64 Unbreak non-debug builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35264 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-22 07:43:51 +00:00
Reid Spencer
d2920cd3d9 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35237 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 17:27:53 +00:00
Reid Spencer
91a9d54d9a For PR1243:
Okay, really fix it this time. Make sure the CurFun.Linkage is set early
and consolidate some duplicate code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35236 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 17:26:41 +00:00
Reid Spencer
bb1fd5770d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35235 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 17:15:50 +00:00
Reid Spencer
3e5affd263 For PR1256:
Make Signedness information pervasive throughout all types and values.
There is no easy way to get around this. Because the GEP instruction can
index through an arbitrarily complex value structure, it is necessary to
keep track of signedness information throughout that structure. This change
makes Signedness a full class, capable of representing Signedness in
arbitrarily shaped types. The class is then used throughout llvm-upgrade to
track signedness and differentiate between globals, locals, and functions
based on their signedness.

For PR1243:
This patch also removes bogus warnings about renaming internal globals. It
now only emits such warnings when renaming non-internal globals because
they may affect linkage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35234 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-21 17:14:36 +00:00
Reid Spencer
5eb77c7674 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35116 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-15 03:26:42 +00:00
Reid Spencer
44f87ee746 Revert last changes as they introduced other problems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35115 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-15 03:25:34 +00:00
Reid Spencer
3fae7ba5b5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-14 23:13:06 +00:00
Reid Spencer
be5c50cb33 The sign information was not propagating into the rename map so only the
last entry stored in the map could be retrieved for a given integer type.
Propagating the sign information required an invasive change to ensure that
all ValueRef (ValID) instances get the right sign information as well. Also,
put in some assertions to ensure the RenameMap always gives us out the type
that is expected.

This fixes PR1256 and
test/Assembler/2007-03-14-UgpradeLocalSignless.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35112 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-14 23:11:45 +00:00
Reid Spencer
c1882215a0 For PR1256:
Carry sign with ValID and make TypeInfo sortable (useful in a map).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-14 23:08:04 +00:00
Jeff Cohen
91f76be8ac Make older versions of bison happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35099 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-14 15:27:17 +00:00
Devang Patel
54959d6cf6 Now LICM is a LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35001 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 04:41:30 +00:00
Devang Patel
1bc89361c2 Now LoopUnswitch is a LoopPass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34992 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-07 00:26:10 +00:00
Reid Spencer
124294bc59 Obtain the exit function before execution just in case the module
disappears before we get to calling the exit function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34953 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 03:12:55 +00:00
Jeff Cohen
ca5183d445 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34917 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-05 00:00:42 +00:00
Reid Spencer
f70d677501 1. Handle errors around the ModuleProvider. This is necessary since it is
reading bytecode.
2. The interpreter can delete the ModuleProvider and replace it with
   another so don't depend on it being around after the EE is created.
3. Don't just run llvm_shutdown on exit but actually delete the EE as well.
   This cleans up a vast amount of memory (but not all) that EE retained
   through exit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34888 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-03 18:21:44 +00:00
Reid Spencer
7029725851 Make output for ConstantInt construction correct for any bitwidth.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34809 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-01 20:55:43 +00:00
Chris Lattner
00f59da1df remove use of deprecated apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 07:41:31 +00:00
Chris Lattner
4227bdbf55 remove use of deprecated api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34416 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 07:34:02 +00:00
Anton Korobeynikov
9ba8a76f8b Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 19:11:07 +00:00
Reid Spencer
3481657da6 Add missing break statements!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34341 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 06:34:39 +00:00
Reid Spencer
ac9dcb94dd For PR1195:
Change use of "packed" term to "vector" in comments, strings, variable
names, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 03:39:18 +00:00
Reid Spencer
9d6565a5b1 For PR1195:
Rename PackedType -> VectorType, ConstantPacked -> ConstantVector, and
PackedTyID -> VectorTyID. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34293 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-15 02:26:10 +00:00
Chris Lattner
10ac377f7c eliminate use of vector-related ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:05:43 +00:00
Chris Lattner
cf3d061099 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:04:17 +00:00
Chris Lattner
858d97347e remove use of vector-related ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:03:48 +00:00
Chris Lattner
1bc3fa6451 stop using me thods that take a vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34206 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 22:58:38 +00:00
Lauro Ramos Venancio
34a451ddc8 Fix build error on ARM.
Since CompilerDriver.cpp revision 1.44, llvmc must be linked against LLVMCore.a (llvm::Module::~Module) and LLVMBCReader.a
(llvm::getBytecodeModuleProvider).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34196 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-12 18:31:46 +00:00
Chris Lattner
8adde28039 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34188 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:40:10 +00:00
Chris Lattner
c02659f675 add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34187 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-11 21:39:35 +00:00
Reid Spencer
ead1aead1e Align make log output with the rest of llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34150 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-10 15:14:00 +00:00
Reid Spencer
fd57a00972 Get the use of \ right.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34100 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 17:18:42 +00:00
Reid Spencer
36a987eed0 Now that gccas and gccld are just schell scripts, adjust the build ordering
for parallel builds so that we space out the large links.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34098 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 17:02:07 +00:00
Reid Spencer
d748ea32db End of life for gccld. Remove its source code and enable the generation
of a shell script to stand in its place. The shell script just pawns the
execution off to llvm-ld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34090 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 15:21:02 +00:00
Reid Spencer
8912cdd962 Write the deprecation message to stderr instead of stdout so that it
doesn't get mingled with the output bytecode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34089 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 15:16:59 +00:00
Reid Spencer
8d0dbdbe12 Write the deprecation message to stderr instead of stdout so that it
doesn't get mingled with the output bytecode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34087 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 15:10:26 +00:00
Reid Spencer
1ce58ee900 Put in a disabled template for when gccld is replaced by the shell script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 03:15:18 +00:00
Reid Spencer
f49262e42e Get the right warning message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34075 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 03:12:21 +00:00
Reid Spencer
7d8311fe1c New shell script to replace gccld, eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34074 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 03:09:26 +00:00
Reid Spencer
708585ad8f Clean up error handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-09 03:08:06 +00:00
Reid Spencer
98a030c468 For PR1153:
Copy a couple more missing options from gccld to llvm-ld.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34061 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 19:03:11 +00:00
Reid Spencer
7f04c0867e For PR1153:
Make llvm-ld more gccld-like by having it run the same set of passes. The
delta was probably due to lack of llvm-ld being maintained. Just another
reason to have only one optimizing linker in in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34058 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 18:13:59 +00:00
Reid Spencer
ed96d1e78c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34050 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 09:08:52 +00:00
Reid Spencer
2dcb5834c0 Rename a field so there's less confusion between fields of the same name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34049 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 09:08:23 +00:00
Reid Spencer
ac6d60899d For PR1187:
Rename function scope names that conflict with basic block names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34048 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 09:07:25 +00:00
Reid Spencer
39a9792d54 For PR1187:
Always rename, never give a redef error. We could check for collapsed type
planes and generate an error if that's not the cause, but the 99.9999
percentile case will be that its the result of collapsed type planes. So,
rather than doing an expensive check, just rename.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34047 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 08:47:38 +00:00
Reid Spencer
e7c326b3f8 For PR1187:
Some changes to get the smbd.ll test case working:
1. Move the logic for CSRETCC->sret attribute out of the ResolveDefinitions
   code and into getExistingValue. This resolves it much earlier and works
   in function scope as well.
2. Fix handling of CSRETCC->sret for the store instruction.
3. Rewrite the code for handling renaming to factor in linkage types.
4. Rename a structure filed for a PATypeInfo* so it doesn't get confused
   with a field for a Type*.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34043 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 08:09:36 +00:00
Bill Wendling
62062b59df Avoid assert() in lto. Let linker handle all failures. Use LTO_WRITE_FAILURE
instead of LTO_UNKNOWN.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34036 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:48:28 +00:00
Bill Wendling
546d0fbd97 The new version of how to add passes to emit files. We explicitly call a
function to add the file writers between calls to add the passes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34035 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 01:41:07 +00:00
Reid Spencer
785a5ae0cf Regenerate for recent changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34025 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 00:21:40 +00:00
Reid Spencer
0ec8200811 For PR1187:
When a naming conflict arises, allow internal linkage functions to be
renamed without warning or error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34024 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 00:21:06 +00:00
Reid Spencer
49b8b55c29 For PR1187:
Allow @ before identifer names. Recognize the i1, i8, i16, i32, i64 keywords
as type names corresponding to bool, ubyte, ushort, uint, and ulong
respectively. While these aren't LLVM 1.9 constructs, permitting the syntax
allows post-1.9 assembly files to be upgraded.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34023 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-08 00:19:40 +00:00
Chris Lattner
7cf7c2b703 move an llvmc-specific function out of the bcreader into llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34021 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 23:48:32 +00:00
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
Chris Lattner
4d544cd646 add an option for timing bc file reading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33977 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 04:39:35 +00:00
Reid Spencer
688b0490e2 For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:19:13 +00:00
Reid Spencer
cdedc3b336 For PR411:
Change getNamedFunction -> getFunction
Make llvm-extract run the StripDeadPrototypes pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33921 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:17:53 +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
d7fc4f6f7e Fix grammaro in output message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33885 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 22:08:16 +00:00
Reid Spencer
414e37f9a3 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33859 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:12:11 +00:00
Reid Spencer
c34706c4ff For PR1151:
Make llvm-upgrade valgrind clean. Deleting type instances is a really
nasty thing to do to LLVM. This was a hold-over from the re-write.
This fixes test/Assembler/2007-01-22-UpgradeTypeMapInvalidMemory.ll and
potentially many other bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33858 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 01:05:23 +00:00
Reid Spencer
a3e60626b4 Make sure the gccas script is executable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33851 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-04 00:23:51 +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
Chris Lattner
a49fd07ec6 add an instcombine pass to clean up after heavy-lifting IP passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33843 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 23:06:03 +00:00
Reid Spencer
c74913cd69 Clean this up a bit: hide command unless verbose output requested, echo
a useful comment line, add a clean target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33834 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 16:09:12 +00:00
Reid Spencer
e3770db707 Two improvements:
1. Allow -- as well as - options (Bill Wendling)
2. Pass unrecognized options to opt and let it handle the errors, if any
   (Chris Lattner).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33798 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 21:49:27 +00:00
Reid Spencer
bd70c0b06e For PR1152:
Step 2: Make plug compatible shell script to replace gccas binary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33787 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 15:50:58 +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
Reid Spencer
832254e1c2 Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits
on large integer types.  This changes the syntax for llvm assembly to
make shl, ashr and lshr instructions look like a binary operator:
   shl i32 %X, 1
instead of
   shl i32 %X, i8 1
Additionally, this should help a few passes perform additional optimizations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-02 02:16:23 +00:00
Devang Patel
3281528de4 Add printVersion(). Linker can use it to print LLVM version number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33738 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:46:06 +00:00
Devang Patel
897b1b58af Include Makefile.config before testing OS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33735 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-01 01:18:57 +00:00
Chris Lattner
aeacab2e6d shutdown the app when done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33716 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-31 20:10:54 +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
Reid Spencer
7de2e013db Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33624 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 19:08:46 +00:00
Reid Spencer
f049c6712d For PR1142:
When an unresolved definition is found, check to see if it is only unresolved
because the csretcc was upgraded to the sret param attribute. Such changes
change the function type and lead to unresolved definitions. In such cases, just
cast the function to the type expected by the CallInst. That is, cast to the
version of the function that has the sret param attribute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33623 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 19:07:18 +00:00
Reid Spencer
b7046c7352 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33615 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 05:41:34 +00:00
Reid Spencer
43f76c9925 Upgrade old csret calling convention into sret parameter attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33614 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-29 05:41:09 +00:00
Nick Lewycky
3fdf2c3cd4 Drop CSRET from here too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33604 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 15:51:15 +00:00
Anton Korobeynikov
ce13b85e6c Merge error at my side. Fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33601 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 15:25:24 +00:00
Anton Korobeynikov
9adeaa2f59 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33599 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:37:39 +00:00
Anton Korobeynikov
c4c87a30d2 Drop CSRET CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33598 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:36:18 +00:00
Anton Korobeynikov
b10308e440 Propagate changes from my local tree. This patch includes:
1. New parameter attribute called 'inreg'. It has meaning "place this
parameter in registers, if possible". This is some generalization of
gcc's regparm(n) attribute. It's currently used only in X86-32 backend.
2. Completely rewritten CC handling/lowering code inside X86 backend.
Merged stdcall + c CCs and fastcall + fast CC.
3. Dropped CSRET CC. We cannot add struct return variant for each
target-specific CC (e.g. stdcall + csretcc and so on).
4. Instead of CSRET CC introduced 'sret' parameter attribute. Setting in
on first attribute has meaning 'This is hidden pointer to structure
return. Handle it gently'.
5. Fixed small bug in llvm-extract + add new feature to
FunctionExtraction pass, which relinks all internal-linkaged callees
from deleted function to external linkage. This will allow further
linking everything together.

NOTEs: 1. Documentation will be updated soon.
       2. llvm-upgrade should be improved to translate csret => sret.
          Before this, there will be some unexpected test fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33597 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 13:31:35 +00:00
Reid Spencer
3c0f6cf49b Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33595 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 00:52:05 +00:00
Reid Spencer
1e3c64e183 For PR1137:
When a value is found to have the same name as another, try harder to
disambiguate when its a type plane collapse issue and when it isn't. We
traverse the type to see if it contains an integer. If it does not then
we issue the error because it can't be resulting from integer type planes
collapsing. Otherwise we just rename it, even if that's a bit of overkill.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33594 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-28 00:51:40 +00:00
Reid Spencer
38f682b8b2 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33547 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 20:31:18 +00:00
Reid Spencer
8f78af9f8f Make sure that an upgraded index is also inserted into the VIndices
otherwise it gets ignored.

This fixes test/CodeGen/X86/2006-05-11-InstrSched.ll

Thanks to Evan Cheng for noticing this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33546 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 20:29:52 +00:00
Reid Spencer
d7c4f8ceff Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33545 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 19:59:25 +00:00
Reid Spencer
aa777bd8ad Ensure that gep_upgrade zext instructions we insert have unique names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 19:58:59 +00:00
Reid Spencer
7e97288b62 Remove extraneous ; to make some versions of bison happy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33541 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 18:26:23 +00:00
Devang Patel
758e7b1ed8 Order createSimplifyLibCallsPass() after a set of function level passes
so that these function passes are managed by CallGraphPassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33540 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 18:17:59 +00:00
Reid Spencer
9373d272b2 Remove the SignedType class and other dead code. Improve comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33538 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 17:13:53 +00:00
Reid Spencer
950bf60301 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33532 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:19:09 +00:00
Reid Spencer
efd53d57a6 For All These Bugs:
PR645
PR761
PR1082
PR1122

Completely rewrite llvm-upgrade. This should be its final design. Any future
changes will use this same design.  The changes involve the following:

1. Make this work very much like the 1.9 AsmParser
2. Retain old upgrades dating back to release 1.2 time frame.
3. Merge in some of the upgrades between 1.9 and 2.0 (e.g. icmp/fcmp).
4. Attach a Signedness value (Signless, Unsigned, Signed) to every type,
   Value, Constant, Instruction, and list of those things in the Parser.
   Use these to make signedness decisions for instruction upgrades.
5. Implement unique name upgrade for function values and global values.
6. Identify rename cases that might cause problems and warn about them.
   For example: renaming a global variable with external linkage.
7. Generate a 2.0 IR using VMCore. This is necessary for numerous
   reasons and has the advantage that it never goes out of date.
8. Use the AsmPrinter to make the output nice.
9. Clean up error and warning messages from 1.9 form.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33531 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-26 08:18:34 +00:00
Jeff Cohen
ac2dca9a6f Fix a bunch of missing semicolon parse errors from bison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33426 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 19:30:52 +00:00
Reid Spencer
5c4db8af71 Run GenLibDeps.pl with the configured PERL path to handle different install
locations for Perl on different systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33424 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-21 15:53:18 +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
Chris Lattner
ac98024e5d Run an instcombine pass after inlining but before scalarrepl. This allows
instcombine to clean up the code, which makes more code suitable for SRoA.
This helps C++ code in particular, e.g. speeding up tramp3d by 31%.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33235 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 07:41:51 +00:00
Reid Spencer
b6673a9e60 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:41:46 +00:00
Reid Spencer
3d6cd1b149 For PR1113:
Increment the counter after the second use, not after the first use. This
fixes PR1113.

Also, rename some classes for simplicity and to more naturally be
reminscient of LLVM 1.9. This in preparation for additional classes that
will provide a scaled down model of the LLVM 1.9 IR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:40:33 +00:00
Chris Lattner
42a7551725 rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.
rename Type::getIntegralTypeMask to Type::getIntegerTypeMask.

This makes naming much more consistent.  For example, there are now no longer any
instances of IntegerType that are not considered isInteger! :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33225 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 02:27:26 +00:00
Reid Spencer
30d0c58fc9 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33212 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 00:26:18 +00:00
Reid Spencer
e0a15bbc02 Reorganize things a bit in preparation for rewrite. Although this looks
like a lot, its really only two changes:

1. Move stuff that should be private to .y out of the .h file.
2. Make all semantic values pointers.

This cleans up the silly destroy methods and changes them to delete. It
also moves the TypeInfo and ValueInfo classes into the .y where we can
modify them more readily because they have no clients any more.

This shouldn't result in any functional changes in llvm-upgrade.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-15 00:25:53 +00:00
Reid Spencer
195a32e5ef Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 04:40:16 +00:00
Reid Spencer
692ede5f2f Can't generate "bool" any more. Change to i1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33179 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 04:39:47 +00:00
Reid Spencer
f6e5459408 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33172 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 00:23:06 +00:00
Reid Spencer
2b21761556 Don't attempt to upgrade argument to va.start and va.end if there are none.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33171 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 00:22:40 +00:00
Reid Spencer
f0c9a6572d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 00:13:49 +00:00
Reid Spencer
c4d9625b29 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 00:03:30 +00:00
Reid Spencer
fbb7b69fc6 For PR1093:
Implement upgrading of the varargs intrinsics. These must now have i8*
arguments. This patch bitcasts arguments to i8* and fixes the prototypes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-13 00:02:00 +00:00
Reid Spencer
609ca3e653 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33140 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:10:51 +00:00
Reid Spencer
9421014881 Remove support for upgrading NOT. The llvm-upgrade lexer didn't recognize
it either. NOT is just plain illegal now.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33139 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 20:09:48 +00:00
Chris Lattner
f6e7bb4a5e unbreak i1 constants with the cpp writer, eliminate special case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33133 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 18:37:29 +00:00
Reid Spencer
a54b7cbd45 For PR1064:
Implement the arbitrary bit-width integer feature. The feature allows
integers of any bitwidth (up to 64) to be defined instead of just 1, 8,
16, 32, and 64 bit integers.

This change does several things:
1. Introduces a new Derived Type, IntegerType, to represent the number of
   bits in an integer. The Type classes SubclassData field is used to
   store the number of bits. This allows 2^23 bits in an integer type.
2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and
   64-bit integers. These are replaced with just IntegerType which is not
   a primitive any more.
3. Adjust the rest of LLVM to account for this change.

Note that while this incremental change lays the foundation for arbitrary
bit-width integers, LLVM has not yet been converted to actually deal with
them in any significant way. Most optimization passes, for example, will
still only deal with the byte-width integer types.  Future increments
will rectify this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33113 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 07:05:14 +00:00
Chris Lattner
ed30989895 Fix persistent conflict madness by removing these from cvs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33111 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 05:35:13 +00:00
Reid Spencer
579dca12c2 Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33110 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-12 04:24:46 +00:00
Reid Spencer
4fe16d607d Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33076 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 18:21:29 +00:00
Zhou Sheng
6b6b6ef167 For PR1043:
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33073 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-11 12:24:14 +00:00
Chandler Carruth
d5ee896193 Fixing a ">" redirect to be a ">>" redirect, so a sed command doesn't get clobbered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33032 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-09 02:38:29 +00:00
Devang Patel
27376106d9 Modules are consumed when they are merged together by Linker.
Clear modules vector so that destructure does not try to
delete these modules again. Patch by Chandler Carruth.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33017 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 18:42:27 +00:00
Chris Lattner
c0974a1344 fix atexit. This is an overcomplex way of calling exit, but it is required,
as the jit intercepts exit calls to implement atexit handlers.  This
fixes SingleSource/UnitTests/2003-05-14-AtExit


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33008 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 07:36:34 +00:00
Chandler Carruth
40e274b579 Build libLLVMlto on non-Darwin architectures. Resolves PR1055: http://llvm.org/PR1055
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33006 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-08 06:25:29 +00:00
Chris Lattner
2db43c864e relax type
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32990 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:13:39 +00:00
Reid Spencer
12969887a3 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32987 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:07:39 +00:00
Reid Spencer
e3671f90f2 Upgrade the llvm.isunordered intrinsics to "fcmp uno" instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32986 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 08:07:10 +00:00
Chris Lattner
f74edf28b6 this is an overcomplex way to call exit :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32978 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 06:43:08 +00:00
Chris Lattner
ddc6f353c0 Add C wrappers for the LTO library (PR1081). Patch by Chandler Carruth!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32966 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:53:43 +00:00
Chris Lattner
11fdadf407 fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32965 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 23:51:31 +00:00
Reid Spencer
78d033e086 For PR411:
Take an incremental step towards type plane elimination. This change
separates types from values in the symbol tables by finally making use
of the TypeSymbolTable class. This yields more natural interfaces for
dealing with types and unclutters the SymbolTable class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32956 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 07:24:44 +00:00
Reid Spencer
f8383def5c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32955 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 06:04:32 +00:00
Reid Spencer
cb03b5a122 For PR1082:
Solve several related problems by making variable names more unique and
dealing with recursive phi nodes. Unfortunately, this doesn't solve the
main issue reported in the PR, but its a step in that direction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32953 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 06:03:09 +00:00
Reid Spencer
f72538ee2e Add an option for getting the C compiler flags, --cflags.
Patch contributed by Chandler Carruth


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32950 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 02:48:03 +00:00
Reid Spencer
a7c46fa921 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32944 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 00:23:53 +00:00
Reid Spencer
520071af0a For PR1080:
Emit the correct syntax for icmp and fcmp constant expressions. The
predicate goes outside the parentheses not inside. This was a change made
in the assembler without the corresponding change made in llvm-upgrade.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32942 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-06 00:12:05 +00:00
Reid Spencer
8b31b2dea6 Fix dependencies. The lexer depends on the grammar for the UpgradeParser.h
file so make it depend on the .y file as well. This ensures that in
parallel builds the lexer is built after bison runs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32937 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 22:03:42 +00:00
Reid Spencer
319a730353 Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32908 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:20:02 +00:00
Reid Spencer
bcdd54cf6f Adjust to new header file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32907 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:19:32 +00:00
Reid Spencer
90eb4d653c Major update of llvm-upgrade:
1. Completely revise the type system so that types are handled as const
   objects and not created multiple times, cloned, or otherwise copied.
   This gets around memory issues, saves memory, and also emulates LLVM's
   no-two-types-of-the-same-shape-created semantics.
2. Adjust the handling of global names. Basically, we cannot rename them
   for a variety of reasons: linking, forward references, etc.
3. Detect global names that have name conflicts as the result of collapsed
   type planes or redefinitions that llvm-as no longer accepts. These will
   produce warnings on stderr and one of the globals will be renamed.
4. Rename ParserInternals.h as UpgradeInternals.h so it doesn't conflict
   in the debugger with ParserInternals.h from lib/AsmParser.
5. Move the guts of the TypeInfo class into the grammar so we aren't
   implementing large functions in a header file. This also helps with
   debugging a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32906 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-05 17:18:58 +00:00
Chris Lattner
37e01c5e90 regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32880 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 18:46:42 +00:00
Chris Lattner
b9240544d7 If we hit a parse error, emit something bad to the output stream. This ensures that
llvm-upgrade < foo | llvm-as | llvm-dis

will fail if llvm-upgrade fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32879 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-04 18:45:51 +00:00
Reid Spencer
eff838e18c Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32848 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:45:42 +00:00
Reid Spencer
7596fd0774 Implement many new type features including upreferences, proper retention
of structure contents, counts of packed and array types, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32847 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:45:17 +00:00
Reid Spencer
e8fc2f97cc Finish implementation of variable renaming to handle collapsed type planes
by correctly handling up references and enumerated types. Previously there
was some confusion of these two. Thanks to Chris Lattner for demistifying
llvm up references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32846 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 23:43:55 +00:00
Evan Cheng
7f7fdcca8f A bit more debugging printf's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32832 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-03 07:44:30 +00:00
Reid Spencer
7356ae4015 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32817 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 06:34:08 +00:00
Reid Spencer
2128607fd1 Permit signed and unsigned integer constants to be used with either signed
or unsigned integer types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32816 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 06:33:02 +00:00
Reid Spencer
52402b0bef Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32811 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 05:45:11 +00:00
Reid Spencer
2b8036e2c8 For PR1070:
Revise the upgrade parser to keep track of types more faithfully and use
this information to resolve name conflicts resulting from collapsed type
planes. The type planes have collapsed because the integer types are now
signless so that uint and int became i32. Where two planes existed for uint
and int, only i32 exists. Any variable names depending on the type planes
to pmake the identifier unique would cause a conflict. This patch resolves
that conflict for many but not all cases.

Situations involving the integer types and pointers to them are handled
by this patch.  However, there are corner cases that are not handled
well, such as:

%t1 = type { uint, int }
%t2 = type { int, uint }

void %myfunc(%t1* one, %t2* two) {
  %var = load %t1* one
  %var = load %t2* two
}

In the scenario above, %t1 and %t2 are really the same type: { i32, i32 }
Consequently attempting to name %var twice will yield a redefinition error
when assembled.

While this patch is sufficien to allow the llvm/test suite to pass, More
work needs to be to complete the handling of these corner cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32810 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-02 05:44:33 +00:00
Reid Spencer
f5626a38a7 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32805 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-01 01:20:41 +00:00
Reid Spencer
16222c006d For PR1070:
Remove useless bitcasts by commenting them out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32804 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-01 01:20:16 +00:00
Reid Spencer
71d2ec9e6d For PR950:
Convert signed integer types to signless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32790 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 06:02:26 +00:00
Reid Spencer
05e52a1b35 For PR950:
Don't attempt to parse both the old and new grammars. It is near impossible
to get it right. Remove support for the new define keyword and don't
attempt to insert parameter attributes because there isn't enough
contextual information for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32784 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:45:57 +00:00
Reid Spencer
6fd36abf5e Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32772 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:35:03 +00:00
Reid Spencer
a9d7e89fa9 For PR950:
Fix several bugs and update for new assembly syntax. Changes made include:
1. Fixing rules for icmp/fcmp instructions to not require a closing paren
   at the end. This was a cut-and-paste error from a previous commit.
2. Changing things like Out << " " to Out << ' '
3. Adding the "define" keyword for function definitions
4. Adding support for packed structures


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32771 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-29 20:33:37 +00:00
Reid Spencer
e4d87aa2de For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and
been replaced with ICmpInst and FCmpInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-23 06:05:41 +00:00
Reid Spencer
961a0f2670 Ignore the LibDeps.txt.tmp file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-22 02:02:45 +00:00
Reid Spencer
f6c511cbb1 Remove a call to Type::isSigned().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32651 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-18 07:58:01 +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
Reid Spencer
8782e53fd5 Ressurrect this needed file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32537 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 08:10:16 +00:00
Reid Spencer
b6f4ff2cb0 Ressurrect the Stacker "st" configuration. Someday this will all go
away, but until then Stacker needs its configuration.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32536 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-13 08:09:48 +00:00
Reid Spencer
b0e9f722da Generate the correct cast opcode for constant expressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32461 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 01:31:37 +00:00
Reid Spencer
4fbcdf61e8 Fix PR1040:
Don't rebuild llvm-config if none of the library dependencies changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32455 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-12 00:43:38 +00:00
Chris Lattner
ca3aa26c20 make statistics and timing info print even if the JIT'd program calls exit
instead of returning from main.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32414 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-10 19:01:52 +00:00
Reid Spencer
5fe27e7b99 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32405 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:41:25 +00:00
Reid Spencer
7969681c8b Fix test/Regression/Assembler/2006-12-09-Cast-To-Bool.ll
Do not upgrade casts of bool to bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32404 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 19:40:41 +00:00
Reid Spencer
187ccf8d31 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 16:57:22 +00:00
Reid Spencer
a00c5a6d87 When upgrading cast to bool to a setne, generate icmp ne instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32399 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-09 16:56:55 +00:00
Reid Spencer
f0cf132db7 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32303 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 04:23:03 +00:00
Reid Spencer
7fed45ea18 Create an option to turn off generation of fcmp instructions while still
allowing integer setxx instructions to be converted to icmp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32302 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 04:22:23 +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
Jim Laskey
2792cfb82d No need to update generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32275 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 11:03:10 +00:00
Jim Laskey
98ba588c03 Fix build for older versios of bison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32274 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 10:57:33 +00:00
Reid Spencer
996fb28c0f Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32269 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:30:15 +00:00
Reid Spencer
9f8b383353 Don't turn on SETCC upgrade yet!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32268 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:29:36 +00:00
Reid Spencer
3e5ab8c7f5 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32267 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:25:46 +00:00
Reid Spencer
49aeed7455 Fix upgrade of setcc with bool operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32266 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:25:22 +00:00
Chris Lattner
c6c384314a reword message
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32257 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:39:18 +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
Reid Spencer
f12ee4250d Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32235 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:21:25 +00:00
Reid Spencer
999b2df114 For PR645:
Keep track of global constant and variable definitions for eventual use
in resolving conflicts between global and local symbol usage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32234 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-05 19:18:29 +00:00
Reid Spencer
14042388a1 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32178 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-04 15:41:36 +00:00
Reid Spencer
57f28f9775 Match the llvmAsmParser's handling of ICmp and FCmp instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 07:10:26 +00:00
Reid Spencer
bec0b59229 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 03:16:48 +00:00
Reid Spencer
ec9c4f4348 Add a needed #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32141 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 03:15:23 +00:00
Reid Spencer
229e9369df Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32140 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 22:14:11 +00:00
Reid Spencer
2b40438597 Implement upgrade of setcc instruction to icmp/fcmp, but don't enable it
yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32139 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 22:09:27 +00:00
Reid Spencer
787207427a Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32128 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 20:21:22 +00:00
Reid Spencer
a8ca090440 Support several new upgrades:
div -> fdiv/udiv/sdiv
  rem -> frem/urem/srem
  except -> unwind
  uninitialized -> external
as well as tracking the element type of pointers, packed, and array.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32127 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 20:19:56 +00:00
Reid Spencer
f459d39613 Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 16:19:52 +00:00
Reid Spencer
1d64a6c8d8 Implement the GEP upgrade for non-constant unsigned indices
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32121 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 16:19:28 +00:00
Reid Spencer
f8483657b3 Keep lists of values so they can be examined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32120 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 15:16:01 +00:00
Reid Spencer
f49c7a5f05 Build llvm-update now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32116 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 04:46:36 +00:00
Reid Spencer
a50d5962ed Add support for global types and type resolution. Fix several minor
formatting and spacing bugs. This is sufficient for llvm-upgrade to
correctly upgrade all of llvm/test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32114 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-02 04:11:07 +00:00
Reid Spencer
280d801839 Handle upgrade of fp -> ptr cast with fp -> int -> ptr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32109 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 23:40:53 +00:00
Reid Spencer
0b7e507247 Don't convert {} into []!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32106 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:42:01 +00:00
Reid Spencer
fcb5df8f2c Allow the new cast instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32104 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:34:43 +00:00
Reid Spencer
f7bde225f3 Upgrade shr to ashr and lshr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32103 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 22:26:37 +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
Reid Spencer
f2d5532c66 Don't treat numeric (untyped) constants as a ConstInfo, just pass the
string and let ConstVal add the type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32096 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:52:30 +00:00
Reid Spencer
16244f4026 First version of llvm-upgrade that can correctly upgrade all of
test/Feature


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32092 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 21:10:07 +00:00
Reid Spencer
d154b57ab4 valgrind clean version of llvm-upgrade
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32090 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 20:36:40 +00:00
Reid Spencer
e77e35e8b1 First version of llvm-upgrade that can correctly upgrade a large test
case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32089 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 20:26:20 +00:00
Nick Lewycky
1a7f6ff272 Remove extra header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32056 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-01 01:05:14 +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
Reid Spencer
96839be87f Allow llvm-upgrade to read from stdin. Configure the lexer for reading
from C++ std::istream.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32041 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 16:50:26 +00:00
Reid Spencer
e8776d81f9 Ignore generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32031 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:37:43 +00:00
Reid Spencer
e7c3c60d86 Initial, non-functional, version of llvm-upgrade. This version just echos
its input. Committed for safekeeping purposes. Don't use this yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-30 06:36:44 +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
Reid Spencer
5e1452c856 Add an -append-exit-code option to bugpoint. This will cause bugpoint to
append "exit <retcode>" to the end of the output file. This is used by
the nightly tester to make bugpoint match the output generated by the
RunSafely.sh script so it doesn't find false positives.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31960 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 07:04:10 +00:00
Reid Spencer
3da59db637 For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-27 01:05:10 +00:00
Nick Lewycky
565706b93e Update to new predicate simplifier VRP design. Fixes PR966 and PR967.
Remove predicate simplifier from default gcc3 pipeline. New design is too
slow to enable by default.
Add new testcases for problems encountered in development.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31895 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-22 23:49:16 +00:00
John Criswell
d452599f6f Added the --disable-compression option which controls whether the
generated bytecode uses compression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31891 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-21 22:50:24 +00:00
Bill Wendling
a089d4430d Need <iostream> for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31821 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-17 10:09:22 +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
2803b4cc58 Minor style fixes from review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31685 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 19:59:25 +00:00
Reid Spencer
dc31a8a70c Add a -disable-loop-extraction option to bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31683 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 19:05:02 +00:00
Reid Spencer
4952143236 For PR998:
Fix an infinite loop in the Linker and a few other assorted link problems.

Patch contributed by Scott Michel. Thanks, Scott!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31680 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-11 11:54:25 +00:00
Chris Lattner
fef02427cd completely revert patrick's enhancement to bugpoint. Though it makes bugpoint
speed up, it sometimes makes it crash on complex bc files, which isn't very nice.


With this, bugpoint can reduce the 176.gcc failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 06:24:56 +00:00
Chris Lattner
cd6f46e2ac add a new bugpoint mode -llc-safe. This uses LLC for both halves of a
miscompilation.  This is useful for working around GCC+CBE bugs or for handling
programs that CBE doesn't support (e.g. inline asm) when searching for
optimizer bugs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31588 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-09 05:57:53 +00:00
Reid Spencer
3822ff5c71 For PR950:
This patch converts the old SHR instruction into two instructions,
AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not
dependent on the sign of their operands.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31542 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-08 06:47:33 +00:00
Reid Spencer
7b28955c4c Fix a problem in the the last patch that subverts error message printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31466 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:53:08 +00:00
Jeff Cohen
d41b30def3 Unbreak VC++ build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31464 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-05 19:31:28 +00:00
Reid Spencer
7bd78731eb Make llvm2cpp -pedantic clean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31389 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 00:05:16 +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
Reid Spencer
0a783f783c For PR950:
Replace the REM instruction with UREM, SREM and FREM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-02 01:53:59 +00:00
Bill Wendling
22706e82d5 Forgot a }
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31226 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 20:22:04 +00:00
Bill Wendling
b3d83a3ed5 Re-added the part where it tries to remove all global variables first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31225 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-27 20:18:06 +00:00
Devang Patel
38187d6a56 Save temp. bc files when saveTemps flag is true. Use final output file
name supplied by linker to construct temp bc file names.

Remove tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31205 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 20:46:22 +00:00
Reid Spencer
1628cec4d7 For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-26 06:15:43 +00:00
Bill Wendling
4e3be89cb5 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31182 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 18:36:14 +00:00
Devang Patel
08fb05c3ac Supply alignment info to linker through LLVMSymbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31181 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-25 18:10:07 +00:00
Devang Patel
6152b7ec25 Instead of hard coding global prefix, use TargetAsmInfo.
Add LTO destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31168 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-24 18:41:02 +00:00
Devang Patel
2a4dd68535 Fix typo. Add more comment. Avoid extra hash_map search.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31144 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 23:57:53 +00:00
Devang Patel
f2ca21f88f Add removeModule().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31142 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-23 23:12:26 +00:00
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Chris Lattner
137d0ec3da Make the bugpoint reduction heuristics more effective. Patch submitted by
Domagoj Babic, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30863 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-10 21:42:25 +00:00
Devang Patel
dc4c38279f Use FindProgramByName instead of FindExecutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30846 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 21:16:05 +00:00
Devang Patel
9f5d48bcb1 Do error checking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30842 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:20:13 +00:00
Chris Lattner
54e4c02d8e Remove a dead var noticed by Yorion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30841 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 20:12:37 +00:00
Devang Patel
3f0e5e2057 Use GetTemporaryDirectory. Fix http://llvm.org/bugs/show_bug.cgi?id=894
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30838 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-09 19:04:51 +00:00
Chris Lattner
e354df963d simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30661 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:24:48 +00:00
Nick Lewycky
b156afb791 Enable 'predsimplify' optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 00:08:16 +00:00
Devang Patel
c7cfbc58ad Use abstract class to facilitate dlopen() interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30569 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-21 17:22:55 +00:00
Chris Lattner
d42235051b comment out debug code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30401 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 23:01:10 +00:00
Chris Lattner
c600f3c337 Add a new -cbe-bug mode, which works just like -run-llc, except that it uses
LLC as the reference compiler to reduce testcases for bugs in GCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30400 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-15 21:29:15 +00:00
Anton Korobeynikov
b74ed07bfd Adding dllimport, dllexport and external weak linkage types.
DLL* linkages got full (I hope) codegeneration support in C & both x86
assembler backends.
External weak linkage added for future use, we don't provide any
codegeneration, etc. support for it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30374 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 18:23:27 +00:00
Chris Lattner
43f249adb7 add a new (hidden) -disable-core-files option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 06:17:09 +00:00
Devang Patel
544ea34a9f Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30315 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 05:49:10 +00:00
Nick Lewycky
e290c6d250 Fix --enable-valgrind. Add room for the new arguments, and don't keep
a pointer to a temporary.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 04:20:17 +00:00
Nick Lewycky
40394bc419 Add --enable-valgrind option to run optimizations through valgrind to
pick up on memory errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30311 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 03:49:54 +00:00
Devang Patel
97d92d50aa GlobalValue with InternalLinkage may have operands with ExternalLinkage
type. Do not ignore these operands while finding external references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30310 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 01:35:13 +00:00
Chris Lattner
cf508bc38e Move ipsccp pass earlier to clean up obvious bogosities
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30232 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-09 21:30:13 +00:00
Chris Lattner
cf8cb6d564 ok this really works :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30195 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:33:49 +00:00
Devang Patel
aa91978ea2 Remove redundant include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:20:25 +00:00
Chris Lattner
70c3537a92 Need to include Makefile.config to get the value of $(OS). Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30193 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:08:50 +00:00
Anton Korobeynikov
294492b25f Enabling LTO building on Darwin only right now. This probably should be
removed after 'PIC vs non-PIC' problem solution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-08 18:00:43 +00:00
Devang Patel
998051a221 Using addPassesToEmitWholeFile is not a good idea here.
Use FunctionPassManager to do the job.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30160 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 21:41:11 +00:00
Devang Patel
76ed7b1cf5 Add linker into list of LINK_COMPONENTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30159 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 21:36:55 +00:00
Devang Patel
0300352103 Add lto into the list of PARALLEL_DIRS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30154 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 20:21:58 +00:00
Devang Patel
bdaf3dc8c3 Use addPassesToEmitWholeFile() instead of addPassesToEmitFile()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30153 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 20:20:56 +00:00
Chris Lattner
afd39f0cc4 Change DisambiguateGlobalSymbols to not rename asm globals, which breaks
bugpoint on leopard.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30150 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 18:21:07 +00:00
Devang Patel
a291a68161 Add getTargetTriple() that linker can use to query target architecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 20:16:28 +00:00
Devang Patel
0701a2f70d Keep track of all modules crated using a name to module map.
Add private member function getMoudle().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30130 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:50:26 +00:00
Devang Patel
ed872865d0 Instead of demangling symbol name by hand, use original name, which was
used to mangle symbol name, directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30124 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 00:45:52 +00:00
Devang Patel
2681023488 Extract target triplet from optimized module.
Untabify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 00:28:22 +00:00
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
Patrick Jenkins
032091d7f6 Adding FindBugs.cpp so the -find-bugs option will work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 16:41:52 +00:00
Patrick Jenkins
6a3f31cb70 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29703 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-15 16:40:49 +00:00
Devang Patel
2198f9cec4 untabify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29686 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 23:37:18 +00:00
Devang Patel
30235dad4b Use mangler, instead of addUnderscore(), to get mangled name.
Now, LLVMSymbol keeps symbol original name and mangled name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29679 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:36:16 +00:00
Reid Spencer
70bbf9a3dd Provide indentation of the generated program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29678 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-14 22:35:15 +00:00
Reid Spencer
b43ce5a148 Don't print double newline for --src-root and --obj-root as it tends to
confuse shells that might use this output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-11 21:50:24 +00:00
Anton Korobeynikov
3acbb9b9d4 Fixed typo. Thanks, Reid.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 22:55:53 +00:00
Anton Korobeynikov
de9c02b171 Removed usage of "sort", which can lead to undeterministic behavior on mingw & cygwin platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29532 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 21:52:23 +00:00
Devang Patel
304d5f2edc Collect references from globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29530 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-04 19:10:26 +00:00
Reid Spencer
ecfe0888b6 For PR845:
Enable the makefile check on the result of find-cycles.pl. LLVM is now
cycle free and we intend to keep it that way. This patch will fail the
build if cycles are found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29517 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 21:46:42 +00:00
Reid Spencer
d8c20a9cf8 Fix a typo in the name of expand_dependencies.
Make the dependency line pattern match handle white space better.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29516 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 21:45:35 +00:00
Devang Patel
30f63adef8 Make it fit into 80-columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29503 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:26:30 +00:00
Devang Patel
94a0ac9bea Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29502 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:25:36 +00:00
Devang Patel
f5a156deee Simplify. Use addprefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29501 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 17:18:45 +00:00
Chris Lattner
202ae321f8 Now that SparcV9 is gone, this logical can be simplified significantly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29498 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:59:17 +00:00
Devang Patel
bbd1cb43f9 Remove ARM for the moment since it is a work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29495 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 16:14:09 +00:00
Devang Patel
a89d47f54d Add new tool, lto, to do link time optimization. This tool installs
dynamic library that linker can use to optimize llvm byte codes at
link time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-03 15:44:57 +00:00
Chris Lattner
d3a680ae2c Fix the build on case-sensitive filesystems :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29457 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 22:34:35 +00:00
Chris Lattner
2f2d32437a no need to check readability here
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29449 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:22:21 +00:00
Chris Lattner
33b0e9c644 No need to check isWriteable here (which isn't sufficient anyway). Just attempt
to do the operation and if it fails, oh well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:12:29 +00:00
Chris Lattner
8bdbb04f9b Use Path::getFileStatus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29445 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:09:46 +00:00
Chris Lattner
0b32d8b764 Use Path::getFileStatus to get status-related info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29444 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 18:04:01 +00:00
Jim Laskey
13ec702c43 Introducing plugable register allocators and instruction schedulers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29434 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-01 14:21:23 +00:00
Chris Lattner
252ad03d7d Change Path::getStatusInfo to return a boolean and error string on an error
instead of throwing an exception.  This reduces the amount of code that is
exposed to exceptions (e.g. FileUtilities), though it is clearly only one step
along the way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29395 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:03:44 +00:00
Patrick Jenkins
68b163059d Updating the comments above SplitFunctionsOutOfModule in ExtractFunction.cpp to reflect the changes made to that function. Specifically I am removing the FIXME comment because the issue has been addressed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29385 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 18:03:01 +00:00
Patrick Jenkins
e47863e212 This commit improves bugpoints speed. On my G4 this changed caused kimwitu++ to run through bugpoint in 1091.15 seconds (user + system time). The time it took to run this on my G4 before I made these changes is 1420.82 seconds (user + system time). This is a speedup of about 5.5 minutes.
This is faster because SplitFunctionsOutOfModule no longer calls Clone Module and then removes the functions it doesnt want from the module returned. Instead it creates a module and copies over the specified functions, making changes to the new and old module where neccessary. This reduces the memory demand.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 01:19:28 +00:00
Reid Spencer
a6e216f456 Undo last commit, which was committed accidentally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 23:19:00 +00:00
Reid Spencer
1bc686433b Changes to support cross-compiling LLVM. The GenLibDeps.pl script needs to
have a compile-host version of "nm", not build-host. In order to effect this
we must use autoconf to determine the correct "nm" to use and propagate that
through the makefiles, through llvm-config and finally to GenLibDeps.pl as
an optional argument.
Patch contributed by Anton Korobeynikov. Thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29368 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 23:00:30 +00:00
Chris Lattner
7686b57803 Avoid a "scary" make warning for the 1.8 release. This should be reenabled
right after 1.8 "ships".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29308 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 21:14:04 +00:00
Chris Lattner
d8e421d40a Add llvm2cpp to DIRs list
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 20:19:06 +00:00
Reid Spencer
dd3f6aa91f Make changes necessary for stopping the build if a cyclic library
dependency is found. The find-cycles.pl script now exits with a return code
that equals the number of cycles found. The Makefile was changed to ignore
the status code of find-cycles.pl. This should be removed once the libraries
are free of cyclic dependencies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29290 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 17:10:54 +00:00
Reid Spencer
44b60ec455 Build llvm-config to identify library cycles earlier in the build process.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29289 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-26 17:06:02 +00:00
Devang Patel
2ebc1f82a2 Fix MacOSX build failures. (pr841)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29246 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 19:44:55 +00:00
Chris Lattner
02b04b4d34 Build more debugger/selectiondag libraries as archives instead of .o files.
This works around bugs in some versions of the cygwin linker.

Patch contributed by Anton Korobeynikov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29239 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-21 00:10:47 +00:00
Andrew Lenharth
74bda2e320 Fix linking on Alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29219 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-20 17:27:58 +00:00
Reid Spencer
8d8a7ffe58 Finish removal of EH usage from the Archive library. The REQUIRES_EH flag
in lib/Bytecode/Archive/Makefile is now removed. One small step closer to
a smaller LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29067 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 20:56:50 +00:00
Reid Spencer
3039b99697 Remove EH use from the Archive library and adjust its users accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29066 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-07 19:09:14 +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
8eaafdedb2 Fix PR819, llvm2cpp should read .bc files, not .ll files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29030 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 23:48:57 +00:00
Chris Lattner
05ac92ca7d Change the verifier to never throw an exception. Instead verifyModule canoptionally return the string error, which is an easier api for clients touse anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29017 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-06 18:02:27 +00:00
Reid Spencer
3d48e53584 Split long comment lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-03 16:46:03 +00:00
Chris Lattner
130e2a3611 Pass -Xlinker flags to gcc when it builds the shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28939 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 20:35:36 +00:00
Devang Patel
e2f8ad854d Fix cut-n-pasto in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28928 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-27 18:07:29 +00:00
Chris Lattner
f8625d9018 Remove unneeded libs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28900 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 17:26:13 +00:00
Reid Spencer
28f6f2218b For PR811:
Don't both with the "C" and "cc" extensions as they aren't common and they
the "C" extension conflicts with the "c" extension on operating systems
that have case insensitive file names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28899 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-21 17:21:39 +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
68464b74b8 Actually add instructions to the list of defined values so it gets
recognized as such!  This prevents the CppWriter from treating every
operand as a forward reference and making a mess of the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28800 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 16:09:59 +00:00
Chris Lattner
9686ae7f4e 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-13 03:10:48 +00:00
Chris Lattner
629e48768a After telling GCC to type of the input file with -x asm/-x c, switch back to
-x none, to not foul up autodetection of .a file or .dylibs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28741 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-09 21:31:53 +00:00
Chris Lattner
7f3ac4108d This no longer needs plugins, this it doesn't need all of VMCore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28723 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 00:25:44 +00:00