1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 05:52:53 +02:00
Commit Graph

131499 Commits

Author SHA1 Message Date
Ahmed Bougacha
7cc9ba7677 [CodeGen] Round [SU]INT_TO_FP result when promoting from f16.
If we don't, values that aren't precisely representable in f16 could
be used as-is in a promoted f32 operation, which would produce
incorrect results.

AArch64 had the correct behavior; add a focused test.

Fixes http://llvm.org/PR26871

llvm-svn: 268700
2016-05-06 00:58:00 +00:00
Rui Ueyama
6fe9b6d987 Make StringTableBuilder to cache hash values.
This change seems to speed up LLD a bit if it has a lot of mergeable
sections. The number is below. It's not too bad for a small patch.

Time to link Clang (debug build):

w/o patch 6.3696 seconds
w/patch   6.2746 seconds (-1.5%)

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

llvm-svn: 268698
2016-05-06 00:51:58 +00:00
Justin Bogner
73572b8846 Object: Fix two -Wpessimizing-move warnings after r268694
llvm-svn: 268697
2016-05-05 23:59:57 +00:00
Kevin Enderby
6730b4fb8f Fix window bots failures due to r268694 - Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .
llvm-svn: 268696
2016-05-05 23:55:27 +00:00
Adam Nemet
ad3ada3a8b [LAA] Fix confusing debug message
This message used to be correct, when all we cared about was whether the
dependence was safe (i.e. NoDep) or unsafe.  With the current more
precise characterization, this is a forward dep.

llvm-svn: 268695
2016-05-05 23:41:28 +00:00
Kevin Enderby
6660872bd5 Cleanup and refactor of malformedError() in lib/Object/MachOObjectFile.cpp .
No functional change.

llvm-svn: 268694
2016-05-05 23:41:05 +00:00
Justin Bogner
9448d374ee SDAG: Rename Select->SelectImpl and repurpose Select as returning void
This is a step towards removing the rampant undefined behaviour in
SelectionDAG, which is a part of llvm.org/PR26808.

We rename SelectionDAGISel::Select to SelectImpl and update targets to
match, and then change Select to return void and consolidate the
sketchy behaviour we're trying to get away from there.

Next, we'll update backends to implement `void Select(...)` instead of
SelectImpl and eventually drop the base Select implementation.

llvm-svn: 268693
2016-05-05 23:19:08 +00:00
Justin Bogner
b513fa54c6 SDAG: Remove OPC_MarkGlueResults and associated logic. NFC
This opcode never happens in practice, and yet the logic we have in
place to handle it would be undefined behaviour if we ever executed
it. Remove it rather than trying to refactor code that's never
reached.

llvm-svn: 268692
2016-05-05 22:37:45 +00:00
Krzysztof Parzyszek
c935f59419 [scan-build] fix warnings emitted on LLVM Hexagon code base
Patch by Apelete Seketeli.

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

llvm-svn: 268691
2016-05-05 22:00:44 +00:00
Krzysztof Parzyszek
03ea811655 [Hexagon] Fix the offset ranges for vector memory instructions
llvm-svn: 268690
2016-05-05 21:58:02 +00:00
Eugene Zelenko
8694825d8f Fix some Clang-tidy readability-simplify-boolean-expr and Include What You Use warnings.
Differential revision: reviews.llvm.org/D19946

llvm-svn: 268689
2016-05-05 21:35:47 +00:00
Xinliang David Li
b6de0a1327 [PM] port Branch Frequency Analaysis pass to new PM
llvm-svn: 268687
2016-05-05 21:13:27 +00:00
Davide Italiano
2a09d276d1 [PM] Port Interprocedural SCCP to the new pass manager.
llvm-svn: 268684
2016-05-05 21:05:36 +00:00
Reid Kleckner
3a46ce7290 [codeview] Improve some comments
This FIXME was already fixed, and these LF_* enum names were
inconsistent.

llvm-svn: 268683
2016-05-05 20:58:46 +00:00
Chad Rosier
2778b687b1 [AArch64] Remove unused MBP headers/dependency. NFC.
llvm-svn: 268682
2016-05-05 20:58:38 +00:00
Dehao Chen
36f535897c Revert http://reviews.llvm.org/D19926 as it breaks tests.
llvm-svn: 268681
2016-05-05 20:47:53 +00:00
Mehdi Amini
43c1bc8bd7 Revert "LTOCodeGenerator: handle correctly "unnamed" symbol"
This reverts commit r268658.

I incorrectly diagnose this as the source of an assertion during an
LTO bootstrap of clang.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268680
2016-05-05 20:44:21 +00:00
Dan Gohman
04b0e0d2b7 [WebAssembly] Don't emit epilogue code in the middle of stackified code.
llvm-svn: 268679
2016-05-05 20:41:15 +00:00
Reid Kleckner
3ca599e96e Fix CVTypeDumperImpl formatting after class rename
llvm-svn: 268678
2016-05-05 20:31:16 +00:00
Reid Kleckner
ed68748360 Remove unnecessary anonymous namespace from a header
llvm-svn: 268677
2016-05-05 20:30:48 +00:00
Matt Arsenault
cebbd339ae AMDGPU: Simplify control flow / conditions
llvm-svn: 268676
2016-05-05 20:27:02 +00:00
Dehao Chen
b2c37a8506 Simplify CFG before assigning discriminator.
Summary: We need to clean up CFG before assigning discriminator to minimize the impact of optimization on debug info.

Reviewers: davidxl, dblaikie, dnovillo

Subscribers: dnovillo, danielcdh, llvm-commits

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

llvm-svn: 268675
2016-05-05 20:18:49 +00:00
Marcin Koscielnicki
9a256c4df5 [MSan] [MIPS64] Fix vararg helper for >1 fixed argument.
This fixes http://llvm.org/PR27646 on Mips64.

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

llvm-svn: 268673
2016-05-05 20:13:17 +00:00
Matt Arsenault
11d5c00a30 AMDGPU: Run r600 tests last
llvm-svn: 268672
2016-05-05 20:07:37 +00:00
Mehdi Amini
193aba341e Degrade assertions to a warning in LTOCodeGenerator for preserved linkonce
The assertions were assuming that the linker will not ask to preserve
a global that is internal or available_externally, as it does not
really make sense. In practice this break the bootstrap of clang,
I degrade to a warning for now.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268671
2016-05-05 20:05:33 +00:00
Chris Bieneman
64aa95c1c8 Remove LLVM_ENABLE_TIMESTAMPS
Summary:
As per the discussion on LLVM-dev this patch proposes removing LLVM_ENABLE_TIMESTAMPS.

The only complicated bit of this patch is the Windows support. On windows we used to log an error if /INCREMENTAL was passed to the linker when timestamps were disabled.

With this change since timestamps in code are always disabled we will always compile on windows with /Brepro unless /INCREMENTAL is specified, and we will log a warning when /INCREMENTAL is specified to notify the user that the build will be non-deterministic.

See: http://lists.llvm.org/pipermail/llvm-dev/2016-May/098990.html

Reviewers: bogner, silvas, rnk

Subscribers: llvm-commits

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

llvm-svn: 268670
2016-05-05 19:57:03 +00:00
Sean Silva
69d6307407 Add a note about the "entry count" used the profile summary
Thanks to David Li for the clarification.

llvm-svn: 268669
2016-05-05 19:54:13 +00:00
Xinliang David Li
72db6f72e8 [profile] Remove unneeded field in raw profile reader
Differential Revision: http://reviews.llvm.org/D19956

llvm-svn: 268667
2016-05-05 19:41:18 +00:00
NAKAMURA Takumi
25dc6f95a1 Touch Hexagon/CMakeLists.txt to regenerate build files, since r268641 complains of missing HexagonAlias.td on ninja.
FIXME: TableGen.cmake globs *.td(s) with wildcards for deps. It is not good.
llvm-svn: 268666
2016-05-05 19:28:01 +00:00
Tim Northover
5f7a3665f1 ARM: don't attempt to merge litpools referencing different PC-anchors.
Given something like:

    ldr r0, .LCPI0_0 (== pc-rel var)
    add r0, pc

    ldr r1, .LCPI0_1 (== pc-rel var)
    add r1, pc

we cannot combine the 2 ldr instructions and litpools because they get added to
a different pc to form the correct address. I think the original logic came
from a time when we fused the LDRpci/PICADD instructions into one
pseudo-instruction so the PC was always immediately at-hand. That's no longer
the case.

Should fix general-dynamic TLS access on Linux, and quite possibly other -fPIC
code that relies on litpools (e.g. v6m and -Oz compilations) though trivial
tweaks of the .ll test didn't provoke anything.

llvm-svn: 268662
2016-05-05 18:38:53 +00:00
Krzysztof Parzyszek
4622dac468 [Hexagon] Add aliases for vector loads/stores with no explicit offset
The mem(r0) instructions are treated as mem(r0+#0).

llvm-svn: 268661
2016-05-05 18:38:35 +00:00
Vitaly Buka
a10eb05536 Revert "[ThinLTO] Emit individual index files for distributed backends"
MemorySanitizer: use-of-uninitialized-value in lib/Bitcode/Writer/BitcodeWriter.cpp:364:70
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/12544/steps/check-llvm%20msan/logs/stdio

This reverts commit 0c4a898ea550699d1b2f4fe3767251c8f9a48d52.

llvm-svn: 268660
2016-05-05 18:31:00 +00:00
Mehdi Amini
bcc2b51dd7 LTOCodeGenerator: handle correctly "unnamed" symbol
This should fix the assertions in a clang LTO bootstrap we're seeing.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268658
2016-05-05 18:14:55 +00:00
Matthias Braun
45444fa103 MachineFunction: Add a const modifier to print() parameter
llvm-svn: 268657
2016-05-05 18:14:43 +00:00
Kostya Serebryany
ff92cc291d [libFuzzer] better docs for coverage
llvm-svn: 268656
2016-05-05 18:07:09 +00:00
Chad Rosier
465668b8c0 Remove dead include. NFC.
llvm-svn: 268655
2016-05-05 17:55:51 +00:00
Chad Rosier
848b11daee Remove dead include. NFC.
llvm-svn: 268654
2016-05-05 17:53:43 +00:00
Kevin Enderby
8be76b0f42 Clean up the specific error message for a malformed Mach-O files with bad segment
load commands.

The existing test case in test/Object/macho-invalid.test for
macho-invalid-too-small-segment-load-command has a cmdsize of 55, while
being too small also it is not a multiple of 4.  So when that check is added
this test case will produce a different error. So I constructed a new test case
that will trigger the intended error.

I also changed the error message to be consistent with the other malformed Mach-O
file error messages which prints the load command index.  I also removed both
object_error::macho_load_segment_too_small and
object_error::macho_load_segment_too_many_sections from Object/Error.h
as they are not needed and can just use object_error::parse_failed and let the
error message string distinguish the specific error.

llvm-svn: 268652
2016-05-05 17:43:35 +00:00
Chad Rosier
5695ddaafe [ValueTracking] Early exit when further analysis won't be fruitful.
This should have NFC in the context of codegen, but may have positive
implications on compile-time.

llvm-svn: 268651
2016-05-05 17:41:19 +00:00
Nicolai Haehnle
854cd758f6 AMDGPU: Uniform branch conditions can originate with intrinsics
Summary:
Discovered by Dave Airlie, fixes an assertion in Khronos OpenGL CTS
GL43-CTS.shader_storage_buffer_object.advanced-matrix.

In this particular case, the buffer load intrinsic fed into a uniform
conditional branch, and led the brcond lowering down the wrong path.

Reviewers: tstellarAMD, arsenm

Subscribers: arsenm, llvm-commits

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

llvm-svn: 268650
2016-05-05 17:36:36 +00:00
Tom Stellard
0d89e9527b AMDGPU/SI: Add support for AMD code object version 2.
Summary:
Version 2 is now the default.  If you want to emit version 1, use
the amdgcn--amdhsa-amdcov1 triple.

Reviewers: arsenm, kzhuravl

Subscribers: arsenm, llvm-commits

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

llvm-svn: 268647
2016-05-05 17:03:33 +00:00
Hans Wennborg
4b2eddacf6 X86CallFrameOptimization: make adjustCallSequence's return type void
It always returned the same value (true). No functionality change.

llvm-svn: 268645
2016-05-05 16:39:31 +00:00
Mehdi Amini
20ecbd5c1c llvm-lto: add a -thinlto-module-id that enables to force the Module identifier.
ThinLTO is using the Module Identifier to find the corresponding entry
in the index. However when reproducing part of the flow from temporary
files generated from the linker, you'd like to process a file and
force llvm-lto to use another module identifier than the current
filename. The alternative would be to tweak the index, which would be
more involved.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268643
2016-05-05 16:33:51 +00:00
Krzysztof Parzyszek
7943b9ccdb [Hexagon] Merge HexagonAlias.td into HexagonInstrAlias.td, NFC
llvm-svn: 268641
2016-05-05 16:19:36 +00:00
Chad Rosier
8c9359c0d4 [ValueTracking] Improve isImpliedCondition for matching LHS and Imm RHSs.
llvm-svn: 268636
2016-05-05 15:39:18 +00:00
Krzysztof Parzyszek
275ca43ee3 [Hexagon] Handle operand type differences for A2_tfrpi
The instruction A2_tfrpi has a 64-bit operand, while the corresponding
intrinsic takes a 32-bit value. The actual value has only 8 significant
bits, so the difference is only in the type used to represent it.
In order to map the intrinsic to the instruction, the operand needs to
be extended to the correct type.

llvm-svn: 268635
2016-05-05 15:29:47 +00:00
Silviu Baranga
abd48502c9 Fix unused variable warning after r268632
llvm-svn: 268634
2016-05-05 15:27:57 +00:00
Silviu Baranga
62976245a8 [LV] Identify more induction PHIs by coercing expressions to AddRecExprs
Summary:
Some PHIs can have expressions that are not AddRecExprs due to the presence
of sext/zext instructions. In order to prevent the Loop Vectorizer from
bailing out when encountering these PHIs, we now coerce the SCEV
expressions to AddRecExprs using SCEV predicates (when possible).

We only do this when the alternative would be to not vectorize.

Reviewers: mzolotukhin, anemet

Subscribers: mssimpso, sanjoy, mzolotukhin, llvm-commits

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

llvm-svn: 268633
2016-05-05 15:20:39 +00:00
Silviu Baranga
6de5dd17a2 [LV] Refactor the validation of PHI inductions. NFC
This moves the validation of PHI inductions into a
separate method, making it easier to reuse this
logic.

llvm-svn: 268632
2016-05-05 15:14:01 +00:00
James Y Knight
49bc30f7bb Remove bit-rotten CppBackend.
This backend was supposed to generate C++ code which will re-construct
the LLVM IR passed as input. This seems to me to have very marginal
usefulness in the first place.

However, the code has never been updated to use IRBuilder, which makes
its current value negative -- people who look at the output may be
steered to use the *wrong* C++ APIs to construct IR.

Furthermore, it's generated code that doesn't compile since at least
2013.

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

llvm-svn: 268631
2016-05-05 14:35:40 +00:00