Commit Graph

2553 Commits

Author SHA1 Message Date
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
Reid Spencer
2991b01b18 Shorten a value description so --help out isn't so wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28721 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:07:51 +00:00
Reid Spencer
e3f0561545 Make sure this tool links in all of libVMCore.a because it can --load
shared objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28720 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:06:50 +00:00
Reid Spencer
af303d53e6 For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28719 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 23:03:13 +00:00
Chris Lattner
dc050090ea Remove useless noop argument
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28706 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-07 00:43:18 +00:00
Chris Lattner
3e347f28f1 Fix a bug in the following scenario.
1. llvm is built with objroot = OBJ and installed.
2. OBJ is deleted or install tree is shipped.
3. llvm-config is run.

In this scenario, llvm-config shouldn't emit an error message at #3, it
should just know it's not running in the objdir :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28704 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 23:54:15 +00:00
Chris Lattner
d179de5ca2 Add a new --libfiles option, for getting fully-qualified pathnames to libraries.
This can be used for tools that want makefile rules to depend on the libraries
(e.g. so the tool is relinked when a library changes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28701 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:38:29 +00:00
Chris Lattner
f1b20d8620 Move ToolRunner.(cpp|h) into the bugpoint directory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28699 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 22:30:59 +00:00
Chris Lattner
73ebd0974c Make the llvm-config library dependency database depend on all of the libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28695 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 17:43:03 +00:00
Reid Spencer
51ab5c8862 Add the -Xlinker option to bugpoint which allows an option to be passed
through to gcc when its being used as a linker. This allows -L and -l
(and any other) options to be added so that non-complete bytecode files
can be processed with bugpoint. The -Xlinker option can be added as many
times as needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28692 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-06 00:00:42 +00:00
Chris Lattner
2e1f0ed151 temporarily add back this option, I will remove it in a couple days
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28675 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 23:43:27 +00:00
Chris Lattner
7c5357f0b9 Fix a -pedantic warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28670 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 22:11:06 +00:00
Chris Lattner
0cd059eddb Add flags to get access to build_mode, objdir, srcdir etc.
If installed, ignore the prefix the tree is configured with: always use the
prefix that llvm-config is currently at, which may be different if the tree
was moved.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 22:03:50 +00:00
Chris Lattner
16ad618fc2 Make llvm-config "do the right thing" when an install tree is relocated or
when run out of a build directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28668 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 21:48:10 +00:00
Chris Lattner
abdbae7bd3 Capture the build mode (e.g. Debug/Release) in the llvm-config script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28665 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 19:13:29 +00:00
Chris Lattner
584073a8cf Convert to standard file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28663 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:58:21 +00:00
Chris Lattner
41655cd0ce Remove a couple of things no longer figured out by autoconf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28662 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:55:36 +00:00
Reid Spencer
2d2c2f2bb8 Add several more autoconf variables so that new features can be implemented
by our illustrious project leader.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 18:31:41 +00:00
Chris Lattner
e02b97bf5b Add a gross "--use-current-dir-as-prefix" option as a temporary workaround
for the "build with one prefix and move the installed files to another dir"
problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28654 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 01:23:18 +00:00
Chris Lattner
411c33da6a Remove some variables from the configured section that aren't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28653 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 01:04:35 +00:00
Chris Lattner
06e752e768 Remove more "alpha is archive" stuff.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28652 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:56:15 +00:00
Reid Spencer
409411ea26 Suppress -pedantic warnings about print("%a")
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:39:08 +00:00
Chris Lattner
6574994397 Remove obsolete CORE_IS_ARCHIVE support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28649 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:30:31 +00:00
Chris Lattner
c929c66756 Update the ignore file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28647 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-02 00:23:15 +00:00
Reid Spencer
f977e7bc83 Teach CppWriter how to emit an inline (partial) function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28645 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 23:43:47 +00:00
Reid Spencer
ad67a04e75 Restore default arguments for llvm2cpp back to health by declaring an
emitted variable to actually have a type (picky, picky, picky!)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28625 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 07:24:29 +00:00
Reid Spencer
659a243b93 Fix a bug where incorrect C++ was being emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28615 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 04:21:20 +00:00
Reid Spencer
dee05112a6 Build llvm-config into the ToolDir not in the local directory. This makes
it more likely to be in a developer's path and consistent with all the
other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28613 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:52:49 +00:00
Reid Spencer
b0e2fbc730 Oops, llc needs libTarget.a not Target.o
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28611 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:42:33 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-01 01:30:27 +00:00
Andrew Lenharth
539d871ce3 fix utostr
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28597 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 20:18:56 +00:00
Reid Spencer
12803f5b6b Major reorganization and extension of the code. The diff on this will be a
mess as functions were moved around into a better ordering. The code was
extended to provide various -gen-* options to better control what the
generated output should be. Currently it is possible to generate entire
modules (three different ways), functions, global variables, and types.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28589 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 17:31:38 +00:00
Reid Spencer
25edc3565c Don't generate module definitions when the -fragment option is given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28583 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-31 04:43:19 +00:00
Reid Spencer
ac28588def llvm2cpp is ready to be compiled so add it to the makefile, but make it
optional.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28570 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:20:55 +00:00
Reid Spencer
15f7e01065 Fix more bugs. This version now passes all of the Feature test except for
a floating point conversion problem with NAN in intrinsics.ll. llvm2cpp
makes an attempt to provide the correct conversion, based on the
implementation in the CBackend writer, but it doesn't get NAN correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28568 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 21:18:23 +00:00
Reid Spencer
1a2a0cc5a3 Fix many small bugs in llvm2cpp. This patch gets llvm2cpp working with
everything except PHI nodes and one odd recurse/opaque type situation.
PHI nodes forward reference INSTRUCTIONS (aaaaaaaahhhhhhh!) :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28554 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 10:21:41 +00:00
Reid Spencer
66c873479f First complete version of llvm2cpp that doesn't crash on any of the Feature
tests. The output in a few cases still doesn't compile, however.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28547 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-30 03:43:49 +00:00
Chris Lattner
6d1727cf14 Silly cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28544 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:52:52 +00:00
Chris Lattner
74f48d133c silly cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28543 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:52:05 +00:00
Reid Spencer
e0d133f448 Next batch of implementation:
1. Get rid of old AsmWriter cruft that's not needed.
2. Implement several instructions. Enough to get by globalvars.ll and
   alignment.ll in the Feature test suite.
3. Handle constants properly (don't repeat definitions).
4. Make the output compatible with llvm-dis for diff purposes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28541 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:08:06 +00:00
Reid Spencer
ba570d700b Fix file header comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28540 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:06:28 +00:00
Reid Spencer
4edca3325b Remove temporary testing rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28539 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 18:05:59 +00:00
Reid Spencer
74e032a4d4 Fix two bugs in the CppWriter.cpp:
1. Return the module from the MakeModule function so it can be verified.
2. Make sure types get generated with their names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28536 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:58:15 +00:00
Reid Spencer
d9169d3cbe Fix the file's comment block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28535 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:35:29 +00:00
Reid Spencer
fb0c0dc960 Initial Commit of llvm2cpp
This is a safekeeping commit. The program is not finished. It currently
handles modules, types, global variables and function declarations. Blocks
and instructions remain to be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28528 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 00:57:22 +00:00
Reid Spencer
19b7e0e0ca For PR786:
Minor tweaks in public headers and a few .cpp files so that LLVM can build
successfully with -pedantic and projects using LLVM with -pedantic don't
get warnings from LLVM. There's still more -pedantic warnings to fix.


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-24 17:04:05 +00:00
Reid Spencer
adbc9b7f88 Remove the llvm-db and bugpoint restrictions from the win32 platform so
they can be compiled with ming32. The use of fork(2) has been removed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28369 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-17 21:20:50 +00:00
Rafael Espindola
7bc59bc395 added a skeleton of the ARM backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28301 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 22:18:28 +00:00
Chris Lattner
c78098291e Free memory allocated by copy_env.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28299 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:17:28 +00:00
Chris Lattner
53bd1b9de7 print a nice error if bugpoint gets an error reading inputs. Bug identified
by coverity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:15:56 +00:00
Chris Lattner
f877e60616 Fix a bug found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28297 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:11:40 +00:00
Chris Lattner
2f86362af8 Delete memory allocated by CopyEnv
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28288 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 18:38:13 +00:00
Chris Lattner
b923b2e04b Remove dead return value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28245 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 17:28:36 +00:00
Owen Anderson
07000c6f01 Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:33:49 +00:00
Chris Lattner
67ef9e4304 wrap long line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28113 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 23:35:31 +00:00
Chris Lattner
b93b0347d8 Adjust to use proper TargetData copy ctor
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28112 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-04 21:18:40 +00:00
Reid Spencer
b3bd5ca0fc For PR764:
Don't check in the LibDeps.txt and FinalLibDeps.txt files to CVS because
the content differs from platform to platform. Instead, adjust the makefile
so that a dummy llvm-config is built if Perl is not available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28084 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 17:49:50 +00:00
Owen Anderson
a69571c799 Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:29:57 +00:00
Chris Lattner
776eb6b21e This no longer needs the JIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27942 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-22 05:04:23 +00:00
Reid Spencer
7f872bb00d Okay, llvm-config is good to go now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27916 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:14:39 +00:00
Reid Spencer
05dee5064f Several Changes To Support Building llvm-config:
1. If Perl is not available, don't run Perl dependent targets.
2. Check in FinalLibDeps.txt for build environments that can't build it
   because there's no Perl processor.
3. Ensure that FinalLibDeps.txt depends on LibDeps.txt so it is
   automatically regenerated.
4. Support objdir != srcdir building.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27915 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:13:58 +00:00
Reid Spencer
563ff1cc92 Don't build llvm-config until issues are resolved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27914 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 21:00:24 +00:00
Reid Spencer
2e1284d569 Build the llvm-config directory as a tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27913 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 20:53:23 +00:00
Reid Spencer
d075dfb0cf Update the library dependencies for 1.8 with SparcV9 now gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27910 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 19:50:53 +00:00
Chris Lattner
43c40ffa41 Never link in sparcv9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27884 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-20 17:07:46 +00:00
Andrew Lenharth
0cafa92371 fix printing call graphs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27820 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 23:45:19 +00:00
Chris Lattner
8b57ff75be Add a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27795 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 05:31:20 +00:00
Chris Lattner
6a58e0e144 Add a warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-18 05:26:10 +00:00
Chris Lattner
7f71e21972 one too many l's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27641 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-13 04:21:31 +00:00
Reid Spencer
59524a5287 Distribute CVS versions of lex files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27629 91177308-0d34-0410-b5e6-96231b3b80d8
2006-04-12 20:56:12 +00:00
Jeff Cohen
2f51914d82 Get JIT/Interpreter working on Windows again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27037 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 02:53:49 +00:00
Reid Spencer
019a0a9725 Ignore the lexer output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27034 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 02:22:22 +00:00
Reid Spencer
1c070fc10b Remove the interpreter component as its not working at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27021 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 01:10:39 +00:00
Reid Spencer
f39fcc787b Ignore temporary files generated by building.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27010 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:44:24 +00:00
Reid Spencer
b195d9d365 Update to llvm-config tool, by Erik Kidd:
1. Check for Perl and only build llvm-config if its available.
2. Add some virtual components
3. Don't depend on "standard" location for Perl, but configured location
4. Document the tool with a POD file.

This version is now ready for testing by users.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27005 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 23:21:29 +00:00
Reid Spencer
025213e9f2 Don't print out ugly command line when building LibDeps.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 22:42:50 +00:00
Reid Spencer
ff9b038b20 Updated for library changes:
1. LLVMCBackend.o now depends on LLVMCodeGen.o (why we're not sure)
2. LLVMExecutionEngine.o no longer depends on LLVMInterpreter.o nor LLVMJIT.o
Thanks, Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26976 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 06:15:27 +00:00
Chris Lattner
ef98691ca3 remove always-null IntrinsicLowering argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26971 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-23 05:28:02 +00:00
Reid Spencer
f2722ca339 These changes are necessary to support the new llvm-config tool. llvm-config
is a handy tool for users of LLVM who want to be able to quickly get
information about LLVM's configuration. It is intended to be used in the
command line of other tools. Documentation will be forthcoming in a
subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26952 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-22 15:59:55 +00:00
Reid Spencer
355ef219d2 The library dependency file in flat format. This file is generated by the
makefile using the utils/GenLibDeps.pl script with the -flat option. It
records the dependencies between libraries in such a way that the
llvm-config script can easily read it (in makefile dependency format).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26876 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:12:30 +00:00
Reid Spencer
0fab2b15ab First cut at the Makefile for llvm-config. This initial version just provides
the rule for building the LibDeps.txt file using GenLibDeps.pl. This needs
to be done from time to time manually in order to keep LibDeps.txt up to
date.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26875 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-19 22:10:53 +00:00
Chris Lattner
cc540ebabc add an assert to get a slightly better msg about this problem
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26812 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-16 23:16:17 +00:00
Reid Spencer
9dce2b3380 Convert llvm.cs.uiuc.edu -> llvm.org
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26748 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-14 05:54:52 +00:00
Chris Lattner
5a7a9e5386 Fix a really annoying bug in bugpoint that made reducing C++ testcases
almost impossible with the new CFE.  It now guarantees that the static
ctor/dtor list is correctly split between the modules.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26624 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 23:55:38 +00:00
Chris Lattner
42d0b455ec Fit to 80 columns.
Add support for running static ctor/dtors that aren't handled by __main.
This fixes programs with the JIT and the new CFE, such as HBD.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-08 18:43:36 +00:00
Reid Spencer
78df5c3121 Make sure command line options are parsed before we try to add the LibPath
(-L options) to TheLinker. Problem noticed by Wink Saville.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26571 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-06 06:38:19 +00:00
Andrew Lenharth
7c0a93785e For transforms the behave differently if main goes away, add an option to prevent bugpoint from removing main
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26557 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-05 22:21:36 +00:00
Robert Bocchino
86d064d44c Implemented -quiet feature for analyze
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26494 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 02:12:04 +00:00
Chris Lattner
a2a51607a6 Turn on loop unswitching tonight
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26312 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 07:33:49 +00:00
Chris Lattner
e7988aae94 reorder some libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26309 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-22 00:59:06 +00:00
Chris Lattner
27630d500e remove support for the skeleton target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26236 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-16 21:10:57 +00:00
Chris Lattner
1828ee191c Adjust to new style "generated files in CVS" mechanism for lex output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26163 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-14 05:16:35 +00:00
Chris Lattner
cb0dfba9e1 SparcV8 -> Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26008 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-05 08:30:45 +00:00
Chris Lattner
fdcc71eaa8 Let bugpoint work on sparc with v9 instructions enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25958 91177308-0d34-0410-b5e6-96231b3b80d8
2006-02-04 05:02:27 +00:00
Andrew Lenharth
e4da1ddada Pass plugins on to children when optimizing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-26 18:37:21 +00:00
Chris Lattner
fc4417837a Remove dead #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25520 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:38:14 +00:00
Chris Lattner
7e07b24b39 It doesn't make sense to give llc a list of passes on the command line,
LLVM doesn't use it and it can't work anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25519 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:36:05 +00:00
Chris Lattner
04666d8a39 this doesn't work, remove it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25518 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-23 00:32:33 +00:00
Chris Lattner
e31a9ccb9c add explicit #includes of iostream
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25510 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 22:53:40 +00:00
Chris Lattner
86a5484079 Add explicit #includes of <iostream>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25509 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-22 22:53:01 +00:00
Chris Lattner
4df8665bf9 Revert this, I didn't mean to commit it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25382 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:40:24 +00:00
Chris Lattner
79959d21c7 Add support for programs with a null argv[0]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25379 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-17 00:32:28 +00:00
Reid Spencer
f4484f3e16 For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25169 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-10 03:14:40 +00:00
Reid Spencer
de83cee28b Fix line length of a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25149 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-08 22:40:10 +00:00
Chris Lattner
7ac534f234 remove unused header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25101 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-05 00:21:37 +00:00
Jim Laskey
b2efb853f0 Applied some recommend changes from sabre. The dominate one beginning "let the
pass manager do it's thing."  Fixes crash when compiling -g files and suppresses
dwarf statements if no debug info is present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25100 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 22:28:25 +00:00
Jim Laskey
292a1afb4a Adding MachineDebugInfo as a immutable pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25088 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-04 13:42:02 +00:00
Reid Spencer
1adc3de914 Revert removal of std:: prefixes and addtion of "using namespace std;".
This violates the LLVM coding standards.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25050 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 09:07:29 +00:00
Duraid Madina
64c9e7a339 don't need this anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25049 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 02:50:44 +00:00
Duraid Madina
ea8aed7ef3 delete file portably
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25048 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-30 02:47:21 +00:00
Reid Spencer
78b0e6a42e General cleanup:
1. Don't mix C++ and C standard I/O, convert to C++ iostreams
2. Wrap long lines
3. use the std namespace to simplify/shorten the code


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25042 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-29 21:13:45 +00:00
Duraid Madina
4e4fe664d8 ditto
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25038 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:58:12 +00:00
Duraid Madina
6927b067bc more compliance stufff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25037 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 06:56:09 +00:00
Duraid Madina
d885251216 behold my standards-compliant humps!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25033 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 05:56:36 +00:00
Duraid Madina
3de3b05538 WAKEY WAKEY
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25032 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-28 05:48:55 +00:00
Jeff Cohen
46e1ee9791 Get bugpoint building with VC++ again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24977 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-23 05:00:38 +00:00
Reid Spencer
c4bb052ecc For PR351:
Generally, remove use of fork/exec from bugpoint in favor of the portable
sys::Program::ExecuteAndWait method. This change requires two new options
to bugpoint to tell it that it is running in "child" mode. In this mode,
it reads its input and runs the passes. The result code signals to the
parent instance of bugpoint what happened (success, fail, crash).

This change should make bugpoint usable on Win32 systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24961 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 20:02:55 +00:00
Chris Lattner
171eee5471 Fix test/Regression/Other/2002-01-31-CallGraph.ll after the recent callgraph
rework.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24959 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 19:26:06 +00:00
Reid Spencer
156aa35eb5 Implement PR679:
* Changed the -rpath option from cl::opt to cl::list
* Changed the interface to GenerateNative to take a std::vector<std::string>
  instead of just a std::string
* Changed GenerateNative to generate multiple -Wl,-rpath, options to be
  passed to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24930 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-22 01:50:56 +00:00
Reid Spencer
73a74be705 Implement PR512:
This patch adds a -post-link-opts option to llvm-ld which allows an arbitrary
program to optimize bytecode after linking. The program is passed two file
names. The first is the input (linked bytecode) the second is where it must
place its output (presumably after optimizing). If the output file is bytecode,
it is used as a substitute for the input. This will allow things like poolalloc
to be written as a separate program instead of a loadable module or built into
LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24893 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-21 05:03:23 +00:00
Chris Lattner
be193839fa rename option for consistency with -mcpu -mattr etc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24734 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:19:55 +00:00
Chris Lattner
60844d46ce rename option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24732 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:19:18 +00:00
Chris Lattner
3015e6061c provide an option to override the target triple in a module from the commandline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 05:00:21 +00:00
Chris Lattner
f33b8663bd provide an option to override the target triple in a module from the command
line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24729 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-16 04:59:57 +00:00
Chris Lattner
3bd5fac76f Fix printing of the instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24714 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 22:01:07 +00:00
Reid Spencer
f574494e13 Remove -start-group and -end-group no-op options, accidentally committed
in last patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24710 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-14 19:08:51 +00:00
Reid Spencer
328ead9fce Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24699 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-13 20:00:37 +00:00
Andrew Lenharth
0fccc74103 This solves the problem of the CBE renaming symbols that start with . but the assembly side still trying to reference them by their old names. Should be safe untill we hit a language front end that lets you specify such a name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24626 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-06 20:51:30 +00:00
Chris Lattner
52098898b4 Revert my previous patch which broke due to lazy streaming of functions
from .bc files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24575 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-02 19:00:22 +00:00
Chris Lattner
48ba8221af If a module has a main, but it is defined externally, refuse to run it.
Attempting to run it will find lli's main, which isn't the desired effect.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24569 91177308-0d34-0410-b5e6-96231b3b80d8
2005-12-01 22:48:23 +00:00
Chris Lattner
cb8346563b Allow users to specify -Wl,-native* multiple times if they please
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24392 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-17 16:08:04 +00:00
Chris Lattner
178e0c41ce Add a new -fast option, which generates code quickly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24234 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-08 02:12:17 +00:00
Chris Lattner
2b11995547 add a hack that fixes:
llvm-gcc main.c -Wl,-native -o a.out -g

This is important because it used by many configure scripts.

John, please pull this onto the 1.6 branch.


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


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24023 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-26 20:35:13 +00:00
Chris Lattner
604b95bd24 transforms before analyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23976 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-25 17:10:30 +00:00
Chris Lattner
ad62eef794 Remove a now-unneeded library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23942 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 02:31:05 +00:00
Chris Lattner
465be21950 pull in the archive version of this lib to reduce exe size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23929 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:13:21 +00:00
Chris Lattner
5e22a6486a Pull in the archive versions of these libs to reduce executable size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23928 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:12:14 +00:00
Chris Lattner
df514ef5f8 Link in datastructure as a relinked o file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23926 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:07:56 +00:00
Chris Lattner
831843d5d1 Link to archive versions of libraries instead of the relinked ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23925 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:05:53 +00:00
Chris Lattner
31360613cb Use the new LinkAllAnalyses.h header instead of forcing passes to be
in relinked object files


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23922 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 01:00:13 +00:00
Chris Lattner
a322a5f58f Use archive versions of these libraries, using the LinkAllPasses header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23916 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 00:12:20 +00:00
Chris Lattner
2094725532 Shrinkify to make --help output look better
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23911 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:37:13 +00:00
Chris Lattner
7b7593c481 shrinkify the option name a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23910 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 22:35:42 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
pointer marking the end of the list, the zero *must* be cast to the pointer
type.  An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.

The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-23 04:37:20 +00:00
Chris Lattner
07be8d4212 document this as experimental
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23883 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-22 22:00:45 +00:00
Chris Lattner
fbcd54f2cb Fix PR637
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23784 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-18 06:29:43 +00:00
Chris Lattner
7b5634d213 Speed up isBytecodeLPath from 20s to .01s in common cases. This makes -native
not completely painful to use.  Once we decide a directory has a bytecode
library, we know it this function returns true, no need to scan entire directories.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23405 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 06:11:24 +00:00
Chris Lattner
f394213021 1. Do not use .c_str() to keep a persistent handle on a temporary string.
2. Concatenate -lfoo and -L/bar options into a single option instead of
   passing "-L /bar" (for example) which doesn't work on Darwin.
3. Send -v output to stderr instead of stdout


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23404 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-23 06:05:46 +00:00
Jim Laskey
839615a510 Add help support for -mcpu and -mattr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23222 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-02 19:27:43 +00:00
Jim Laskey
b1e1180ca0 1. Use SubtargetFeatures in llc/lli.
2. Propagate feature "string" to all targets.

3. Implement use of SubtargetFeatures in PowerPCTargetSubtarget.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23192 91177308-0d34-0410-b5e6-96231b3b80d8
2005-09-01 21:38:21 +00:00
Chris Lattner
d00b28809d Allow bugpoint+PPC codegen to use fsqrt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23128 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-29 13:14:24 +00:00
Reid Spencer
68a24bdba4 Implement PR614:
These changes modify the makefiles so that the output of flex and bison are
placed in the SRC directory, not the OBJ directory. It is intended that they
be checked in as any other LLVM source so that platforms without convenient
access to flex/bison can be compiled. From now on, if you change a .y or
.l file you *must* also commit the generated .cpp and .h files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23115 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-27 18:50:39 +00:00
Chris Lattner
aed98fa886 If the user interrupts bugpoint, don't extract loops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22603 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 23:25:56 +00:00
Chris Lattner
1d924f6070 Pass -export-dynamic to gcc when compiling with -native and the link is
performed with -export-dynamic (aka. -disable-internalize).

Patch by Nicholas Riley!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22601 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 22:07:38 +00:00
Chris Lattner
f9aaae06cd When the user hits ctrl-c, bugpoint should attempt to stop reduction as
quickly as possible and output what it has so far.  If they hit it twice,
bugpoint is killed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22579 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-02 02:16:17 +00:00
Jeff Cohen
d29b6aa608 Keep tabs and trailing spaces out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22565 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-30 18:33:25 +00:00
Reid Spencer
540f7d6018 Run the verifier pass after all the other passes rather than before them.
This catches mistakes in the passes rather than just verifying the bytecode
input to llc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22534 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-28 04:00:49 +00:00
Reid Spencer
4418c2b3ac Make the verifier pass run (in debug mode) in llc. This adds a sanity check
to llc when debugging. Also allow other passes to be run from llc.
Patch contributed by Michael McCracken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22532 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-28 02:25:30 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Chris Lattner
a3efca16f2 Fix PR576.
Instead of emitting a JIT stub that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
header:
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=1]
        call void %resolverCast( int %0 )
        ret void
}

Emit one that looks like this:

internal void %l1_main_entry_2E_ce_wrapper(int) {
Entry:
	%fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache               ; <void (int)*> [#uses=2]
        %isNull = seteq void (int)* %fpcache, null              ; <bool> [#uses=1]
        br bool %isNull, label %lookupfp, label %usecache

usecache:               ; preds = %lookupfp, %Entry
        %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ]            ; <void (int)*> [#uses=1]
        call void %fp( int %0 )
        ret void

lookupfp:               ; preds = %Entry
        %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) )           ; <sbyte*> [#uses=1]
        %resolverCast = cast sbyte* %resolver to void (int)*            ; <void (int)*> [#uses=2]
        store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache
        br label %usecache
}


This makes the JIT debugger *MUCH* faster on large programs, as
getPointerToNamedFunction takes time linear with the size of the program, and
before we would call it every time a function in the text module was called from
the safe module (ouch!).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22387 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 01:00:32 +00:00
Reid Spencer
8f1ac1c631 Make sure we don't error out if an invalid path is used, just simply
exit from isBytecodeLPath with "false".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22360 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 16:48:52 +00:00
Reid Spencer
a229c5cce7 Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22354 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 03:08:58 +00:00
Nate Begeman
72b286b0a0 Add support for assembling .s files on mac os x for intel
Add support for running bugpoint on mac os x for intel


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22351 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-08 00:23:26 +00:00
Reid Spencer
dd04df0ec3 For PR495:
Get rid of the difference between file paths and directory paths. The Path
class now simply stores a path that can refer to either a file or a
directory. This required various changes in the implementation and interface
of the class with the corresponding impact to its users. Doxygen comments were
also updated to reflect these changes. Interface changes are:

appendDirectory -> appendComponent
appendFile -> appendComponent
elideDirectory -> eraseComponent
elideFile -> eraseComponent
elideSuffix -> eraseSuffix
renameFile -> rename
setDirectory -> set
setFile -> set

Changes pass Dejagnu and llvm-test/SingleSource tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 23:21:43 +00:00
Reid Spencer
c7f083297c For PR495:
Change interface to Path class:
readable -> canRead
writable -> canWrite
executable -> canExecute

More (incremental) changes coming to close 495.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-07 18:21:42 +00:00
Chris Lattner
812125aea9 add a new -filetype argument to llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22287 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:32:05 +00:00
Chris Lattner
cbb34a76a9 minor cleanups, use copy ctor instead of manually doing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 03:00:34 +00:00
Chris Lattner
85141583cd refactor this interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22284 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-25 02:50:35 +00:00
Andrew Lenharth
705b9e55f2 make SparcV8 and V9 seperately configurable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22204 91177308-0d34-0410-b5e6-96231b3b80d8
2005-06-08 22:32:51 +00:00
Reid Spencer
ad38cd6ad0 Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22142 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 21:10:31 +00:00
Reid Spencer
5da2d08433 Make sure that tool names don't have any leading or trailing spaces in them.
If they do, it screws up the concatenation of the .exe suffix on cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22141 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 21:03:11 +00:00
Reid Spencer
6a5d1d42b7 For PR514:
* Make sure the "etcdir" gets checked for configuration files so that
  the installed location for config files is checked.
* Remove the st.in file (moved to projects/Stacker/tools/stkrc)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22135 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 01:06:46 +00:00
Reid Spencer
cc97cfc43e For PR514:
* language specification files are no longer configured with "configure"
* add substitutions for %bindir%, %libdir%, and various llvmgcc related
  variables needed in the c and cpp spec files.
* Implement the stubstituions in the Compiler Driver.
* Move st.in to projects/Stacker/tools/stkrc where it belongs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22128 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-19 00:52:28 +00:00
Chris Lattner
56c418676a If loopextract breaks the program provide output so that we can repro the
problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21790 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-08 21:54:56 +00:00
Chris Lattner
cbe92e6d4a Move licm after reassociate, add some cond-propagate passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21769 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-07 22:45:35 +00:00
Misha Brukman
827e8f0ffa * Use consistent spacing for function arguments
* Output single-character strings as chars


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21705 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-05 22:38:21 +00:00
Misha Brukman
0b861485ec Minor clean-ups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21678 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 20:30:34 +00:00
Misha Brukman
e7d52b6b5c Clean up and correct llvmc configurations for C and C++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21667 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 06:13:18 +00:00
Misha Brukman
3a98ff8d3a std::string(NULL) does not a proper constructor make
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21666 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 06:10:51 +00:00
Misha Brukman
4c42937b64 Omit periods at the end of command-line switch explanations for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21664 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-03 05:36:14 +00:00
Reid Spencer
ff1c9e2147 Add the simplify-libcalls pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21585 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-27 02:22:47 +00:00
Misha Brukman
4e8458d02c extract has been renamed to llvm-extract to avoid conflicting with another tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21501 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:46:58 +00:00
Misha Brukman
e50b075b66 There are still uses for spaces in Makefiles -- to make text line up together,
regardless of the tab size/stop settings on the developer side


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21499 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:43:41 +00:00
Misha Brukman
de03bc07ef extract has been renamed to llvm-extract to avoid conflicting with another tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21498 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-24 17:36:05 +00:00
Reid Spencer
2c6584a72f Make the CBackend actually get included in llc by using USEDLIBS instead of
USEDLIB as the variable to which "CBackend" is appended. The surrounding
if clause is safe because currently the configure script ensures that the
CBackend target is always added to TARGETS_TO_BUILD. By using a non-hard
coded construct in the makefile, we gain uniformity and the ability to
change the default set of targets by only changing the configure script.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21474 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 17:24:33 +00:00
Chris Lattner
3952bc6f39 Always enable the C backend. This fixes a *vast* number of failures on the
testers last night, as llc was not getting the cbe linked in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21468 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-23 14:36:22 +00:00
Reid Spencer
dadc96f07a Don't always build CBackend and Skeleton. Make use of the TARGETS_TO_BUILD
parameter instead which will correctly list the set of targets to be built.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21451 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:32:05 +00:00
Reid Spencer
18969fbc9f Implement the --enable-targets= feature of the configure script. The make
variable TARGETS_TO_BUILD is used to determine which targets in lib/Target
are built and which libraries are linked into llc. This effectively
implements the feature. One item remains: disabling targets in the dejagnu
test suite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21450 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:20:11 +00:00
Reid Spencer
5a870448d1 Two changes:
1. Get rid of TOOLLINKOPTS as it is a hold over from llvm-test and only
   used to communicate additional libraries to the linker. The *standard*
   way to do that is with the LIBS variable which this change supports.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21449 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 17:14:14 +00:00
Jeff Cohen
ea3e5e56fd Eliminate tabs and trailing spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21441 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 04:13:13 +00:00
Misha Brukman
3da94aec4d Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 00:00:37 +00:00
Misha Brukman
f976c856fc Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 22:55:34 +00:00
Misha Brukman
2b37d7cf28 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21416 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 21:13:18 +00:00
Misha Brukman
63b3afa984 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:48:15 +00:00
Misha Brukman
baec07cbfe #include system headers after all LLVM headers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21374 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:51:29 +00:00
Misha Brukman
704448f83b Eliminate trailing spaces at end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21372 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:08:35 +00:00
Misha Brukman
8f586ba4ed Consistently eschew space between *' or &' and function argument name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21371 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 04:07:47 +00:00
Misha Brukman
b0bafc55be * Print commands as we execute them with `-v'
* Add option `-save-temps'
Patch contributed by Markus Oberhumer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21367 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 03:22:18 +00:00
Reid Spencer
c30088f961 Ensure that the arguments passed to sys::Program::ExecuteAndWait include
the program name as the first argument. Thanks go to Markus Oberhumer for
noticing this problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21220 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-11 05:48:04 +00:00
Chris Lattner
bf9add4745 The first argument to ExecuteAndWait should be the program name, but pointed
out by Markus F.X.J. Oberhumer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-10 20:59:38 +00:00
Chris Lattner
0b77be8f0f there is no reason to run -instcombine -instcombine!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20915 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-29 06:25:11 +00:00
Alkis Evlogimenos
ab7ada3ed6 Rename createPromoteMemoryToRegister() to
createPromoteMemoryToRegisterPass() to be consistent with other pass
creation functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20885 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-28 02:01:12 +00:00
Chris Lattner
72dcaaf9c4 statically link ia64 into llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20656 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 18:39:06 +00:00
Chris Lattner
5b3a4553c1 Fix the missing symbols problem Bill was hitting. Patch contributed by
Bill Wendling!!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20649 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-17 15:38:16 +00:00
Chris Lattner
a3fcfff633 method renamed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20616 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 15:48:22 +00:00
Chris Lattner
852b4d4bf4 Replace more a*'s with arg_*'s, thanks to Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20615 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 15:48:06 +00:00
Alkis Evlogimenos
5a1c58d009 Use arg_iterator and arg_begin and arg_end functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20608 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 07:02:26 +00:00
Andrew Lenharth
572668aa38 yay for camel_cvs diff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20552 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-10 20:15:09 +00:00
Chris Lattner
1c81f1390d get bugpoint working on ia64, by building .so's with -fpic. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20525 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-09 03:31:02 +00:00
Chris Lattner
35641ecc37 move the reassociation pass after the LICM pass. This speeds up mgrid
from 10.27s to 9.57s with the CBE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20508 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-07 03:19:50 +00:00
Reid Spencer
837149c08d Changes to enable creation of native executables directly from gccld and to
ensure that -L paths don't contain both bytecode and native libraries.
This patch contributed by Adam Treat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20370 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-28 08:45:35 +00:00
Chris Lattner
da895d6337 Fix spelling, patch contributed by Gabor Greif!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20343 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 06:18:25 +00:00
Chris Lattner
e56509c697 Remove some stuff I checked in accidentally
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20340 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-27 04:32:35 +00:00
Reid Spencer
38b5788544 Use DataInstall macro instead of INSTALL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20322 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-24 21:43:43 +00:00
Chris Lattner
9b5b1905db Fix a bugpoint crash that JeffC noticed, looking like this:
*** Attempting to perform final cleanups: Final cleanups failed.  Sorry. :(  Ple
ase report a bug!

<llc>llc.exe: bytecode didn't read correctly.
llc.exe: bytecode didn't read correctly.
<crash>
Assertion failed: M && "You can't write a null module!!", file c:\llvm\lib\bytec
ode\writer\writer.cpp, line 1094


The fact that llc bombed (in this case) is ok, but bugpoint shouldn't crash after this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20285 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-23 06:12:11 +00:00
Reid Spencer
5443af2b41 Adjust the help output so that it will fit cleanly within 80 columns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-18 20:00:05 +00:00
Jeff Cohen
e210279047 Get bugpoint compiling with VC++ again, not that it works anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20211 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-16 05:05:31 +00:00
Andrew Lenharth
adf75775fa add Alpha to llc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20198 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-15 21:14:09 +00:00
Chris Lattner
45495c5248 Move helper function here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20168 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:13:47 +00:00
Chris Lattner
7456e3ce38 Conform to the documented interface by null terminating argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20167 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:10:45 +00:00
Chris Lattner
ed5fa58a07 Make sure to null terminate argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20166 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 23:02:34 +00:00
Chris Lattner
a88155dabf Print the module, not the pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20156 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 19:12:31 +00:00
Reid Spencer
ef11c5e64d Fix PR506:
* Use error returned from Archive::OpenAndLoad
* Make sure only std::string is thrown so it gets caught and printed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20147 91177308-0d34-0410-b5e6-96231b3b80d8
2005-02-13 07:34:17 +00:00
Chris Lattner
5ea56e5924 clean up comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19920 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 17:29:05 +00:00
Chris Lattner
4b724b1cb9 This has been deprecated for long enough, nuke it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19919 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-29 17:27:26 +00:00
Chris Lattner
a328c51bb9 Add support for fp tolerances
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19774 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:45:26 +00:00
Chris Lattner
cf989fd2a3 Adjust to changed interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19772 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-23 03:31:39 +00:00
Jeff Cohen
741c118230 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19752 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:37:13 +00:00
Jeff Cohen
5fb6ed4ae6 Use binary mode for reading/writing bytecode files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19751 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 17:36:17 +00:00
Jeff Cohen
83881957ed Fix VC++ complaint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19747 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-22 16:30:58 +00:00
Reid Spencer
e3e0fb19e9 sysconfdir -> PROJ_etcdir
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19623 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-17 00:42:31 +00:00
Reid Spencer
bdf6a39d1c Rename BUILD_* to PROJ_*
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19592 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-16 02:21:29 +00:00
Chris Lattner
59615f0f85 Improve output precision.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19564 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-15 00:07:19 +00:00
Chris Lattner
2e8bd68d13 X86 BE requires SelectionDAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19337 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-07 07:51:25 +00:00
Jeff Cohen
e67bc1384a Get the #ifdef right on LinkAllPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19310 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 07:01:08 +00:00
Jeff Cohen
00f3db6a4c Fix minor mistakes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19309 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:29:42 +00:00
Jeff Cohen
4b807e0381 Add project opt to Visual Studio.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19307 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-06 06:02:53 +00:00
Reid Spencer
564a571f62 Make opt honor the quiet option when printing the bytecode warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19294 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-05 17:31:55 +00:00
Reid Spencer
b687c0c218 Prevent output of bytecode to std::cout unless the --force flag is given.
This prevents bytecode splats with usage like: cat file.ll | llvm-as -


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19239 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-02 00:08:46 +00:00
Reid Spencer
5737913c46 Move the code for printing out a warning about bytecode output to a console
into lib/Support so it can be used with other tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19238 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 23:57:01 +00:00
Jeff Cohen
7109ce8258 Fix typo 'ompress' => 'compress'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19232 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 22:10:32 +00:00
Reid Spencer
bb4fe3d677 Correct the conditional test for non-portable tools so that it will
correctly omit them for non-Unix operating systems.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19206 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-31 22:56:14 +00:00
Reid Spencer
3d1cc28e7c Fix the help documentation to not imply multiple archive files can be
processed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19193 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 17:51:57 +00:00
Reid Spencer
1ef8bdaedb For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19192 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-30 05:36:08 +00:00
Reid Spencer
51163306ab For PR351:
* sys::PreventCoreFiles -> sys::Process::PreventCoreFiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19162 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-27 06:18:02 +00:00
Brian Gaeke
06c375bd1d Fix the build on PowerPC/Darwin - it thought we were declaring a new
function or something. Since FileRemover takes a const reference to
sys::Path, we need to pass an actual sys::Path variable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19111 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 22:33:33 +00:00
Reid Spencer
8d8b41d3f1 Correct compilation for Cygwin. FindExecutable now returns a sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19109 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 13:50:17 +00:00
Reid Spencer
5512655574 Support the gas option --traditional-format which, for some reason, gets
passed to gccas when the --program-prefix option is used to configure CFE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 02:58:43 +00:00
Misha Brukman
81417b631a Fix the Win32 build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19088 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 01:37:33 +00:00
Reid Spencer
bf427630a0 Make parameters to CopyFile use explicit instantiation of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19086 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-22 01:26:48 +00:00
Reid Spencer
682084a157 Use explicit construction of sys::Path from std::string because the
constructor is "explicit".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19078 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-21 03:24:02 +00:00
Reid Spencer
5d282185f5 Allow compilers that can't distinguish between a class instantiation and
the declaration of a function to compile this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19073 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 19:16:12 +00:00
Misha Brukman
6e6e88a3f0 llvm/Config/unistd.h has gone away, far, far away
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19068 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 05:36:57 +00:00
Reid Spencer
3000cbfd10 Incorporate the contents of include/llvm/Config/unistd.h as this is the
last file in LLVM to require the header. After ths commmit, our unistd.h
will go away.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19065 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:34:36 +00:00
Brian Gaeke
fabf41fc3e Use Config/alloca.h instead of alloca.h - pointed out by Duraid and Misha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19059 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-20 04:02:01 +00:00
Brian Gaeke
574314131f Make this compile on Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19047 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 21:08:07 +00:00
Reid Spencer
f6358c75eb For PR351:
* Support changes in sys::Program::ExecuteAndWait interface


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19044 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:56 +00:00
Reid Spencer
b31baa88a5 For PR351:
* Pass sys::Path instead of std::string for paths
* Correct the types of arguments passed to RunProgramWithTimeout due to its
  interface using sys::Path instead of std::string
* Replace "/dev/null" (not portable) with empty string which
  sys::Program::ExecuteAndWait recognizes as "redirect to bit bucket"


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 18:00:21 +00:00
Reid Spencer
2418bf9546 For PR351:
Turn path instance variables into sys::Path instead of std::string


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19038 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-19 17:59:45 +00:00
Reid Spencer
06c06dbaaf sys::CopyFile returns void and throws an exception on error which will be
caught by llvm-ld's main function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19030 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:54:21 +00:00
Reid Spencer
b2d8c36018 sys::CopyString throws an exception on error which will be caught by gccld
main function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 06:53:10 +00:00
Reid Spencer
1bd2653c8f The CopyFile function got moved into the sys namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-18 00:19:32 +00:00
Reid Spencer
9141f03322 Reverse the logic for Win32 to ensure that bugpoint and llvm-db are NOT
built on this platform.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19015 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 08:00:40 +00:00
Reid Spencer
691b3a195b Fix this file to actually work. ifneq was incorrectly used. Subtract out
llvm-db and bugpoint for Win32 rather than add them in
subtr


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19014 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 07:59:53 +00:00
Reid Spencer
30b9746e4e Makefile.JIT doesn't exist any more so it doesn't need to be distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19009 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 02:06:36 +00:00
Reid Spencer
a442107525 Disable bugpoint and llvm-db tools for Win32. They can't be supported on
that platform without a lot of work because they depend on process image
copy behavior of fork(2).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19008 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-17 01:46:41 +00:00
Tanya Lattner
f1131b35af Linking in all of ScalarOpts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19002 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:07:13 +00:00
Reid Spencer
5f76760c88 For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:04:20 +00:00
Reid Spencer
9ac141823d For PR351:
* Make the OutputC and OutputAsm functions work with sys::Path for the output
  file name instead of using std::string.
* Get rid of extraneous "toString" calls.
* Change "removeFile" to sys::Path::destroyFile()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19000 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 23:01:34 +00:00
Chris Lattner
780cbd9bae No targets actually use this library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-16 19:39:45 +00:00
Reid Spencer
b4ed7b0f80 Unbreak all archive reading operations introduced by the last patch which
always exited the program with exit code 1 in these cases, regardless of
whether an error occurred or not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18966 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 21:58:03 +00:00
Chris Lattner
67c3821ea0 Do not fail an assertion on a broken archive
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18959 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 07:44:15 +00:00
Reid Spencer
175bf068ab Change LLVMGCCDIR/bytecode-libs -> LLVMGCCDIR/lib
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18951 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:54:37 +00:00
Reid Spencer
b50ae12021 For PR351:
Remove #inclusion of Support/FileUtilities.h which isn't needed any more.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:53:50 +00:00
Reid Spencer
97182985d5 For PR351:
* Convert use of getUniqueFilename to sys::Path::makeUnique();


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18949 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:53:08 +00:00
Reid Spencer
cda985e191 For PR351:
* Remove #inclusion of FileUtilities.h, not needed any more.
* Convert getUniqueFilename -> sys::Pat::makeUnique()


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18948 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-15 01:51:56 +00:00
Reid Spencer
6da1e0d50f For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18929 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-14 04:20:08 +00:00
Reid Spencer
93f8f55e19 For PR351:
Adjust to interface change for FindExecutable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18920 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:44:23 +00:00
Reid Spencer
51ab8ec66e For PR351:
Adjust to changes in the interface of FindExecutable, getting ToolRunner
ready for bigger things to come.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18919 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:43:44 +00:00
Reid Spencer
90484fb9a2 For PR351:
llee was a nice hack, but it wasn't portable so its gone, with Misha's
approval.  Operating systems have facilities available for making bytecode
directly executable without this utility.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18916 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 23:15:32 +00:00
Misha Brukman
f7d4f10a0d Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18914 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 21:42:16 +00:00
Reid Spencer
319cdeccd1 For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18909 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 20:03:02 +00:00
Reid Spencer
05f7e7991b Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:18:19 +00:00
Reid Spencer
9d88d1aaab For PR351: \
The getFileTimestamp and getFileSize functions have been removed from  \
FileUtilities.{h,cpp}. They are replaced by Path::getTimestamp and  \
Path::getSize,respectively.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18892 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 17:01:53 +00:00
Reid Spencer
12786d535d Make use of the new Path inserter function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18887 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 08:53:36 +00:00
Reid Spencer
11db4b8084 PR351: \
Use sys::Path not FileUtilities to check file types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18865 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:26 +00:00
Reid Spencer
c406413471 Convert to use new Linker class interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18864 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:14 +00:00
Reid Spencer
e4874029c3 LinkModules is now in the Linker class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18863 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-13 03:01:03 +00:00
Chris Lattner
bcfe1e2d64 Do not internalize a module if -link-as-library is passed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18825 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-12 07:53:51 +00:00
Reid Spencer
96690a81d4 Revert the last patch. We really do need SimplyCFG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 03:03:54 +00:00
Reid Spencer
1fce09125c Path::get -> Path::toString
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-11 00:14:15 +00:00
Reid Spencer
357cf5439a Remove this pass as its no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18783 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 22:55:35 +00:00
Chris Lattner
c59e09ec54 This pass is no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18782 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 22:30:32 +00:00
Reid Spencer
cb8cb8eb66 Get rid of warning from flex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18779 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 21:59:47 +00:00
Chris Lattner
b4a400af2e Turn on ipsccp by default instead of simple IPCP
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18753 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 08:03:43 +00:00
Brian Gaeke
17b1afe945 Link V8 backend into llc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18739 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-10 05:04:13 +00:00
Reid Spencer
6b463b261e When -link-as-library, add -l options to Module's deplibs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18617 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-08 05:17:40 +00:00
Reid Spencer
ce9653ce44 For PR387:\
Make only one print method to avoid overloaded virtual warnings when \
compiled with -Woverloaded-virtual


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18589 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-07 04:03:45 +00:00
Reid Spencer
c191d497d5 Fix PR139:\
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18549 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-05 19:15:29 +00:00
Chris Lattner
40add594eb Add -strip-debug option
remove the temporary -disable-dse option


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18451 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-03 05:45:58 +00:00
Chris Lattner
f8f70c1a17 Adjust to change in pass name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18442 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:27:35 +00:00
Chris Lattner
3f14fb1a0b Recognize --strip-all as a synonym for -s.
Add -S and --strip-debug option support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18441 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 21:26:10 +00:00
Reid Spencer
0de66b5cc8 Implement file replacement correctly even with the f (TruncateNames) flag
set. The member name comparison was failing for truncated names. This patch
fixes that. Truncated names are now properly replaced.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18423 91177308-0d34-0410-b5e6-96231b3b80d8
2004-12-02 09:21:55 +00:00
Reid Spencer
a564845f83 Shared library extension is now in LTDL_SHLIB_EXT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18353 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 12:40:21 +00:00
Reid Spencer
aadc41860d No longer necessary, moved Makefile.rules
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18337 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 07:17:31 +00:00
Reid Spencer
8f631784f7 Use LLVMLIBS=JIT to get JIT libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 07:17:18 +00:00
Reid Spencer
f00b54058b Make sure the program's symbols can be dlsym'd as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18331 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 06:23:19 +00:00
Reid Spencer
1a3ba7f10e Make the check a little quieter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 04:51:58 +00:00
Reid Spencer
bf714df962 Add LLVMbzip2 library, now required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 20:22:06 +00:00
Reid Spencer
07accb5a60 Always pass -D_GNU_SOURCE to cc1plus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18253 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 19:38:51 +00:00
Reid Spencer
c702fa3ff0 Always pass -D_GNU_SOURCE to cc1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18252 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 19:38:39 +00:00
Reid Spencer
1945a11249 Correct the configuration variable used to find the bin directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18244 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 09:36:28 +00:00
Reid Spencer
c9b37eea2e Make sure additional C++ suffixes are recognized by llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-24 00:01:57 +00:00
Reid Spencer
65bc4e0bc4 * Adjust the options to make them either accept multiple occurrences or be
optional so that compatibility with GCC is accomplished.
* Implement the -print-file-name option in an attempt to provide the same
  functionality as GCC. Unfortunately, without loading the cpp or c config
  files, this option won't help much.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18189 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:47:58 +00:00
Reid Spencer
0b3c7d084c * Don't pass empty arguments to ExecuteAndWait because it can cause the
sub-tool to start reading its standard input instead of the specified
  input.
* Clean up ouput of path names on error.
* Extend GetPathForLinkageItem to always search the LibraryPaths and thus
  make it suitable for an interface function (required by llvmc.cpp).
* Implement support for language-specific default library paths.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18188 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:45:49 +00:00
Reid Spencer
2d3ee4e2eb Configuration data now supports a vector of library paths.
Add the GetPathForLinkageItem method to the interface so full paths can
be generated for a given linkage item.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18187 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:40:06 +00:00
Reid Spencer
dc6812d92d Add the c and cpp configuration files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18186 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:38:46 +00:00
Reid Spencer
f1a889c99b Removed in favor of configurable (*.in) versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18185 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:38:07 +00:00
Reid Spencer
e9564cedb4 Make various adjustments to parsing so that the separator character doesn't
terminate options or paths, so that SPACE tokens legally separate options
on a command line, and so that the lang.libs paths are parsed properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18184 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:37:26 +00:00
Reid Spencer
c0f376dba2 SPACE is a legitimate token now, to separate option words.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18183 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:35:50 +00:00
Reid Spencer
90654fd924 Handle space, separators, bad substitutions, and library search path better
than before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18182 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:35:16 +00:00
Reid Spencer
b98c672328 Configurable language configuration files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18181 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-23 23:33:08 +00:00
Reid Spencer
08602e5a30 Get the -o option right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18052 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:45:33 +00:00
Reid Spencer
679a723a63 Get the -o option right
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18051 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:39:33 +00:00
Reid Spencer
3c7b1075ff Not needed any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18050 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:27:20 +00:00
Reid Spencer
9822de2ed1 Content moved to llvm-ld.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18049 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:15:08 +00:00
Reid Spencer
445564a0bc Incorporate GenerateCode.cpp. Make static things static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18048 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 20:02:56 +00:00
Reid Spencer
c457fbb5ea First cut at implementing generic link-time Optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18047 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 19:43:28 +00:00
Reid Spencer
0fdd363a26 The Archive class now has differentiation for BSD4.4 and SVR4 style archive
symbol tables. Adjust our usage to compensate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18046 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-20 18:01:22 +00:00
Chris Lattner
fd80b5c260 Fix a bug that caused stuff like this:
main at ./eh.cpp:1414 ->          printf("a\n");

to be printed, instead of this:

main at ./eh.cpp:14
14 ->          printf("a\n");


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18005 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 19:45:44 +00:00
Chris Lattner
fa1af13449 Fix a bug in the checkin where I adjusted this code to work when
LinkModules nukes the second module argument.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-19 07:09:40 +00:00
Chris Lattner
d29c636a00 Remove debugging code, unneuter this functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17963 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 19:42:50 +00:00
Chris Lattner
a269ec7b0a remove debugging code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17962 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 19:40:13 +00:00
Tanya Lattner
75e8419e48 Adding option to llc for ModuloScheduling. By default it is turned off.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17959 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 18:38:01 +00:00
Chris Lattner
86f42db22b -disable-opt is not -O0, it's okay for it to disable internalize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17911 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-17 16:41:19 +00:00
Chris Lattner
429a9cbc2e Even with -disable-opt we should still internalize and strip if requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17903 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 18:59:20 +00:00
Reid Spencer
babb45b327 Per code review: \
* Make static things static \
* Get rid of unused TmpArchive variable \
* Implement symbol table printing \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17878 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:41:20 +00:00
Reid Spencer
bede58363c Per code review: \
* hide the compatibility option \
* Make static things static \
* Use cl::extrahelp instead of cl::MoreHelp (defunct) \
* Use cl::PrintHelpMessage instead of our own printUse function \
* Use a std::set<sys::Path> for the path list because its now required by \
  the sys::Path class and also ensues directories are traversed in sorted \
  order.\
* Implement symbol table printing locally instead of in libLLVMArchive \
* Adjust to changes in llvm::Archive interface \
* Make sure we destruct objects even if exceptions occur. \
* Fix a typo in an output string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17877 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:41:09 +00:00
Chris Lattner
90c18c5c69 Make this code not depend on LinkModules leaving the second argument unmolested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17874 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-16 06:31:38 +00:00
Tanya Lattner
d607491480 This file was originally developed by the LLVM research group so this comment should stay. I also do NOT want my name explicity listed on src files. I am already mentioned in the credits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17833 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-15 19:21:49 +00:00
Reid Spencer
6bb69355d2 Linker.h moved to include/llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17805 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:25:32 +00:00
Reid Spencer
b908356b93 bugpoint needs LLVMLinker.a now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17804 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:23:18 +00:00
Reid Spencer
b55bc06bad Correct call of methods whose names have changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17803 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:17:41 +00:00
Reid Spencer
d292fb92e8 This program needs libLLVMLinker.a now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17802 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:12:22 +00:00
Reid Spencer
605b9e2c5b Linker.h has a new home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 23:00:08 +00:00
Reid Spencer
227b6d00dd Fix usage of changed function prototype
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17798 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:30:54 +00:00
Reid Spencer
63ab669120 A tool for adding a symbol table to LLVM Archives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17797 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:29:21 +00:00
Reid Spencer
8d18dcf4d9 Makefile for llvm-ranlib tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17796 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:28:33 +00:00
Reid Spencer
63efb77980 *Fix usage of changed function prototype*Use Archive interface to symbol table for archives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17795 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:27:46 +00:00
Reid Spencer
d129664066 This tool needs libLLVMArchive now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17794 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:27:00 +00:00
Reid Spencer
0486e17f7f Remove linking declarations (in Linker.h now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17793 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:25:26 +00:00
Reid Spencer
1893f9273c We need the libLLVMArchive library now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:23:31 +00:00
Reid Spencer
8c6ee6629c Moved to lib/Linker (common with gccld)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17791 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:22:45 +00:00
Reid Spencer
3a1582b5b2 Total rewrite using Archive library & new functionality
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17790 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:20:07 +00:00
Reid Spencer
c7ebfdd2cc This tool needs the libLLVMArchive library now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17789 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:19:21 +00:00
Reid Spencer
6903c86348 Remove linking declarations (in Linker.h now)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17788 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:49 +00:00
Reid Spencer
4c1af902ad Provide exception handling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17787 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:17:03 +00:00
Reid Spencer
5e081fb74a Moved to lib/Linker
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17786 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:15:31 +00:00
Reid Spencer
cd18a8333e Add the llvm-ranlib tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-14 22:13:59 +00:00
Reid Spencer
31391b6792 Make sure llee can deal with compressed bytecode too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17652 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 20:21:25 +00:00
Misha Brukman
669b524399 Output the program name (in this case, gccld) with warning about invalid files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17638 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 04:24:59 +00:00
Nate Begeman
a591457857 Allow hbd to be bugpointable on darwin by fixing common and linkonce codegen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17637 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-09 04:01:18 +00:00
Misha Brukman
eda20f933b Don't silently ignore invalid files: tell the user!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17633 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 22:03:10 +00:00
Reid Spencer
cc0bd565bb Add a --disable-compression option to gccas so the default compression of
bytecode can be defeated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17626 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-08 17:37:04 +00:00
Misha Brukman
a1527534bb Use LLVMToolDir instead of ToolDir because the latter is no longer set (?)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17594 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 22:26:43 +00:00
Reid Spencer
4b5fdc71c9 Rename the option for defeating compression to be a little more specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17567 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:50:16 +00:00
Reid Spencer
34b9071a3d Enable compression by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17566 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:43:51 +00:00
Reid Spencer
ae70fedfab * Enable bytecode compression by default
* Provide a -no-compress option to defeat compression.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17565 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:41:32 +00:00
Reid Spencer
cf0eb8deb5 Turn on compression by default.
Change --compress to --no-compress so compression can be turned off.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17564 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-07 05:37:27 +00:00
Reid Spencer
17f52c5c46 Add support for compressed bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17535 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-06 23:17:23 +00:00
Reid Spencer
07adb2836b Stop propagating method names that violate the coding standard
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17498 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 22:15:36 +00:00
Misha Brukman
4ad0b11b95 No, really, the library name is `LLVMexecve'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17366 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-31 17:30:52 +00:00
Reid Spencer
cc2d1e25f3 Internalize variable names to prevent recursive assignment. Cleanup docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17359 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-30 09:19:36 +00:00
Misha Brukman
b1883932c7 Fix file header comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17350 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 23:26:09 +00:00
Misha Brukman
a6ad12d4fa LLEE execve() wrapper library has changed its name and location
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17339 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-29 18:36:51 +00:00
Brian Gaeke
d6d8b83742 Fix library names for sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17311 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 06:39:10 +00:00
Reid Spencer
0dac2eb58e Remove the FORCE token, rename VERSION to VERSION_TOK so it doesn't
conflict with configuration variables and #defines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17298 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:06:15 +00:00
Reid Spencer
af77d74e07 Implement linking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17297 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:05:06 +00:00
Reid Spencer
3a9b22234f Eliminate the force flag, configuration item, and related support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17296 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 04:04:38 +00:00
Reid Spencer
5a7f13b2ae Pass -f to stkrc to ensure the output file is always written.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:57:49 +00:00
Reid Spencer
2967b61b68 Eliminate the -F option (for forcing output) .. not needed
Create GCC compatible -Wx, aliases for the existing -T options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17294 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:56:16 +00:00
Reid Spencer
6cf4acc18d Add llvm-ld to the subdirs to be built
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17293 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:53:02 +00:00
Reid Spencer
e84f92db26 Convert to new library names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17292 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 03:50:43 +00:00
Reid Spencer
f113e7bf43 Update for library name change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17287 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-28 00:11:43 +00:00
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Chris Lattner
395236f720 Improve help output from llvm-db 'info' command. Patch contributed by
Michael McCracken!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17241 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 05:46:17 +00:00
Reid Spencer
20ac4e3699 Add EXTRA_DIST for additional files to be distributed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17233 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-26 03:12:11 +00:00
Chris Lattner
83f7c3792b Remove template args that are the same as the default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17223 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-25 19:09:41 +00:00
Reid Spencer
d3f5e7e4ce Make clean quieter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17191 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-23 19:49:20 +00:00
Reid Spencer
40a955ab05 We're not doing automake any more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17168 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 21:02:23 +00:00
Reid Spencer
cac731ecbe We won't use automake
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17155 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-22 03:35:04 +00:00
Reid Spencer
86d341b204 Initial automake generated Makefile template
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17136 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 23:55:41 +00:00
Reid Spencer
f405d107d8 Actually link all the analysis passes and their dependencies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17114 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:32:12 +00:00
Reid Spencer
0bade7e5e7 Remove extra comma.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17113 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:26:21 +00:00
Reid Spencer
7b32daa4c1 Actually link in all the analysis passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17112 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-18 03:22:48 +00:00
Nate Begeman
792558898f Pass -single_module option to gcc when linking dynamic libraries for use with bugpoint, so that we can bugpoint multiple .cp files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17102 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 23:03:32 +00:00
Chris Lattner
a78a9027f5 Reid added --version to the CommandLine lib. Don't conflict with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17076 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-17 02:49:08 +00:00
Misha Brukman
81dd3d4536 Fix hyphenation and quoting style for great justice
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-15 23:22:48 +00:00
Misha Brukman
56cb207a39 * We don't use the ENABLE_*_JIT flags in the source base anymore
* Convert references to Sparc to SparcV9 to clearly identify CPU type


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16998 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 20:06:36 +00:00
Misha Brukman
53c8f29586 Use the shared Makefile.JIT for JIT-enablement
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 19:01:25 +00:00
Misha Brukman
064782209b Since several tools and examples want JIT support, factor out the process of
adding the right libs for any given architecture's JIT into a single place


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16989 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 18:58:19 +00:00
Misha Brukman
ce6662fb6a Enable the PowerPC JIT by compiling powerpc.o library into lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16982 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 06:35:11 +00:00
Reid Spencer
d96cb6eaa0 Update to reflect changes in Makefile rules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-13 11:46:52 +00:00
Misha Brukman
fc6723f659 No space allowed between \ and end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16940 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 19:17:11 +00:00
Misha Brukman
2c9039eb1a Wrap lines at 80 cols
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16939 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-12 18:35:57 +00:00
Chris Lattner
e3ef9b5fe2 Don't miss global optimizations because we run before the inliner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16913 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-11 04:47:18 +00:00
Reid Spencer
769dd7d5ec Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16898 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:52:14 +00:00
Reid Spencer
796aacf2e2 Fix named of a library.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16896 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:50:31 +00:00
Reid Spencer
90a2adc866 Initial version of automake Makefile.am file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16894 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-10 22:36:40 +00:00
Misha Brukman
41605ab6e7 Use the SparcV9-marked instr scheduling library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16851 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-08 18:14:56 +00:00
Chris Lattner
93a00e4ceb Rename pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16801 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-07 04:12:02 +00:00
Chris Lattner
48f44cf5b3 Hrm, if there is an error loading a file, try printing a message so the
user knows that...


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16524 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-27 16:41:01 +00:00
Reid Spencer
aefd04b6d0 Add some missing #includes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16517 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 16:00:07 +00:00
Reid Spencer
8d9b6800f6 Qualify Path with sys:: namespace so this file compiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16516 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-25 15:59:41 +00:00
Chris Lattner
b12914bfc0 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
68d033cc94 Finegrainify namespacification
'Pass' should now not be derived from by clients.  Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16434 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:44:31 +00:00
Reid Spencer
e6bd638fec Fix compilation warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16336 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 15:46:13 +00:00
Reid Spencer
e52b44e799 Update to reflect stkrc's new optimization capabilities.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16327 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 02:00:24 +00:00
Reid Spencer
d4ff15af96 Support substitution options for the W, M, and f options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16326 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 01:59:31 +00:00
Reid Spencer
54fafe4dc9 Support the -WX, -f -M options as pass throughs
Change force option from -f to -F
Support the -strip option
Make changes to reflect different interface in sys::Program


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16325 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-14 01:58:45 +00:00
Reid Spencer
14c225e6f6 Change banner name to reflect actual program this Makefile is for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16311 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 21:15:19 +00:00
Reid Spencer
6dd3713be5 Get rid of compile warning by having llvmExecve return the result of its
call to executeProgram.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16306 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 15:37:33 +00:00
Reid Spencer
c0af3f0052 Initial implementation of llvm-ld: stolen from gccld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16305 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 01:27:53 +00:00
Misha Brukman
247384c041 Add LLEE into compilation, but not for Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16304 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-13 01:18:30 +00:00
Reid Spencer
dccc01eb61 Excise the -L option since llvm-link should not do library searches. It
just links bytecode files together.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16303 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:39:42 +00:00
Reid Spencer
a2dfd05d84 Excise dependent library linking at Chris' request. llvm-link is intended
to provide only the simplest linking of LLVM modules without trying to be
complete. Dependent library linking will be added to gccld or its successor


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16302 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:08:29 +00:00
Misha Brukman
a6bcd83854 Squelch compilation warnings on Sparc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16301 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-12 23:01:24 +00:00
Reid Spencer
6939f8141c Implement dependent library processing and search paths for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16287 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:32:42 +00:00
Misha Brukman
ac09e25b58 Make file comment span the entire line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16249 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-08 19:48:15 +00:00
Reid Spencer
a3b4e09715 Don't re-instantiate the std::string in catch block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16159 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-03 22:59:32 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Reid Spencer
790306852c Make sure <cassert> is included for platforms that don't include it via
other header files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16134 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 20:36:15 +00:00
Reid Spencer
016e335e87 Initial commit of a configuration file for compiling C++ programs with
the file name pattern *.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16117 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:32:24 +00:00
Reid Spencer
ca01f9bc6f Implement the "setIncludePaths" and "setSymbolDefines" interface methods.
Revise token substitution to be a little faster.
Clean up exception throwing, make sure its always a std::string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16116 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:29:06 +00:00
Reid Spencer
7c14fd152e Pass lists of -I and -D options through to the Compiler Driver.
Handle -g and -Wxxx for GCC compatibility


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16115 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 06:27:32 +00:00
Reid Spencer
6386009ea6 Need to throw std::string not const char* if we want error messages to be
caught.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16109 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-30 00:06:52 +00:00
Reid Spencer
93426ba5ed Add a missing header file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16099 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 20:02:28 +00:00
Reid Spencer
7c4c98d986 Add the LLVMsystem.a library as it is now used for operating system
independence of the tool.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16092 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:29:38 +00:00
Reid Spencer
9de7b334ec The functions in Signal.h are now in the llvm::sys namespace - adjust
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16091 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:28:55 +00:00
Reid Spencer
615edcccda add llvmc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16090 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:27:34 +00:00
Reid Spencer
52c2dc1a42 Convert llvmc to use the lib/System interface instead of directly
using Unix operating system calls.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16089 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-29 19:26:56 +00:00
Reid Spencer
ca044879fe License file for llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16045 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-25 00:41:06 +00:00
Reid Spencer
9fd58e0ae8 Insert declarations for two new functions that support the dependent
libraries feature.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16043 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:55:34 +00:00
Reid Spencer
198e888705 Run the compilation actions before we attempt linking work.
Correctly implement the dependent libraries feature so that linked bytecode
files automatically include any dependent libraries they specify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16042 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:54:32 +00:00
Reid Spencer
aff3c77ac2 Add the directory specified by LLVM_LIB_SEARCH_PATH to the list of
directories to be searched during linking.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16041 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 22:53:13 +00:00
Reid Spencer
44956326f0 Get rid of error messages from CommandLine because -time-passes was
defined twice. We make use of the new TimePassesIsEnabled global boolean
value from Pass.h to access the value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16033 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 17:54:26 +00:00
Reid Spencer
01b77f9c08 Adjustments for changes in the configuration language.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16026 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:24:14 +00:00
Reid Spencer
2cf17a4f0f - Unify format of output messages
- All errors throw std::string
- Default output file name to a.out (if we're linking)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16025 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:05:30 +00:00
Reid Spencer
02413b0294 Link with bcreader and vmcore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16024 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:04:07 +00:00
Reid Spencer
f384db3a90 - Implement the %args% substitution
- Implement parsing of the .output={bytecode|assembly} item.
- Drop parsing support for translator.optimizes, translator.groks_dash_O,
  optimizer.groks_dash_O, translator.output_is_asm, optimizer.output_is_asm
- Add parsing support for translator.output and optimizer.output
- Add optimizer.required parsing support
- Add linker.libs and linker.libpaths parsing support
- Fix error messages to list correct set of tokens expected.
- Rename FileReadable -> FileIsReadable (changed in CompilerDriver.cpp)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 14:03:23 +00:00
Reid Spencer
bf3948884e - Alphabetize the list of token enumerators.
- Drop old tokens, insert new tokens


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16022 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:59:35 +00:00
Reid Spencer
ec4f588418 - Rename and rearrange for clarity
- Drop name tokens not used any more (GROKS_DASH_O)
- Rename OUTPUT_IS_ASM as OUTPUT and allow "bytecode" and "assembly" as
  values of it.
- Simplify handleContext (now handleNameContext) arguments and ensure that
  it returns OPTION tokens exactly as scanned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16021 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:58:37 +00:00
Reid Spencer
a01439ada2 - Remove unused GetSuffix function
- Renamed FileReadable -> FileIsReadable
- Remove support for GROKS_DASH_O; deferr it to %opts% substitution
- Require a -o option except in case of linking where it defaults to a.out
- Fix problem processing *.o and *.bc files.
- Ignore optimization phase if -emit-raw-code
- Correct the assembly generation phase to support -emit-native-code
- Implement dependent library lookup


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16020 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:55:17 +00:00
Reid Spencer
fd2f728b48 Remove unneeded flags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16019 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-24 13:49:57 +00:00
Reid Spencer
59a745a26f Provide support for retaining the version number found in a config file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15995 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:03:25 +00:00
Reid Spencer
c0e9bec9fc Add the VERSION token.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15994 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:02:41 +00:00
Reid Spencer
1df71210fe Add support for version numbers.
Allow CRLF as a line terminator (as well as plain LF)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:02:13 +00:00
Reid Spencer
b50acbcf49 Shorten lines so this file can be used as the documentation example
directly. Remove -pre (experimental pass).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15992 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-22 18:01:19 +00:00
Reid Spencer
7593745563 Correct to change interface of the analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15986 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-21 21:00:24 +00:00
Reid Spencer
53aa793721 Change @ -> % in config files. @name@ might be needed for config files to
themselves be configured via autoconf so its not a good substitition syntax
for llvmc. Furthermore % is more llvmish :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15957 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 22:53:11 +00:00
Reid Spencer
b38e40564b Implement the correct search for configuration files. llvmc will now try
the following in this order:
 1. -config-dir=/path/to/configs
 2. LLVM_CONFIG_DIR=/path/to/configs
 3. ~/.llvm/etc
 4. $prefix/etc
 5. /etc/llvm


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15950 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:24:07 +00:00
Reid Spencer
aa43a4b025 Add CONFIG_FILES so the language specific config files can be installed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15949 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:21:51 +00:00
Reid Spencer
9a8fedd6f9 Implement Assembly support.
Consolidate platform-specific code into "sys" namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15947 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 09:14:05 +00:00
Reid Spencer
f51a87cb57 Actually let it compile after file name changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15931 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 21:52:49 +00:00
Reid Spencer
cbabe7f06e Moved ConfigData -> Configuration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15927 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 21:17:53 +00:00