1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

124697 Commits

Author SHA1 Message Date
David Majnemer
56dee65385 Move EH-specific helper functions to a more appropriate place
No functionality change is intended.

llvm-svn: 254562
2015-12-02 23:06:39 +00:00
Alexey Samsonov
d710e416b4 Fixup for r254547: use format_hex() to simplify code.
llvm-svn: 254560
2015-12-02 22:59:22 +00:00
Rafael Espindola
f645fe92d8 Switch the linker to having a whitelist of GVs.
This replaces DoNotLinkFromSource with ValuesToLink. It also moves the
computation of ValuesToLink earlier.

It is a bit simpler and an important step in slitting the linker into an
ir mover and a linker proper.

The test change is because we now avoid creating dead declarations.

llvm-svn: 254559
2015-12-02 22:59:04 +00:00
Mike Aizatsky
2444b7e49b Libfuzzer: do not pass null into user function
Differential Revision: http://reviews.llvm.org/D15098

llvm-svn: 254558
2015-12-02 22:43:53 +00:00
Reid Kleckner
2dbef3216c Use std::string instead of strdup() and free() in WinCodeViewLineTables
llvm-svn: 254557
2015-12-02 22:34:30 +00:00
Rafael Espindola
c0e7cab0ab Delete what is now duplicated code.
Having to import an alias as declaration is not thinlto specific.

The test difference are because when we already have a decl and we are
not importing it, we just leave the decl alone.

llvm-svn: 254556
2015-12-02 22:22:24 +00:00
David Blaikie
e5f9d70f7f [llvm-dwp] Include only the non-empty columns in the cu_index
llvm-svn: 254555
2015-12-02 22:01:56 +00:00
Xinliang David Li
1377f309a0 [PGO] Allow input value node list to be null
This is to handle the case when vp node linked
list array is laziliy initialized at runtime 

llvm-svn: 254551
2015-12-02 21:47:43 +00:00
Cong Hou
ae07b50dd6 Fix a typo in LoopVectorize.cpp. NFC.
llvm-svn: 254549
2015-12-02 21:33:47 +00:00
Alexey Samsonov
ddcffafd2c [PowerPC] Remove wild call to RegScavenger::initRegState().
This call should in fact be made by RegScavenger::enterBasicBlock()
called below. The first call does nothing except for triggering UB,
indicated by UBSan (passing nullptr to memset()).

llvm-svn: 254548
2015-12-02 21:25:28 +00:00
Alexey Samsonov
a1efd00741 [Hexagon] Remove std::hex in favor of format().
std::hex is not used anywhere in LLVM code base except for this place,
and it has a known undefined behavior (at least in libstdc++ 4.9.3):
https://llvm.org/bugs/show_bug.cgi?id=18156, which fires in UBSan
bootstrap of LLVM.

llvm-svn: 254547
2015-12-02 21:13:43 +00:00
Kyle Butt
33b91653ae Tests: PPC: remove unnecessary metadata. NFC
Remove unnecessary metadata from a test case.

llvm-svn: 254544
2015-12-02 21:08:03 +00:00
Rafael Espindola
371e07845e Also copy private linkage globals when needed.
This was an omission when handling COFF style comdats with local keys.
Should fix the sanitizer-windows bot.

llvm-svn: 254543
2015-12-02 20:57:33 +00:00
Alexey Samsonov
60b8a45ea6 Re-enable UBSan tests for SystemZ: PR20980 was fixed.
llvm-svn: 254542
2015-12-02 20:46:51 +00:00
Rafael Espindola
5354070607 Don't copy information from aliasee to alias.
They are independent.

llvm-svn: 254541
2015-12-02 20:03:17 +00:00
Tom Stellard
e243a08968 AMDGPU/SI: Correctly emit agent global segment variables when targeting HSA
Differential Revision: http://reviews.llvm.org/D14508

llvm-svn: 254540
2015-12-02 19:47:57 +00:00
Krzysztof Parzyszek
105a968619 [Hexagon] Remove TFRI_V4 instruction, use existing A2_tfrsi instead
llvm-svn: 254539
2015-12-02 19:44:35 +00:00
Rafael Espindola
e3433ec69d Fix linking when we copy over only a decl.
We were failing to copy the fact that the GV is weak and in the case of
an alias, producing invalid IR.

llvm-svn: 254538
2015-12-02 19:30:52 +00:00
Kyle Butt
4f2d0356a1 [CodeGen]: Fix bad interaction with AntiDep breaking and inline asm.
AggressiveAntiDepBreaker was renaming registers specified by the user
for inline assembly. While this will work for compiler-specified
registers, it won't work for user-specified registers, and at the time
this runs, I don't currently see a way to distinguish them.

llvm-svn: 254532
2015-12-02 18:58:51 +00:00
Kyle Butt
6c6e301927 Test Commit: iteratee
Remove whitespace from blank lines. NFC

llvm-svn: 254531
2015-12-02 18:53:33 +00:00
Fiona Glaser
d1cd52a9e3 Fix accidental off by one change
Didn't break any tests, but did unnecessary extra work.

llvm-svn: 254529
2015-12-02 18:46:23 +00:00
Tom Stellard
b7c1ca3252 AMDGPU: Fix msan test failure
llvm-svn: 254527
2015-12-02 18:35:23 +00:00
Fiona Glaser
9540086d5a Scheduler / Regalloc: use unique_ptr[] instead of std::vector
vector.resize() is significantly slower than memset in many STLs
and the cost of initializing these vectors is significant on targets
with many registers. Since we don't need the overhead of a vector,
use a simple unique_ptr instead.

llvm-svn: 254526
2015-12-02 18:32:59 +00:00
Nathan Slingerland
625b1f4b92 [llvm-profdata] Change instr prof counter overflow to saturate rather than discard
Summary: This changes overflow handling during instrumentation profile merge. Rathar than throwing away records that would result in counter overflow, merged counts are instead clamped to the maximum representable value. A warning about counter overflow is still surfaced to the user as before.

Reviewers: dnovillo, davidxl, silvas

Subscribers: llvm-commits

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

llvm-svn: 254525
2015-12-02 18:19:24 +00:00
Tim Northover
a44eae5e57 AArch64: use ldxp/stxp pair to implement 128-bit atomic loads.
The ARM ARM is clear that 128-bit loads are only guaranteed to have been atomic
if there has been a corresponding successful stxp. It's less clear for AArch32, so
I'm leaving that alone for now.

llvm-svn: 254524
2015-12-02 18:12:57 +00:00
Dan Gohman
b162c0b860 [WebAssembly] Fix comments to say "LIFO" instead of "FIFO" when describing a stack.
llvm-svn: 254523
2015-12-02 18:08:49 +00:00
Tom Stellard
1499ba11d7 AMDGPU/SI: Don't emit group segment global variables
Summary: Only global or readonly segment variables should appear in object files.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 254519
2015-12-02 17:00:42 +00:00
David Majnemer
df4ee5c023 Do (A == C1 || A == C2) -> (A & ~(C1 ^ C2)) == C1 rather than (A == C1 || A == C2) -> (A | (C1 ^ C2)) == C2 when C1 ^ C2 is a power of 2.
Differential Revision: http://reviews.llvm.org/D14223

Patch by Amaury SECHET!

llvm-svn: 254518
2015-12-02 16:15:07 +00:00
Rafael Espindola
77a66c07ef Add an interesting case we already get right.
llvm-svn: 254514
2015-12-02 15:02:43 +00:00
Andy Gibbs
cf3b9350a7 Rollback r254508 and r254511 to fix buildbots
llvm-svn: 254513
2015-12-02 14:36:48 +00:00
Michael Zuckerman
31d7393ecf By intel spec
|9B DD /7| FSTSW m2byte| Valid Valid Store FPU status word at m2byteafter checking for pending unmasked floating-point exceptions.|
|9B DF E0| FSTSW AX| Valid Valid Store FPU status word in AX register after checking for pending unmasked floating-point exceptions.|
|DD /7 |FNSTSW *m2byte| Valid Valid Store FPU status word at m2bytewithout checking for pending unmasked floating-point exceptions.|
|DF E0 |FNSTSW *AX| Valid Valid Store FPU status word in AX register without checking for pending unmasked floating-point exceptions|

m2byte is word register, and therefor instruction operand need to be change from f32mem to i16mem.

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

llvm-svn: 254512
2015-12-02 14:34:34 +00:00
Andy Gibbs
f2eef0b5af Fix buildbots broken by r254508
g++ 4.7 does not allow an inline defaulted virtual destructor to be overridden,
giving the error "looser throw specifier for ... overridding ~SCEVPredicate()
noexcept (true)" (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613).

The work-around given in the bug report above has been utilised here.

llvm-svn: 254511
2015-12-02 14:22:18 +00:00
Andy Gibbs
302a46438a Fix class SCEVPredicate has virtual functions and accessible non-virtual destructor
llvm-svn: 254508
2015-12-02 13:41:24 +00:00
Christof Douma
b1205456e7 [AArch64]: Add support for Cortex-A35
Adds support for the new Cortex-A35 ARMv8-A core.

llvm-svn: 254503
2015-12-02 11:53:44 +00:00
Nemanja Ivanovic
1662faa6c9 Patch to fix a crash in the PowerPC back end due to ISD::ROTL and ISD::ROTR
not being expanded. Test case included.

llvm-svn: 254501
2015-12-02 10:36:24 +00:00
Hrvoje Varga
d71292b411 [mips][microMIPS] Implement PREPEND, RADDU.W.QB, RDDSP, REPL.PH, REPL.QB, REPLV.PH, REPLV.QB and MTHLIP instructions
Differential Revision: http://reviews.llvm.org/D14527

llvm-svn: 254496
2015-12-02 09:31:24 +00:00
Simon Pilgrim
2bce37605d [X86][FMA] Optimize FNEG(FMUL) Patterns
On FMA targets, we can avoid having to load a constant to negate a float/double multiply by instead using a FNMSUB (-(X*Y)-0)

Fix for PR24366

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

llvm-svn: 254495
2015-12-02 09:07:55 +00:00
Elena Demikhovsky
32e8d60483 AVX-512: Updated cost of FP/SINT/UINT conversion operations
I checked and updated the cost of AVX-512 conversion operations. Added cost of conversion operations in DQ mode.
Conversion of illegal types that requires vector split is not calculated right now (like for other X86 targets).

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

llvm-svn: 254494
2015-12-02 08:59:47 +00:00
Asaf Badouh
d6d08d5567 [X86][AVX512] add comi with Sae
add builtin_ia32_vcomisd and builtin_ia32_vcomisd

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

llvm-svn: 254493
2015-12-02 08:17:51 +00:00
David Blaikie
566497d4a9 [llvm-dwp] Don't rely on implicit move assignment operator (MSVC won't synthesize one)
llvm-svn: 254492
2015-12-02 07:09:26 +00:00
Akira Hatanaka
a676a66323 [AttributeSet] Overload AttributeSet::addAttribute to reduce compile
time.

The new overloaded function is used when an attribute is added to a
large number of slots of an AttributeSet (for example, to function
parameters). This is much faster than calling AttributeSet::addAttribute
once per slot, because AttributeSet::getImpl (which calls
FoldingSet::FIndNodeOrInsertPos) is called only once per function
instead of once per slot.

With this commit, clang compiles a file which used to take over 22
minutes in just 13 seconds.

rdar://problem/23581000

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

llvm-svn: 254491
2015-12-02 06:58:49 +00:00
Craig Topper
1e6d9c9b53 [X86] Change getZeroVector to take an MVT instead of EVT. One minor change needed to only try to perform 256-it shuffle combines on legal vector types.
llvm-svn: 254490
2015-12-02 06:39:19 +00:00
David Blaikie
3719678673 [llvm-dwp] Emit a rather fictional debug_cu_index
This is very rudimentary support for debug_cu_index, but it is enough to
allow llvm-dwarfdump to find the offsets for  contributions and
correctly dump debug_info.

It will need to actually find the real signature of the unit and build
the real hash table with the right number of buckets, as per the DWP
specification.

It will also need to be expanded to cover the tu_index as well.

llvm-svn: 254489
2015-12-02 06:21:34 +00:00
David Blaikie
4fd6a24d41 DebugInfo\DWARF: Privatize some accidentally public members
llvm-svn: 254488
2015-12-02 06:21:28 +00:00
Craig Topper
c5149a5512 [X86] Fix weird identation. NFC
llvm-svn: 254487
2015-12-02 05:24:38 +00:00
Mehdi Amini
34766825ef Change ModuleLinker to take a set of GlobalValues to import instead of a single one
For efficiency reason, when importing multiple functions for the same Module,
we can avoid reparsing it every time.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 254486
2015-12-02 04:34:28 +00:00
Kostya Serebryany
6b2a558b5e [libFuzzer] add a test that is built with -fsanitize-coverage=trace-bb
llvm-svn: 254484
2015-12-02 02:49:37 +00:00
Kostya Serebryany
766da3696b [sanitizer coverage] when adding a bb trace instrumentation, do it instead, not in addition to, regular coverage. Do the regular coverage in the run-time instead
llvm-svn: 254482
2015-12-02 02:37:13 +00:00
Quentin Colombet
1b3962eada [X86] Fix a think-o when checking if the eflags needs to be preserved.
llvm-svn: 254480
2015-12-02 02:07:00 +00:00
Mehdi Amini
1909ee53b2 Modify FunctionImport to take a callback to load modules
When linking static archive, there is no individual module files to
load. Instead they can be mmap'ed and could be initialized from a
buffer directly. The callback provide flexibility to override the
scheme for loading module from the summary.

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

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 254479
2015-12-02 02:00:29 +00:00