Commit Graph

4494 Commits

Author SHA1 Message Date
Manman Ren
b8e48a636e Debug Info: In DIBuilder, the context field of subprogram is updated to use
DIScopeRef.

A paired commit at clang is required due to changes to DIBuilder.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192378 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10 18:40:01 +00:00
Hans Wennborg
a7d9a5d64a Provide msbuild integration for vs2013.
Patch by Josh Samuel!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192371 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10 17:32:01 +00:00
Hans Wennborg
6a24c7d4e7 Fix msbuild integration install script.
We previously failed to check whether the SUCCESS variable was set,
and would thus always exit with a failure if vs2012 didn't exist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192370 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-10 17:31:54 +00:00
Greg Bedwell
0568ba6e3a Test commit. Remove whitespace from otherwise empty lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192284 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-09 08:55:27 +00:00
Andrew Kaylor
eb59e4d5ac Removing unintended code block from lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192205 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 17:15:11 +00:00
Rafael Espindola
5a0169f0a1 Only modify lto.exports.def when contents have changed.
Patch by Greg Bedwell.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-08 15:07:00 +00:00
NAKAMURA Takumi
55a31a3aac Revert r191088, corresponding to r191823 to re-enable llvm-lto on cygming.
r191088 is "llvm/tools/Makefile: Suppress building llvm-lto on cygming, for now, probably due to LTO.dll."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192104 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 15:42:22 +00:00
Simon Atanasyan
c84c742edd [Mips] Teach llvm-readobj to print MIPS-specific ELF program headers.
The patch reviewed by Michael Spencer.
http://llvm-reviews.chandlerc.com/D1846

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07 08:58:27 +00:00
Benjamin Kramer
5ccfef6a1d lli: Plug leaks in the remote target external implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192031 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 11:53:20 +00:00
Rafael Espindola
ec2ac89856 Fix object file writing in llvm-lto on Windows.
We were writing in text mode.

Patch by Greg Bedwell.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 21:40:54 +00:00
Andrew Kaylor
36ea408903 Attempting to fix lli build error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191979 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 20:53:49 +00:00
Andrew Kaylor
e3fd646e17 Fixing container/pointer bug in remote-lli found by ASan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 20:09:36 +00:00
Benjamin Kramer
33f362f549 lli: Check pipe creation for errors.
This is unlikely to ever fail, but ubuntu GCC warns when the return value is
unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191973 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 19:10:03 +00:00
Rafael Espindola
ef522b4c9c Add lto_codegen_add_dso_symbol to the export list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191970 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 17:30:14 +00:00
Andrew Kaylor
b868e9101c Adding support and tests for multiple module handling in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191938 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-04 00:49:38 +00:00
Rafael Espindola
438900938c Optimize linkonce_odr unnamed_addr functions during LTO.
Generalize the API so we can distinguish symbols that are needed just for a DSO
symbol table from those that are used from some native .o.

The symbols that are only wanted for the dso symbol table can be dropped if
llvm can prove every other dso has a copy (linkonce_odr) and the address is not
important (unnamed_addr).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 18:29:09 +00:00
Rafael Espindola
75a641c910 Dispose the codegen even when just writing the bitcode file.
This makes it possible to add timers to the code generator and still use them
with -plugin-opt=emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191866 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-03 00:07:30 +00:00
Andrew Kaylor
62faf2f9d0 Fixing lli-child-target build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 22:27:23 +00:00
Benjamin Kramer
18b222a872 Add newline at eof.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 21:58:02 +00:00
Richard Smith
d34a4d60f0 Pass the resolved lli-child-target executable name to execv, rather than
searching $PATH for it then blindly executing it from $PWD anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 21:33:12 +00:00
Andrew Kaylor
b47c0108b3 Fix build problems with remote lli implementation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191848 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 19:26:16 +00:00
Andrew Kaylor
f18815607a Clean up lli execution code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191845 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 18:04:40 +00:00
Andrew Kaylor
56849e7a9d Fixing compile warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191844 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 18:00:34 +00:00
Andrew Kaylor
0ab5c6c16b Adding out-of-process execution support to lli.
At this time only Unix-based systems are supported.  Windows has stubs and should re-route to the simulated mode.

Thanks to Sriram Murali for contributions to this patch.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191843 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 17:12:36 +00:00
Chandler Carruth
dd5d86d992 Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 15:42:23 +00:00
Chandler Carruth
b6adb4216c Tidy up this line of the Makefile before I start hacking on it.
I really should sort it or do something more sustainable, but I couldn't
work up the energy to do it... Sorry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191832 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 15:14:13 +00:00
Rafael Espindola
0e95b3aba9 Fix option parsing in the gold plugin.
This was broken when options were moved up in r191680. No test because this is
specific LLVMgold.so/libLTO.so.

Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 14:36:23 +00:00
Rafael Espindola
b964366a9a Add a -exported-symbol option to llvm-lto.
Patch by Tom Roeder.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 14:12:56 +00:00
Rafael Espindola
2be8ab4603 Enable building LTO on WIN32.
Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191823 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 14:04:38 +00:00
Filip Pizlo
6eb43d2956 This threads SectionName through the allocateCodeSection/allocateDataSection APIs, both in C++ and C land.
It's useful for the memory managers that are allocating a section to know what the name of the section is.  
At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what 
memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about 
what each allocation is for.  This allows clients that supply their own memory managers to do this.  
Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM 
client.

This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM.  I'm assuming that 
it's safe to change the C++ API because that API is allowed to change.  I'm assuming that it's safe to change 
the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory 
management C API).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 00:59:25 +00:00
Rafael Espindola
8819c84aed Remove several unused variables.
Patch by Alp Toker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 13:32:03 +00:00
Andrew Kaylor
8e9ec01534 Adding multiple module support for MCJIT.
Tests to follow.

PIC with small code model and  EH frame handling will not work with multiple modules.  There are also some rough edges to be smoothed out for remote target support.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-01 01:47:35 +00:00
Rafael Espindola
c13c9e5a9d Move command line options to the users of libLTO. Fixes --enable-shared build.
Patch by Richard Sandiford.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191680 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 16:39:19 +00:00
Rafael Espindola
4b5205d2a3 Revert "Enable building LTO on WIN32."
This reverts commit r191670.

It was causing build failures on the msvc bots:

http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/5166/steps/compile/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 16:32:51 +00:00
Rafael Espindola
a5b9cd1c68 Enable building LTO on WIN32.
Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191670 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 15:28:14 +00:00
Rui Ueyama
29552222c2 Object/COFF: Rename getXXX{Begin,End} -> xxx_{begin,end}.
It is mentioned in the LLVM coding standard that _begin() and _end() suffixes
should be used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 21:47:05 +00:00
Rui Ueyama
a6610ee882 Re-submit r191472 with a fix for big endian.
llvm-objdump: Dump COFF import table if -private-headers option is given.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191557 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 21:04:00 +00:00
Rui Ueyama
4715a11dcf Revert "llvm-objdump: Dump COFF import table if -private-headers option is given."
This reverts commit r191472 because it's failing on BE machine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 01:29:36 +00:00
Rui Ueyama
10965f2045 Fix another -Wnon-pod-varargs error in r191472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191474 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 00:53:07 +00:00
Rui Ueyama
2f00626f7e Fix -Wnon-pod-varargs error in r191472.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191473 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 00:20:53 +00:00
Rui Ueyama
0c873adc82 llvm-objdump: Dump COFF import table if -private-headers option is given.
This is a patch to add capability to llvm-objdump to dump COFF Import Table
entries, so that we can write tests for LLD checking Import Table contents.

llvm-objdump did not print anything but just file name if the format is COFF
and -private-headers option is given. This is a patch adds capability for
dumping DLL Import Table, which is specific to the COFF format.

In this patch I defined a new iterator to iterate over import table entries.
Also added a few functions to COFFObjectFile.cpp to access fields of the entry.

Differential Revision: http://llvm-reviews.chandlerc.com/D1719

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191472 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-27 00:07:01 +00:00
Eric Christopher
498ffb8a56 Add gnu pubsections as options to llvm-dwarfdump.
Argument spelling feedback welcome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191409 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 23:02:44 +00:00
Eric Christopher
7357f03e88 Dump the normal dwarf pubtypes section as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-25 23:02:41 +00:00
Peter Collingbourne
cc48854d5d Move LTO support library to a component, allowing it to be tested
more reliably across platforms.  Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 23:52:22 +00:00
NAKAMURA Takumi
8607525110 llvm/tools/Makefile: Suppress building llvm-lto on cygming, for now, probably due to LTO.dll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-20 13:12:24 +00:00
Peter Collingbourne
88fae0edcc Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 22:15:52 +00:00
Reid Kleckner
31eb340cb6 msbuild: Set _MSC_VER to match the CRT we're using
Various Windows SDK headers use _MSC_VER values to figure out what
version of the VC++ headers they're using, in particular for SAL macros.

Patch by Paul Hampson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191015 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 17:18:35 +00:00
Reid Kleckner
a22ff961db Include an LLVM-vs2012_xp toolset in the MSBuild integration
Patch by Paul Hampson!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191010 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 16:50:40 +00:00
Andrew Trick
abe68f5917 Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."
Working on a better solution to this.

This reverts commit 7d4e9934e7.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190990 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 06:02:43 +00:00
Andrew Trick
7d4e9934e7 Encapsulate PassManager debug flags to avoid static init and cxa_exit.
This puts all the global PassManager debugging flags, like
-print-after-all and -time-passes, behind a managed static. This
eliminates their static initializers and, more importantly, exit-time
destructors.

The only behavioral change I anticipate is that tools need to
initialize the PassManager before parsing the command line in order to
export these options, which makes sense. Tools that already initialize
the standard passes (opt/llc) don't need to do anything new.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190974 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-18 23:31:16 +00:00