Commit Graph

1361 Commits

Author SHA1 Message Date
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