Commit Graph

2301 Commits

Author SHA1 Message Date
Nick Lewycky 5eb3773b99 Force 'llvm-config' to go first, optionally followed by lto and gold mixed in
with the rest of the parallel directories.

Build lto when possible on all platforms. Make gold to explicitly depend on
libLTO.

llvm-svn: 65518
2009-02-26 07:56:49 +00:00
Nick Lewycky 64a6fe1bc0 Add the function attributes pass during LTO time.
llvm-svn: 65508
2009-02-26 06:56:16 +00:00
Nick Lewycky fc684c0c83 If nobody minds, I'm using LTO to produce faster binaries. Switch fast codegen
off in libLTO.

llvm-svn: 65310
2009-02-23 07:41:55 +00:00
Nick Lewycky 338d07e94e Add an option to the gold plugin to make it emit a file with the public api
list that can in turn be passed to -internalize pass through
-internalize-public-api-file.

Pass gold -plugin-opt=generate-api-file to produce "apifile.txt" in the current
directory.

llvm-svn: 65295
2009-02-22 22:15:44 +00:00
Rafael Espindola 6add6181c8 really fix style
llvm-svn: 64923
2009-02-18 17:49:06 +00:00
Rafael Espindola e08484daf2 fix style
llvm-svn: 64905
2009-02-18 08:30:15 +00:00
Dan Gohman 38a9631d5f Eliminate several more unnecessary intptr_t casts.
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Devang Patel d57a720d57 Remove changes that were accidently included in previous commit.
llvm-svn: 64835
2009-02-17 22:45:18 +00:00
Devang Patel 4d20395a5f The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number.

llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Rafael Espindola fabd0534fd tools like nm and ar only need register_claim_file and add_symbols. Don't abort
if other hooks are missing.

llvm-svn: 64812
2009-02-17 21:08:21 +00:00
Nick Lewycky 9178155206 Shoot! Remove this debugging line again!
llvm-svn: 64617
2009-02-15 22:50:17 +00:00
Nick Lewycky b020e0d14c Don't discard definitions of common symbols. Not sure if this is the right fix.
Before this change, the program:
  int var;
  int main(void) { return 0; }
when run under 'nm -g' would show 'U var' with the gold plugin and
'B var' with gcc.

llvm-svn: 64616
2009-02-15 22:49:17 +00:00
Dan Gohman af2037fbfd Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.

llvm-svn: 64399
2009-02-12 20:53:27 +00:00
Duncan Sands 185fc29820 Revert r64299: it breaks the build when configured
without --enable-pic, like my nightly tester.

llvm-svn: 64302
2009-02-11 13:23:49 +00:00
Nick Lewycky 9dfffc6c9f Try this. Darwin -> LTO, PIC -> LTO + possibly gold too.
llvm-svn: 64299
2009-02-11 08:44:13 +00:00
Devang Patel 8a9ced15d4 62987 disables LTO build on darwin.
Revert 62987 for now. Nicolas please investigate.

llvm-svn: 64285
2009-02-11 02:34:33 +00:00
Chris Lattner c3aa8f7bab fix bugpoint url, patch by Pieter de Bie!
llvm-svn: 64022
2009-02-07 18:56:30 +00:00
Nick Lewycky 4ddcc43724 Free the buffer in the case where we don't create a module out of it, as
pointed out by Torok Edwin.

Remove trailing whitespaces.

llvm-svn: 64002
2009-02-07 03:15:01 +00:00
Nick Lewycky 8811ecdadf Correct strange whitespace.
llvm-svn: 63927
2009-02-06 07:01:00 +00:00
Nick Lewycky 74b5ef7cae Free the buffer.
llvm-svn: 63907
2009-02-06 01:58:34 +00:00
Chris Lattner 413a0246f8 fix PR3488: llvm-ar r doesn't replace existing files
Patch by Daniel Shelton!

llvm-svn: 63870
2009-02-05 17:58:39 +00:00
Duncan Sands 2a3173287f Revert the previous commit. It seems it didn't
really solve the problem.  Also it changed the
name from libLLVMgold to LLVMgold (correcting
the name resulted in the original problem
suddenly reappearing).

llvm-svn: 63861
2009-02-05 10:21:34 +00:00
Duncan Sands 4dd55167ab Stop llvm-config thinking that there are circular
dependencies between libraries due to __dso_handle
when doing "make install".  I don't know what the
LINK_COMPONENTS stuff is about, so I left it alone.

llvm-svn: 63860
2009-02-05 09:54:02 +00:00
Nick Lewycky 9f694e4b3b It's not obvious, but lto_module_create_from_memory doesn't need to use the
buffer after it creates the Module. Thus, we don't need to store this pointer
in claimed_file.

llvm-svn: 63834
2009-02-05 05:36:01 +00:00
Nick Lewycky 8691c47e9e Remove accidentally included debug message!
Reword a comment for clarity. Remove some extra whitespace.

llvm-svn: 63823
2009-02-05 04:14:23 +00:00
Torok Edwin a488ee0e35 Alphabetize includes. Update comment.
llvm-svn: 63771
2009-02-04 21:00:02 +00:00
Torok Edwin c409c77817 mention that PIC is needed for libLTO and libLLVMgold
llvm-svn: 63755
2009-02-04 19:12:25 +00:00
Torok Edwin a2794dba04 remove printf - it was there only for debugging!
llvm-svn: 63742
2009-02-04 17:40:28 +00:00
Torok Edwin 4b35a81845 add support for .a files containing LLVM IR to the gold plugin
llvm-svn: 63741
2009-02-04 17:39:30 +00:00
Nick Lewycky fb643e4d9f Add LLVM plugin for gold.
llvm-svn: 63623
2009-02-03 07:13:24 +00:00
Mikhail Glushenkov c7d6951c92 Add some comments.
llvm-svn: 63364
2009-01-30 02:12:57 +00:00
Mikhail Glushenkov 2115d09a10 Add three new option properties.
Adds new option properties 'multi_val', 'one_or_more' and 'zero_or_one'.

llvm-svn: 63172
2009-01-28 03:47:20 +00:00
Nick Lewycky 5c8fc9d549 Build libLTO on any platform so long as PIC is enabled.
llvm-svn: 62987
2009-01-26 03:04:57 +00:00
Mike Stump 82221d62a9 Perform optional clang building.
llvm-svn: 62895
2009-01-24 00:00:41 +00:00
Mikhail Glushenkov 1a0c083748 Fix 'llvm-config --libs' output.
Change the naming scheme for llvmc plugins so that they do not appear in
'llvm-config --libs' output.

llvm-svn: 62687
2009-01-21 13:05:00 +00:00
Mikhail Glushenkov fbc89cecad Change the hook API back to prevent memory leaks.
llvm-svn: 62686
2009-01-21 13:04:33 +00:00
Mikhail Glushenkov bf9716e15d Allow hooks with arguments.
llvm-svn: 62685
2009-01-21 13:04:00 +00:00
Mikhail Glushenkov 6e8d814d36 Registry.h should not depend on CommandLine.h.
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.

llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov b2f9a73029 Delete trailing whitespace.
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Rafael Espindola 6de96a1b5d Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Mikhail Glushenkov bc39dff6e5 Some small documentation fixes.
llvm-svn: 62251
2009-01-15 02:42:40 +00:00
Mikhail Glushenkov bf78b20490 Clarify the documentation a bit.
llvm-svn: 62249
2009-01-15 02:04:54 +00:00
Mikhail Glushenkov 66068b3baf Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.

llvm-svn: 62211
2009-01-14 02:02:16 +00:00
Mikhail Glushenkov 0f88cfa2ac Add a --check-graph option to llvmc.
llvm-svn: 61989
2009-01-09 16:16:27 +00:00
Oscar Fuentes b97e96350f CMake: replace `rm' with portable invocations of cmake.
Based on a bug report by Yonggang Luo.

llvm-svn: 61875
2009-01-07 19:24:44 +00:00
Chris Lattner b0794619e6 make llvm-ld smart enough to link against native libraries that are
not in system library directories by checking -L paths as well.
Patch by Axel Naumann!

llvm-svn: 61730
2009-01-05 19:01:32 +00:00
Bill Wendling cbb401c1d6 Setting BUILD_ARCHIVE to 0 has the same effect as defining it to 1.
llvm-svn: 61599
2009-01-03 01:48:26 +00:00
Chris Lattner ac161bff07 Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.

llvm-svn: 61558
2009-01-02 07:01:27 +00:00
Misha Brukman b132910b8f Add spacing between type and variable name.
llvm-svn: 61530
2008-12-31 17:41:49 +00:00
Misha Brukman 93b7c4085b Comment headers should extend to 80 chars.
llvm-svn: 61529
2008-12-31 17:40:52 +00:00