1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

6389 Commits

Author SHA1 Message Date
Davide Italiano
baadd9459c [llvm-objdump] Use report_error() and improve error coverage.
llvm-svn: 257561
2016-01-13 02:03:31 +00:00
David Majnemer
32661ec901 [CodeView] Improve the line table dumper
This change has us print out fields we didn't previously understand.  To
improve readability, we now group column information with it's
respective line.

llvm-svn: 257552
2016-01-13 01:05:16 +00:00
Kevin Enderby
3f9a07c662 For llvm-objdump, add the option -private-header (without the trailing ’s’)
to only print the first private header.

Which for Mach-O files only prints the Mach header and not the subsequent load
commands.  Which is used by scripts to match what the darwin otool(1) with the
-h flag does without the -l flag.

For non-Mach-O files it has the same functionality as -private-headers (with
the trailing ’s’).

rdar://24158331

llvm-svn: 257548
2016-01-13 00:25:36 +00:00
Rui Ueyama
ed7e9e65ed COFF: Teach llvm-objdump how to dump DLL forwarder symbols.
llvm-svn: 257539
2016-01-12 23:28:42 +00:00
Dan Gohman
44c4718de7 [WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.
A request has been made to the official registry, but an official value is
not yet available. This patch uses a temporary value in order to support
development. When an official value is recieved, the value of EM_WEBASSEMBLY
will be updated.

llvm-svn: 257517
2016-01-12 20:56:01 +00:00
Andrew Wilkins
a734d141fe Revert r257003
This revision breaks llvm-config if you set
BUILD_SHARED_LIBS=on in a CMake build. Backing
out until the fix is ready to land.

llvm-svn: 257457
2016-01-12 07:23:58 +00:00
NAKAMURA Takumi
1f8f7e6bc2 lli: Fix warnings. [-Wsign-compare]
llvm-svn: 257430
2016-01-12 01:23:30 +00:00
NAKAMURA Takumi
74d6cb4eba lli-child-target: Introduce a new dependency on RuntimeDyld.
llvm-svn: 257410
2016-01-11 23:12:30 +00:00
Rafael Espindola
59ed1d964f Add a missing error handling to llvm-lto.
llvm-svn: 257395
2016-01-11 22:08:22 +00:00
Lang Hames
d0ddff1135 XFAIL the LLI remote JIT tests on Win32.
llvm-svn: 257391
2016-01-11 21:41:34 +00:00
Lang Hames
380df1aad3 lli/ChildTarget now depends on OrcJIT. Add that component to the Makefile.
llvm-svn: 257360
2016-01-11 17:44:07 +00:00
Lang Hames
6195badb41 [LLI] Remove dependence on RemoteTarget.cpp from ChildTarget's Makefile.
RemoteTarget.cpp was removed in r257343.

llvm-svn: 257351
2016-01-11 17:00:31 +00:00
Lang Hames
0c18396b3b [LLI] Replace the LLI remote-JIT support with the new ORC remote-JIT components.
The new ORC remote-JITing support provides a superset of the old code's
functionality, so we can replace the old stuff. As a bonus, a couple of
previously XFAILed tests have started passing.

llvm-svn: 257343
2016-01-11 16:35:55 +00:00
Lang Hames
ecc377c6e6 [Orc] Rename OrcTargetSupport to OrcArchitectureSupport to avoid confusion with
the upcoming remote-target support classes.

llvm-svn: 257302
2016-01-11 00:56:15 +00:00
Lang Hames
7d118365e3 [Orc] Enable user-supplied memory managers in the CompileOnDemand layer.
Previously the CompileOnDemand layer was hard-coded to use a new
SectionMemoryManager for each function when it was called.

llvm-svn: 257265
2016-01-09 20:55:18 +00:00
Mike Aizatsky
d03c218611 [llvm-symbolizer] -print-source-context-lines option to print source code around the line.
Differential Revision: http://reviews.llvm.org/D15909

llvm-svn: 257236
2016-01-09 00:14:35 +00:00
Mike Aizatsky
a5855c0f74 [llvm-symbolizer] Print out non-address lines verbatim.
Differential Revision: http://reviews.llvm.org/D15876

llvm-svn: 257115
2016-01-07 23:57:41 +00:00
Andrew Wilkins
51a57d89a6 tools/llvm-config: improve shared library support
Summary:
r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.

This diff extends this as follows:
 - If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
   library, even if all component libraries exist.
 - Two flags, --link-shared and --link-static are introduced
   to provide explicit guidance. If --link-shared is passed
   and the shared library does not exist, an error results.

Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.

Reviewers: DiamondLovesYou, beanz

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15033

llvm-svn: 257003
2016-01-07 00:18:56 +00:00
Davide Italiano
c1c5a1a0a8 [llvm-objdump] Mark noreturn function as such.
Match attribute in the header to make MSVC happy.

llvm-svn: 256560
2015-12-29 13:41:02 +00:00
Davide Italiano
5e3e0bcb69 [llvm-objdump] Use stderr and not stdout for fatal errors.
llvm-svn: 256423
2015-12-25 18:16:45 +00:00
Adrian Prantl
3787e623ca llvm-dwarfdump: Add support for dumping .dSYM bundles.
This replicates the logic of Darwin dwarfdump for manually opening up
.dSYM bundles without introducing any new dependencies.
<rdar://problem/20491670>

llvm-svn: 256350
2015-12-23 21:51:13 +00:00
Davide Italiano
55611bd554 [llvm-readobj] Use stderr and not stdout for error messages.
llvm-svn: 256347
2015-12-23 19:29:34 +00:00
Rafael Espindola
69b537cdd4 Disable use list order on the gold plugin.
It turns out that his is *really* slow. With this change the link of
clang with plugin-opt=emit-llvm goes from 41 to 26 seconds.

We can add an option to enable it again if needed.

llvm-svn: 256302
2015-12-22 23:45:49 +00:00
David Majnemer
47d3d1e5ef [MC, COFF] Support link /incremental conditionally
Today, we always take into account the possibility that object files
produced by MC may be consumed by an incremental linker.  This results
in us initialing fields which vary with time (TimeDateStamp) which harms
hermetic builds (e.g. verifying a self-host went well) and produces
sub-optimal code because we cannot assume anything about the relative
position of functions within a section (call sites can get redirected
through incremental linker thunks).

Let's provide an MCTargetOption which controls this behavior so that we
can disable this functionality if we know a-priori that the build will
not rely on /incremental.

llvm-svn: 256203
2015-12-21 22:09:27 +00:00
Davide Italiano
abd57b3a46 [llvm-objdump] Use appropriate helper. NFC.
llvm-svn: 256156
2015-12-21 14:10:54 +00:00
Davide Italiano
ff8004bbec [llvm-objdump] Move COFF function to where it belongs.
Ideally much more stuff should be moved out of llvm-objdump.cpp, but that
will happen later.

llvm-svn: 256118
2015-12-20 09:54:34 +00:00
Xinliang David Li
859c330e8f [PGO] Improve Indexed Profile Reader efficiency
With the support of value profiling added, the Indexed prof
reader gets less efficient. The prof reader initialization
used to be just reading the file header, but with VP support
added, initialization needs to walk through all profile keys
of ondisk hash table resulting in very poor locality and large
memory increase (keys are stored together with the profile data
in the mapped profile buffer). Even worse, when the reader is 
used by the compiler (not llvm-profdata too), the penalty becomes
very high as compilation of each single module requires touching
profile data buffer for the whole program. 

In this patch, the icall target values (MD5hash) are no longer eargerly 
converted back to name strings when the data is read into memory. New
interface is added to to profile reader so that InstrProfSymtab can be
lazily created for Indexed profile reader on-demand. Creating of the 
symtab is intended to be used by llvm-profdata tool for symbolic dumping
of  VP data. It can be used with compiler (for legacy out of tree uses)
too but not recommended due to compile time and memory reasons 
mentioned above.

Some other cleanups are also included: Function Addr to md5 map is now
consolated into InstrProfSymtab. InstrProfStringtab is no longer used and
eliminated.

llvm-svn: 256114
2015-12-20 06:22:13 +00:00
Davide Italiano
0a7e02f0db [llvm-objdump] Fail early if we can't parse the object header.
llvm-svn: 256108
2015-12-19 22:09:40 +00:00
Rafael Espindola
552e7f96b1 Assert that we have all use/users in the getters.
An error that is pretty easy to make is to use the lazy bitcode reader
and then do something like

if (V.use_empty())

The problem is that uses in unmaterialized functions are not accounted
for.

This patch adds asserts that all uses are known.

llvm-svn: 256105
2015-12-19 20:03:23 +00:00
Rafael Espindola
e392243a54 Deprecate a few C APIs.
This deprecates:
* LLVMParseBitcode
* LLVMParseBitcodeInContext
* LLVMGetBitcodeModuleInContext
* LLVMGetBitcodeModule

They are replaced with the functions with a 2 suffix which do not record
a diagnostic.

llvm-svn: 256065
2015-12-18 23:46:42 +00:00
Rafael Espindola
364ada1a48 Delete dead code: only functions are materializable.
llvm-svn: 256052
2015-12-18 22:44:07 +00:00
Rafael Espindola
914b00520f Use a lambda to reduce code duplication.
llvm-svn: 256050
2015-12-18 22:40:27 +00:00
Alexey Samsonov
2a592789eb [sancov] IWYU fix: add proper header inclusion.
llvm-svn: 256040
2015-12-18 22:02:08 +00:00
Rafael Espindola
a8daff187a Drop materializeAllPermanently.
This inlines materializeAll into the only caller
(materializeAllPermanently) and renames materializeAllPermanently to
just materializeAll.

llvm-svn: 256024
2015-12-18 20:13:39 +00:00
Pete Cooper
cda523f460 Revert "Improve DWARFDebugFrame::parse to also handle __eh_frame."
This reverts commit r256008.

Its breaking multiple buildbots, although works for me locally.

llvm-svn: 256013
2015-12-18 19:45:38 +00:00
Pete Cooper
70c961d67d Improve DWARFDebugFrame::parse to also handle __eh_frame.
LLVM MC has single methods which can handle the output of EH frame and DWARF CIE's and FDE's.

This code improves DWARFDebugFrame::parse to do the same for parsing.

This also allows llvm-objdump to support the --dwarf=frames option which objdump supports.  This
option dumps the .eh_frame section using the new code in DWARFDebugFrame::parse.

http://reviews.llvm.org/D15535

Reviewed by Rafael Espindola.

llvm-svn: 256008
2015-12-18 18:51:08 +00:00
Rafael Espindola
493b2dfc10 Add a test for LLVMGetBitcodeModule.
llvm-svn: 255985
2015-12-18 03:57:26 +00:00
Eric Christopher
359dea2a6b Reorganize the C API headers to improve build times.
Type specific declarations have been moved to Type.h and error handling
routines have been moved to ErrorHandling.h. Both are included in Core.h
so nothing should change for projects directly including the headers,
but transitive dependencies may be affected.

llvm-svn: 255965
2015-12-18 01:46:52 +00:00
Teresa Johnson
0dce8d436c [ThinLTO] Metadata linking for imported functions
Summary:
Second patch split out from http://reviews.llvm.org/D14752.

Maps metadata as a post-pass from each module when importing complete,
suturing up final metadata to the temporary metadata left on the
imported instructions.

This entails saving the mapping from bitcode value id to temporary
metadata in the importing pass, and from bitcode value id to final
metadata during the metadata linking postpass.

Depends on D14825.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, llvm-commits, joker.eph

Differential Revision: http://reviews.llvm.org/D14838

llvm-svn: 255909
2015-12-17 17:14:09 +00:00
Davide Italiano
27e94a3dee [llvm-objdump] Use report_fatal_error() for a more uniform error handling.
llvm-svn: 255871
2015-12-17 01:59:50 +00:00
Rafael Espindola
f7a0054c75 Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.

llvm-svn: 255842
2015-12-16 23:16:33 +00:00
Nathan Slingerland
648ea4f74f [PGO] Handle and report overflow during profile merge for all types of data
Summary: Surface counter overflow when merging profile data. Merging still occurs on overflow but counts saturate to the maximum representable value. Overflow is reported to the user.

Reviewers: davidxl, dnovillo, silvas

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D15547

llvm-svn: 255825
2015-12-16 21:45:43 +00:00
Teresa Johnson
c78d28935d Use LLVM style variable name (NFC)
Fixes variable name from r255779.

llvm-svn: 255824
2015-12-16 21:37:48 +00:00
Chris Bieneman
acfa604132 [CMake] Adding llvm-profdata to the list of tools clang needs.
Bootstrapping clang to generate PGO data (patches coming soon), requires llvm-profdata targets to be generated before clang.

llvm-svn: 255794
2015-12-16 18:30:36 +00:00
Reid Kleckner
a0000e2429 Reland "[llvm-readobj] Simplify usage of -codeview flag"
Relands r255790 with fixed tests.

llvm-svn: 255793
2015-12-16 18:28:12 +00:00
Reid Kleckner
e80fed4166 Revert "[llvm-readobj] Simplify usage of -codeview flag"
This reverts commit r255790.

llvm-svn: 255791
2015-12-16 18:19:34 +00:00
Reid Kleckner
958c5136d5 [llvm-readobj] Simplify usage of -codeview flag
llvm-svn: 255790
2015-12-16 18:18:39 +00:00
Teresa Johnson
110b342ed8 Add RAII wrapper for gold plugin file management
Suggested in review of r255256.

llvm-svn: 255779
2015-12-16 16:34:06 +00:00
Mike Aizatsky
f3003a8493 [sancov] blacklist support.
Summary:
Using the blacklist the user can filter own unwanted functions
from all outputs. By default blacklist contains "fun:__sancov*" line.

Differential Revision: http://reviews.llvm.org/D15364

llvm-svn: 255732
2015-12-16 00:31:48 +00:00
Davide Italiano
8485ad1cb8 [llvm-objdump/MachODump] Shrink code a little bit. NFC.
llvm-svn: 255701
2015-12-15 23:14:21 +00:00