Rafael Espindola
c78f65775a
Simplify the computation of undefined symbols. Instead of walking
...
functions and initializers, just report the declarations present in
the module.
The motivation is to open the way for using the lazy module parsing,
which should speed up clients that just want a symbol list (nm, ar).
This is slightly less precise, but since both -strip-dead-prototypes
and -globaldce are part of the standard pipeline, this shouldn't
change the result for clang/dragonegg produced binaries.
Any decl in an IL file was also put there because a FE expected it
to be necessary, so this should not be a problem for "-O0 -emit-llvm".
As a sanity check, I have bootstrapped clang on linux and built
firefox on both linux and darwin. A clang bootstrap on darwin
with LTO fails with or without this patch because, ironically,
the linker doesn't like the combination of dead_strip and LTO
when building libLTO.so :-)
llvm-svn: 127870
2011-03-18 05:12:38 +00:00
NAKAMURA Takumi
f4d5346fb4
tools/lto/LTOModule.cpp: Eliminate an unused variable.
...
llvm-svn: 127859
2011-03-18 03:21:11 +00:00
NAKAMURA Takumi
ce60d4cd4d
llvm-bcanalyzer.cpp: Tweak format string to suppress warnings on mingw32-g++.
...
llvm-svn: 127858
2011-03-18 03:21:04 +00:00
Rafael Espindola
ab959a2e68
Use RequiresNullTerminator to create buffers without a null terminator
...
instead of copying.
llvm-svn: 127835
2011-03-17 22:18:42 +00:00
Stuart Hastings
ec54bd755f
Reapply: Add type output to llvm-dis annotations. Patch by Yuri!
...
llvm-svn: 127824
2011-03-17 19:50:04 +00:00
Stuart Hastings
ead01c40e1
Revert 127813 while fixing broken test.
...
llvm-svn: 127814
2011-03-17 16:54:27 +00:00
Stuart Hastings
8e08a786bf
Add type output to llvm-dis. Patch by Yuri!
...
llvm-svn: 127813
2011-03-17 16:30:14 +00:00
Rafael Espindola
b39c7c7b17
Add support in the LTO library for loading an object from the middle
...
of an file.
llvm-svn: 127781
2011-03-17 00:36:11 +00:00
Francois Pichet
dfeda09345
Make llvm::Consumer a class (to remove a MSVC warning since Consumer is later forward declared as a struct)
...
llvm-svn: 127632
2011-03-14 23:07:21 +00:00
Renato Golin
4b6ae939ca
This patch is a big refactoring of llvm-diff. It doesn't add new features, but it re-organizes the old features, so I can insert the MetadataEngine to use the same infrastructure.
...
llvm-svn: 127627
2011-03-14 22:22:46 +00:00
Oscar Fuentes
ac824ee462
LTO is not ready for Windows.
...
llvm-svn: 127562
2011-03-13 03:06:59 +00:00
Oscar Fuentes
3685f2762b
Build EnhancedDisassembly as a shared library too.
...
llvm-svn: 127555
2011-03-12 22:01:47 +00:00
Oscar Fuentes
02c446a73a
Build LTO as a static library too.
...
llvm-svn: 127553
2011-03-12 22:01:36 +00:00
Oscar Fuentes
68c1f55fdc
Build LTO as a static library too.
...
llvm-svn: 127549
2011-03-12 17:32:30 +00:00
Oscar Fuentes
1fc0c8ab78
Update link components for llvm-dis and LTO.
...
llvm-svn: 127545
2011-03-12 16:48:49 +00:00
Oscar Fuentes
0122841626
Force re-linking of LLVMgold.so when its exports file changes.
...
llvm-svn: 127473
2011-03-11 18:27:13 +00:00
Oscar Fuentes
87e4a4da0d
Fix processing of gold.exports.
...
llvm-svn: 127471
2011-03-11 18:07:46 +00:00
Devang Patel
982efb5c89
While printing annotations, print line number and variable name if debug info is present.
...
llvm-svn: 127470
2011-03-11 18:07:33 +00:00
Oscar Fuentes
64d05bc281
Add LTO and gold plugin to the CMake build. Linux-only, support for
...
other systems pending.
PR9456.
llvm-svn: 127466
2011-03-11 15:44:24 +00:00
Rafael Espindola
1e49a6d9bc
Add a special streamer to libLTO that just records symbols definitions and
...
uses.
The result produced by the streamer is used to give the linker more accurate
information and to add to llvm.compiler.used. The second improvement removes
the need for the user to add __attribute__((used)) to functions only used in
inline asm. The first one lets us build firefox with LTO on Darwin :-)
llvm-svn: 126830
2011-03-02 04:14:42 +00:00
Rafael Espindola
7e5fe6ce1c
Gold now rescans archives as needed, so the pass-through options are not
...
necessary anymore.
llvm-svn: 126580
2011-02-27 20:30:22 +00:00
Rafael Espindola
92c06ba158
bfd was fixed, remove the work around.
...
llvm-svn: 126579
2011-02-27 20:15:37 +00:00
Rafael Espindola
908d391bd2
LTO uses MC now.
...
llvm-svn: 126546
2011-02-26 16:44:13 +00:00
Rafael Espindola
fac373cacb
Switch LTO to use MC. This takes the linking of libxul.so from about 7m to
...
6m30.
llvm-svn: 126426
2011-02-24 21:04:06 +00:00
Chris Lattner
7c3230d348
fit in 80 cols.
...
llvm-svn: 126399
2011-02-24 18:59:38 +00:00
Benjamin Kramer
c053644217
Plug some leaks in edis.
...
- Don't leak parsed operands during tokenization.
- Don't leak printed insts in llvm-mc.
llvm-svn: 126381
2011-02-24 11:03:19 +00:00
Sean Callanan
be81988c99
Fixed a bug in the enhanced disassembly tester that
...
caused it to only parse one line of input.
llvm-svn: 126301
2011-02-23 03:29:41 +00:00
Oscar Fuentes
ab0465020b
CMake: remove unnecessary variable.
...
llvm-svn: 126224
2011-02-22 15:40:20 +00:00
Sean Callanan
5b23294799
Fixed llvm-mc in edis mode to use the result of
...
operand.evaluate as an error code, not as the
contents of the operand.
llvm-svn: 126181
2011-02-22 02:09:15 +00:00
Rafael Espindola
9ef90d5b35
Dispose modules early and only create codegen when the plugin is being
...
used by the linker and not by nm or ar.
llvm-svn: 126089
2011-02-20 18:28:29 +00:00
Rafael Espindola
477d11f9a0
Fix some memory leaks and avoid looking in the hash tables twice.
...
libxul links in 7m0.403s.
llvm-svn: 126085
2011-02-20 16:27:25 +00:00
Stephen Wilson
a32b8d7801
This patch lets LLDB build as an LLVM subproject. LLDB is not built in
...
parallel with the rest of the tools directory as it depends on Clang.
This patch was first applied in r125956 and subsequently reverted in
r125964 as it broke in-tree builds. Makefile.rules was fixed up in
r126070 to handle missing optional directories for the in-tree case,
so it should be safe now to bring this patch back in.
llvm-svn: 126071
2011-02-20 04:17:15 +00:00
Rafael Espindola
d4f34d840e
Add modules to codegen as soon as possible. This reduces the link time
...
of libxul from 12m31.084s to 7m1.359s.
llvm-svn: 126052
2011-02-19 21:49:57 +00:00
Mikhail Glushenkov
82e559837a
Make "-opt [-emit-llvm]" work for .ll files.
...
Patch by Kaelyn Uhrain!
llvm-svn: 126000
2011-02-19 00:33:27 +00:00
Chris Lattner
1341df93f7
add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
...
llvm-svn: 125978
2011-02-18 22:34:03 +00:00
Chris Lattner
15c8b5ef8b
Have opt set up a specific TargetLibraryInfo for modules
...
with a triple.
llvm-svn: 125970
2011-02-18 22:13:01 +00:00
Oscar Fuentes
5ed962656c
Move library stuff out of the toplevel CMakeLists.txt file.
...
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Owen Anderson
d2f7431fa8
Revert r125956, which broke the build if you _don't_ have lldb checked out.
...
llvm-svn: 125964
2011-02-18 21:33:23 +00:00
Stephen Wilson
880a6129e2
This patch lets LLDB build as an LLVM subproject. LLDB is not built in
...
parallel with the rest of the tools directory as it depends on Clang.
llvm-svn: 125956
2011-02-18 20:50:33 +00:00
Peter Collingbourne
53049153cf
Make -disable-simplify-libcalls work with -std-compile-opts
...
llvm-svn: 125824
2011-02-18 02:59:21 +00:00
Rafael Espindola
6b6ed5d1f9
Add a debug obj-path option to make it easy to keep the .o produce by LTO.
...
llvm-svn: 125663
2011-02-16 11:19:44 +00:00
Rafael Espindola
70d8015063
Switch llvm to using comdats. For now always use groups with a single
...
section.
llvm-svn: 125526
2011-02-14 22:23:49 +00:00
Chris Lattner
20541a6da6
improve solaris support, from PR9109, patch by Yuri!
...
llvm-svn: 125456
2011-02-13 08:38:44 +00:00
Rafael Espindola
8cc5910dbc
Preserve aliases if needed.
...
llvm-svn: 125439
2011-02-12 18:03:13 +00:00
Rafael Espindola
3937ded624
Fix a silly bug I introduced when dropping std::string.
...
llvm-svn: 125420
2011-02-12 00:19:56 +00:00
Chris Lattner
cee9db2b6f
fix dumping of METADATA_ATTACHMENT2 names, patch by Peter Housel!
...
llvm-svn: 125367
2011-02-11 05:50:01 +00:00
Rafael Espindola
34b59389ea
Remove std::string version of getNameWithPrefix.
...
llvm-svn: 125363
2011-02-11 05:23:09 +00:00
NAKAMURA Takumi
3de6c8607e
CMake: LLVM_NO_RTTI must be obsolete now!
...
llvm-svn: 125274
2011-02-10 09:13:39 +00:00
NAKAMURA Takumi
cec7e6828e
tools/llvm-ld/CMakeLists.txt: llvm-ld depends on llvm-stub at runtime.
...
llvm-svn: 125166
2011-02-09 04:17:47 +00:00
NAKAMURA Takumi
db06756c9c
tools/llvm-ld: Cygwin can handle #!shbang.
...
llvm-svn: 125165
2011-02-09 04:17:39 +00:00