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

6604 Commits

Author SHA1 Message Date
Mehdi Amini
16ae407079 Fix GOLD plugin build after r262976
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262981
2016-03-09 01:55:15 +00:00
Mehdi Amini
ea71be934f libLTO: add a ThinLTOCodeGenerator on the model of LTOCodeGenerator.
This is intended to provide a parallel (threaded) ThinLTO scheme
for linker plugin use through the libLTO C API.

The intent of this patch is to provide a first implementation as a
proof-of-concept and allows linker to start supporting ThinLTO by
definiing the libLTO C API. Some part of the libLTO API are left
unimplemented yet. Following patches will add support for these.

The current implementation can link all clang/llvm binaries.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 262977
2016-03-09 01:37:22 +00:00
Zachary Turner
da197122a6 [llvm-pdbdump] Dump line table information.
This patch adds the -lines command line option which will dump
source/line information for each compiland and source file.

llvm-svn: 262962
2016-03-08 21:42:24 +00:00
Benjamin Kramer
4bc5894482 [gold] Avoid assertion failures when taking a pointer to an empty vector.
llvm-svn: 262926
2016-03-08 14:02:46 +00:00
Filipe Cabecinhas
212d6764b8 [llvm-config] Get rid of code related to the Makefile builds
Summary: I left --build-system for backwards compat, in case there are scripts using it. Feel free to ask for its removal too.

Reviewers: chapuni, tstellarAMD

Subscribers: llvm-commits

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

llvm-svn: 262924
2016-03-08 11:49:24 +00:00
Quentin Colombet
0df21b388a [llvm-config] Teach llvm-config about global-isel.
llvm-config can know tell whether or not a build has been configured to support
global-isel.
Use '--has-global-isel' for that.

llvm-svn: 262877
2016-03-08 00:02:50 +00:00
Teresa Johnson
e5e9e689da Fix bot failure from r262721: unintented change in gold-plugin save-temps
The split code gen task ID should not be appended to save-temps output
file when the parallelism factor is 1 (not actually splitting).

llvm-svn: 262731
2016-03-04 18:16:00 +00:00
Teresa Johnson
215f45b06e [ThinLTO] Ensure prevailing linkonce emitted as weak in ThinLTO backends
Summary:
Since IR files are all compiled into separate independent object files
in ThinLTO mode, the prevailing linkonce symbols must be emitted in its
object file even if it is no longer referenced there, e.g. if no
references remain in the module after inlining, since it may be
referenced by another ThinLTO compiled object file. This is done by
changing LDPR_PREVAILING_DEF_IRONLY* symbols to LDPR_PREVAILING_DEF,
which converts the prevailing linkonce to weak. We also don't need the
other prevailing IRONLY handling for internalization, which is not
currently performed for ThinLTO.

Test case included.

Reviewers: davidxl, rafael

Subscribers: rafael, joker.eph, llvm-commits

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

llvm-svn: 262727
2016-03-04 17:48:35 +00:00
Teresa Johnson
b00a3e6034 [ThinLTO] Launch importing backends in parallel threads from gold plugin
Summary:
Launch ThinLTO backends (LTO and codegen pipelines with importing) in
parallel using a ThreadPool, after creating the combined index.
The number of threads is controlled by the existing -jobs gold plugin
option, or the hardware concurrency if not specified.

The old behavior of exiting after creating the combined index can be
invoked via a new thinlto-index-only plugin option.

This commit involves just the ThinLTO-specific pieces of D15390, the NFC
and other restructuring pieces were committed independently:
  r262677: Add hardware_concurrency interface to llvm::thread (NFC)
  r262719: Change split code gen to use ThreadPool
  r262721: Refactor gold-plugin codegen to prepare for ThinLTO threads (NFC)

Reviewers: pcc, joker.eph, rafael

Subscribers: rafael, davidxl, llvm-commits, joker.eph

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

llvm-svn: 262724
2016-03-04 17:06:02 +00:00
Teresa Johnson
e2461d628d Refactor gold-plugin codegen to prepare for ThinLTO threads (NFC)
This is the NFC part remaining from D15390, which refactors the
current codegen() into a CodeGen class with various modular methods and
other helper functions that will be used by the follow-on ThinLTO piece.

llvm-svn: 262721
2016-03-04 16:36:06 +00:00
Evgeniy Stepanov
f31dabc41a [gold] Handle modules that are not included in the link.
Gold has a newly added LDPT_GET_SYMBOLS_V3 callback that can
distinguish between a module that is not included in the link, and
one that is included but has its entire interface preempted by others.

Fixes PR26674.

llvm-svn: 262676
2016-03-04 00:23:29 +00:00
Davide Italiano
e8429473ce [llvm-nm] Restore the previous behaviour (pre r262525).
It broke some buildbots.

Pointy-hat to:  me

llvm-svn: 262529
2016-03-02 22:33:49 +00:00
Davide Italiano
4061365808 [llvm-nm] Fix rendering of -s grouping with all the othe options.
llvm-svn: 262525
2016-03-02 21:59:31 +00:00
David Blaikie
8ddd12bfcb llvm-dwp: Add missing copyright notice to llvm-dwp.cpp
Addressing feedback on IRC by Sean Silva.

llvm-svn: 262416
2016-03-01 22:29:00 +00:00
Tim Northover
352af6b0a6 Fix typo. NFC.
llvm-svn: 262405
2016-03-01 21:45:22 +00:00
David Blaikie
a94ed2af53 Revert "llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied"
Accidentally committed.

This reverts commit r262389.

llvm-svn: 262395
2016-03-01 21:24:04 +00:00
Jacques Pienaar
ea54ef2b77 [lanai] Add ELF enum value and relocations.
Add ELF enum value and relocations for Lanai backed.

General Lanai backend discussion on llvm-dev thread "[RFC] Lanai backend" (http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html).

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

llvm-svn: 262394
2016-03-01 21:21:42 +00:00
David Blaikie
8944f0ab75 llvm-dwp: Keep ObjectFiles alive until object emission their contents can be referenced directly rather than copied
llvm-svn: 262389
2016-03-01 20:40:02 +00:00
Rafael Espindola
12fd371a27 Move ObjectYAML code to a new library.
It is only ever used by obj2yaml and yaml2obj. No point in linking it
everywhere.

llvm-svn: 262368
2016-03-01 19:15:06 +00:00
Petr Pavlu
324853823b [LTO] Fix error reporting from lto_module_create_in_local_context()
Function lto_module_create_in_local_context() would previously
rely on the default LLVMContext being created for it by
LTOModule::makeLTOModule(). This context exits the program on
error and is not arranged to update sLastStringError in
tools/lto/lto.cpp.

Function lto_module_create_in_local_context() now creates an
LLVMContext by itself, sets it up correctly to its needs and then
passes it to LTOModule::createInLocalContext() which takes
ownership of the context and keeps it present for the lifetime of
the returned LTOModule.

Function LTOModule::makeLTOModule() is modified to take a
reference to LLVMContext (instead of a pointer) and no longer
creates a default context when nullptr is passed to it. Method
LTOModule::createInContext() that takes a pointer to LLVMContext
is removed because it allows to pass a nullptr to it. Instead
LTOModule::createFromBuffer() (that takes a reference to
LLVMContext) should be used.

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

llvm-svn: 262330
2016-03-01 13:13:49 +00:00
Mike Aizatsky
82adfc84dc [sancov] print_coverage_points command.
Differential Revision: http://reviews.llvm.org/D17670

llvm-svn: 262104
2016-02-27 02:21:44 +00:00
Chris Bieneman
958c8b1938 [CMake] Add the gold plugin before clang
This is needed to connect dependencies between the LLVMgold plugin and the clang stage-2 builds due to limitations in ExternalProject_Add.

Patch by Mike Edwards

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

llvm-svn: 262067
2016-02-26 21:07:04 +00:00
Chris Bieneman
a8b39698e1 [CMake] Assigning the LTO component to lto.h
This makes it so lto.h is installed when you run the install-LTO target.

llvm-svn: 262066
2016-02-26 21:07:02 +00:00
David Blaikie
f8f826e596 llvm-dwp: provide diagnostics for duplicate DWO IDs
These diagnostics aren't perfect - in the case of merging several dwos
into dwps and those dwps into more dwps - just getting the message about
the original source file name might not be much help (since it's the
same in both dwos, by definition - but doesn't tell you which chain of
dwps to backtrack)

It might be worth adding the DW_AT_dwo_id to the split debug info to
improve the diagnostic experience - might help track down the duplicates
better.

llvm-svn: 261988
2016-02-26 07:30:15 +00:00
David Blaikie
97ae473a6b llvm-dwp: Support empty .dwo files
Though a bit odd, this is handy for a few reasons - for example, in a
build system that wants consistent input/output of build steps, but
where split-dwarf might be overriden/disabled by the user on a per-file
basis.

llvm-svn: 261987
2016-02-26 07:04:58 +00:00
Hemant Kulkarni
4d7cb7c1de Reverts change r261907 and r261918
llvm-svn: 261927
2016-02-25 20:47:07 +00:00
Hemant Kulkarni
afbfbdc65e Fix endianness issue on BE machines introduced by r261907
llvm-svn: 261918
2016-02-25 18:56:01 +00:00
Hemant Kulkarni
616aef8e81 [llvm-readobj] Enable GNU style sections and relocations printing
http://reviews.llvm.org/D17523

llvm-svn: 261907
2016-02-25 18:02:00 +00:00
Justin Bogner
5af532d89d PM: Implement a basic loop pass manager
This creates the new-style LoopPassManager and wires it up with dummy
and print passes.

This version doesn't support modifying the loop nest at all. It will
be far easier to discuss and evaluate the approaches to that with this
in place so that the boilerplate is out of the way.

llvm-svn: 261831
2016-02-25 07:23:08 +00:00
Benjamin Kramer
e5027dce2c Fix some abuse of auto flagged by clang's -Wrange-loop-analysis.
llvm-svn: 261524
2016-02-22 13:11:58 +00:00
Mike Aizatsky
8f10205d60 fixing msvc warning.
llvm-svn: 261396
2016-02-20 02:11:49 +00:00
Mike Aizatsky
f30fabc50f [sancov] sanitizer html report cosmetic improvements.
llvm-svn: 261375
2016-02-19 22:55:08 +00:00
David Blaikie
72e1a1e989 llvm-dwp: Improve performance (N^2 to amortized N) by using a MapVector instead of linear searches through a vector
Figured this would be a problem, but didn't want to jump the gun - large
inputs demonstrate it pretty easily (mostly for type units, but might as
well do the same for CUs too). A random sample 6m27s -> 27s change.

Also, by checking this up-front for CUs (rather than when building the
cu_index) we can probably provide better error messages (see FIXMEs),
hopefully providing the name of the CUs rather than just their
signature.

llvm-svn: 261364
2016-02-19 21:09:26 +00:00
Davide Italiano
e602b998c3 [llvm-nm] In C++, main implicitly returns 0. Pointed out by David Blaikie.
llvm-svn: 261300
2016-02-19 02:22:54 +00:00
David Blaikie
0051e7eb36 llvm-dwp: Don't test compression when zlib isn't available
llvm-svn: 261298
2016-02-19 02:03:45 +00:00
David Blaikie
f4edf4b3fe llvm-dwp: Support compressed input
llvm-svn: 261296
2016-02-19 01:51:44 +00:00
Mike Aizatsky
55ae935db1 [sancov] widening default blacklist.
Differential Revision: http://reviews.llvm.org/D17426

llvm-svn: 261291
2016-02-19 01:03:12 +00:00
Mike Aizatsky
829540509b [sancov] Adding covered/uncovered tables to coverage report.
Summary:
This change adds 3 tables to html report:
- list of covered files with number of functions covered.
- list of not covered files
- list of not covered functions.

I tried to put most coverage-calculating functionality into
SourceCoverageData.

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

llvm-svn: 261287
2016-02-19 00:26:20 +00:00
Richard Trieu
5a759985de Remove uses of builtin comma operator.
Cleanup for upcoming Clang warning -Wcomma.  No functionality change intended.

llvm-svn: 261270
2016-02-18 22:09:30 +00:00
Amaury Sechet
c379e9149e Add support for invoke/landingpad/resume in C API test
Summary: As per title. There was a lot of part missing in the C API, so I had to extend the invoke and landingpad API.

Reviewers: echristo, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 261254
2016-02-18 20:38:32 +00:00
Benjamin Kramer
fc32ace133 Add parentheses around arithmetic in operand of '|'.
This avoids a operator precedence warning for mixing + and | in an
expression. I checked that this matches the definition in the Split
DWARF proposal.

Patch by Cong Liu!

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

llvm-svn: 261207
2016-02-18 13:23:17 +00:00
Chandler Carruth
a482d2bc0a [PM/AA] Teach the new pass manager to use pass-by-lambda for registering
analysis passes, support pre-registering analyses, and use that to
implement parsing and pre-registering a custom alias analysis pipeline.

With this its possible to configure the particular alias analysis
pipeline used by the AAManager from the commandline of opt. I've updated
the test to show this effectively in use to build a pipeline including
basic-aa as part of it.

My big question for reviewers are around the APIs that are used to
expose this functionality. Are folks happy with pass-by-lambda to do
pass registration? Are folks happy with pre-registering analyses as
a way to inject customized instances of an analysis while still using
the registry for the general case?

Other thoughts of course welcome. The next round of patches will be to
add the rest of the alias analyses into the new pass manager and wire
them up here so that they can be used from opt. This will require
extending the (somewhate limited) functionality of AAManager w.r.t.
module passes.

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

llvm-svn: 261197
2016-02-18 09:45:17 +00:00
Amaury Sechet
ad1d571d7e Add upport for bitcast in the C API echo test
llvm-svn: 261177
2016-02-17 23:55:59 +00:00
Amaury Sechet
71fa6fafdf Add support for memory operations (load/store/gep) in C API echo test
Summary: As per title.

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 261174
2016-02-17 22:51:03 +00:00
Michael J. Spencer
0b378f1883 [readobj] Remove uneeded braces in case statement.
llvm-svn: 261170
2016-02-17 22:30:41 +00:00
Amaury Sechet
8b6995ad86 Make sure functions are generated even there is no global in the C API echo test
llvm-svn: 261169
2016-02-17 22:30:05 +00:00
Amaury Sechet
3d8d25176e Add support for global variables in the C API echo test
Summary: As per title

Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker

Subscribers: llvm-commits

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

llvm-svn: 261164
2016-02-17 22:13:33 +00:00
Easwaran Raman
e7d97265e1 Add a profile summary class specific to instrumentation profiles.
Modify ProfileSummary class to make it not instrumented profile specific.
Add a new InstrumentedProfileSummary class that inherits from ProfileSummary.

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

llvm-svn: 261119
2016-02-17 18:18:47 +00:00
Rafael Espindola
b74768f2e2 Represent the dynamic table itself with a DynRegionInfo.
The dynamic table is also an array of a fixed structure, so it can be
represented with a DynReginoInfo.

No major functionality change. The extra error checking is covered by
existing tests with a broken dynamic program header.

Idea extracted from r260488. I did the extra cleanups.

llvm-svn: 261107
2016-02-17 16:48:00 +00:00
Rafael Espindola
d1106791d2 Add a unwrapOrError utility and use it to simplify ELFDumper.cpp.
Utility extracted from r260488.

llvm-svn: 261103
2016-02-17 16:21:49 +00:00