Oscar Fuentes
8419f80e50
Make llvm-config.in configuration more MSYS-friendly.
...
Some of those POSIX <-> Windows command line conversions ended on
failure.
llvm-svn: 127958
2011-03-19 22:52:33 +00:00
Oscar Fuentes
94b5de9966
CMake: store TARGET_TRIPLE on llvm-config.in.
...
llvm-svn: 127957
2011-03-19 22:52:25 +00:00
Jim Grosbach
75deb766b9
Beginnings of MC-JIT code generation.
...
Proof-of-concept code that code-gens a module to an in-memory MachO object.
This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld
for similarly conceptual work for that part) which will take the compiled
object and link it together with the rest of the system, providing back to the
JIT a table of available symbols which will be used to respond to the
getPointerTo*() queries.
llvm-svn: 127916
2011-03-18 22:48:41 +00:00
Rafael Espindola
b0fe115914
Use lazy parsing in LTO. Unfortunately this is only a 3% time saving for
...
'ar'. Have to figure out how to make libLTO even lazier.
llvm-svn: 127901
2011-03-18 19:51:00 +00:00
Jim Grosbach
3fc76bb1c7
Add llvm-rtdyld support for loading 32-bit code.
...
Factor out the 64-bit specific bits into a helper function and add an
equivalent that loads the 32-bit sections. This allows using llvm-rtdyld on ARM.
llvm-svn: 127892
2011-03-18 18:54:32 +00:00
Oscar Fuentes
09cf7c95ae
Update list of link components for llvm-rtdyld.
...
llvm-svn: 127887
2011-03-18 17:27:04 +00:00
Jim Grosbach
f45a71badc
Naming conventional tidy up.
...
llvm-svn: 127886
2011-03-18 17:24:21 +00:00
Jim Grosbach
b6506c5040
MachO file loader and execution utility.
...
Add a bone-simple utility to load a MachO object into memory, look for
a function (main) in it, and run that function directly. This will be used
as a test and development platform for MC-JIT work regarding symbol resolution,
dynamic lookup, etc..
Code by Daniel Dunbar.
llvm-svn: 127885
2011-03-18 17:11:39 +00:00
Rafael Espindola
0e189f5304
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
5327c64434
tools/lto/LTOModule.cpp: Eliminate an unused variable.
...
llvm-svn: 127859
2011-03-18 03:21:11 +00:00
NAKAMURA Takumi
a4eec0fe83
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
3ecf930d14
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
ab87d41b43
Reapply: Add type output to llvm-dis annotations. Patch by Yuri!
...
llvm-svn: 127824
2011-03-17 19:50:04 +00:00
Stuart Hastings
da553eb3ef
Revert 127813 while fixing broken test.
...
llvm-svn: 127814
2011-03-17 16:54:27 +00:00
Stuart Hastings
b1ced0cb9e
Add type output to llvm-dis. Patch by Yuri!
...
llvm-svn: 127813
2011-03-17 16:30:14 +00:00
Rafael Espindola
8dab9a762b
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
ebacb783aa
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
4c9d4ab277
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
d57f14037a
LTO is not ready for Windows.
...
llvm-svn: 127562
2011-03-13 03:06:59 +00:00
Oscar Fuentes
e747eabef1
Build EnhancedDisassembly as a shared library too.
...
llvm-svn: 127555
2011-03-12 22:01:47 +00:00
Oscar Fuentes
a153a45c99
Build LTO as a static library too.
...
llvm-svn: 127553
2011-03-12 22:01:36 +00:00
Oscar Fuentes
eef24d34e6
Build LTO as a static library too.
...
llvm-svn: 127549
2011-03-12 17:32:30 +00:00
Oscar Fuentes
471e660c5a
Update link components for llvm-dis and LTO.
...
llvm-svn: 127545
2011-03-12 16:48:49 +00:00
Oscar Fuentes
548931d606
Force re-linking of LLVMgold.so when its exports file changes.
...
llvm-svn: 127473
2011-03-11 18:27:13 +00:00
Oscar Fuentes
d83646bbfd
Fix processing of gold.exports.
...
llvm-svn: 127471
2011-03-11 18:07:46 +00:00
Devang Patel
8f39c0056d
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
57a2625738
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
7f301833ee
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
53fdf0bfc1
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
744cde8b39
bfd was fixed, remove the work around.
...
llvm-svn: 126579
2011-02-27 20:15:37 +00:00
Rafael Espindola
13bfff7d40
LTO uses MC now.
...
llvm-svn: 126546
2011-02-26 16:44:13 +00:00
Rafael Espindola
58423e8aad
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
2f6f4a4788
fit in 80 cols.
...
llvm-svn: 126399
2011-02-24 18:59:38 +00:00
Benjamin Kramer
feccb33180
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
d7e66a8942
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
25ad44254b
CMake: remove unnecessary variable.
...
llvm-svn: 126224
2011-02-22 15:40:20 +00:00
Sean Callanan
2fd268300e
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
83ad96cc73
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
5a77325398
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
a66611936e
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
f2fd1bf3d8
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
e41df91c1d
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
a0dede2c21
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
e86dec3eb2
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
6e5d344a2e
Move library stuff out of the toplevel CMakeLists.txt file.
...
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Owen Anderson
e7d107d271
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
b04947df1b
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
77a70485d9
Make -disable-simplify-libcalls work with -std-compile-opts
...
llvm-svn: 125824
2011-02-18 02:59:21 +00:00
Rafael Espindola
3c40b1fab0
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
3c32af5834
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