1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

201574 Commits

Author SHA1 Message Date
Vitaly Buka
ae3ad63414 [StackSafety,NFC] Add Stats counters 2020-08-07 14:02:50 -07:00
Sameer Arora
a27cdf02e5 Add symlinks for libtool and install_name_tool
Add symlinks for `llvm-libtool-darwin` and
`llvm-install-name-tool`.

Reviewed by jhenderson, smeenai

Differential Revision: https://reviews.llvm.org/D85054
2020-08-07 13:46:36 -07:00
Matt Arsenault
fc0dd4b853 GlobalISel: Handle zext(sext x) in artifact combiner
This eliminates the illegal intermediate s8 value in the added test.
2020-08-07 16:37:46 -04:00
Sameer Arora
218d68982d [FileCheck] Add docs for --allow-empty
This diff adds documentation for `allow-empty` flag under FileCheck
docs.

Reviewed by jhenderson, smeenai, thopre

Differential Revision: https://reviews.llvm.org/D83682
2020-08-07 13:27:57 -07:00
Sameer Arora
8d6c074d8c [llvm-install-name-tool] Adds docs for llvm-install-name-tool
Adding documentation for llvm-install-name-tool.

Reviewed by smeenai, Ktwu

Differential Revision: https://reviews.llvm.org/D81944
2020-08-07 12:51:58 -07:00
Gui Andrade
d255b7f7cb Revert "[MSAN] Instrument libatomic load/store calls"
Problems with instrumenting atomic_load when the call has no successor,
blocking compiler roll

This reverts commit 33d239513c881d8c11c60d5710c55cf56cc309a5.
2020-08-07 19:45:51 +00:00
LLVM GN Syncbot
79c68f2fb8 [gn build] Port 320eab2d558 2020-08-07 19:01:40 +00:00
Yuanfang Chen
cee8d8ef70 Revert "[NewPM][CodeGen] Introduce machine pass and machine pass manager"
This reverts commit 911565d1085d9447363fe8ad041817436c4998fe.

Broke some non-Linux bots.
2020-08-07 11:59:58 -07:00
Jianzhou Zhao
b6143710cb Reduce dropTriviallyDeadConstantArrays cumulative time percentage from 17% to 4%
The history of dropTriviallyDeadConstantArrays is like this. Because the appending linkage uses too much memory (http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150105/251381.html), dropTriviallyDeadConstantArrays was introduced (https://reviews.llvm.org/rG81f385b0c6ea37dd7195a65be162c75bbdef29d2) to release unused constant arrays. Recently, dropTriviallyDeadConstantArrays was improved (https://reviews.llvm.org/rG81f385b0c6ea37dd7195a65be162c75bbdef29d2) to reduce its quadratic cost.

Our recent LTO profiling shows that when a target is large, 15-20% of time cost is from the SetVector::insert called by dropTriviallyDeadConstantArrays.

A large application has hundreds or thousands of modules; each module calls dropTriviallyDeadConstantArrays once for cleaning up tens of thousands of ConstantArrays a module has. In those ConstantArrays, usually around 5 can be deleted; a very very few deleted ConstantArrays reference other ConstantArrays: less than 10 out of millions.

Given this, the cost of SetVector::insert is mainly from the construction of WorkList from ArrayConstants. This motivated the fix that iterates ArrayConstants directly, and uses WorkList only when necessary.

Our evaluation shows that
1) The cumulative time percentage of dropTriviallyDeadConstantArrays is reduced from 15-17% to 4-6%.
2) For targets with LTO time > 20min, the time reduction is about 20%.
3) No observable performance impact for build without using LTO.

{F12506218}
{F12506221}

Reviewed By: mehdi_amini, tejohnson, jdoerfert

Differential Revision: https://reviews.llvm.org/D85379
2020-08-07 11:36:30 -07:00
Arthur Eubanks
8c7c923e8d [PPC] Rename bool-ret-to-int -> ppc-bool-ret-to-int
Reviewed By: #powerpc, nemanjai

Differential Revision: https://reviews.llvm.org/D85391
2020-08-07 11:27:05 -07:00
LLVM GN Syncbot
1bc795778b [gn build] Port 911565d1085 2020-08-07 18:22:24 +00:00
Arthur Eubanks
cec3bdab26 [NFC] Use value initializer for OVERLAPPED
To fix
../llvm/lib/Support/Windows/Path.inc(1265,21): warning: missing field
'InternalHigh' initializer [-Wmissing-field-initializers]
  OVERLAPPED OV = {0};

Differential Revision: https://reviews.llvm.org/D85480
2020-08-07 11:18:33 -07:00
Vang Thao
0c2a21406a [AMDGPU] Fix not rescheduling without clustering
Regions are sometimes skipped which should be rescheduled without memory op
clustering. RegionIdx is not incremented when iterating over regions that
are flagged to be skipped, causing the index to be incorrect.

Thanks to Vang Thao for discovering this bug!

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D85498
2020-08-07 11:15:58 -07:00
Yuanfang Chen
4240996330 [NewPM][CodeGen] Introduce machine pass and machine pass manager
machine pass could define four methods:
- `PreservedAnalyses run(MachineFunction &, MachineFunctionAnalysisManager &)`
- `Error doInitialization(Module &, MachineFunctionAnalysisManager &)`
- `Error doFinalization(Module &, MachineFunctionAnalysisManager &)`
- `Error run(Module &, MachineFunctionAnalysisManager &)`

machine pass manger:
- MachineFunctionAnalysisManager:
  Basically an AnalysisManager<MachineFunction> augmented with the ability to
  register and query IR analyses
- MachineFunctionPassManager: support only two methods, `addPass` and `run`

Reviewed By: arsenm, asbirlea, aeubanks

Differential Revision: https://reviews.llvm.org/D67687
2020-08-07 11:00:31 -07:00
Yuanfang Chen
377ad5f083 [NewPM] Only verify loop for nonskipped user loop pass
No verification for pass mangers since it is not needed.
No verification for skipped loop pass since the asserted condition is not used.

Add a BeforeNonSkippedPass callback for this. The callback needs more
inputs than its parameters to work so the callback is added on-the-fly.

Reviewed By: aeubanks, asbirlea

Differential Revision: https://reviews.llvm.org/D84977
2020-08-07 11:00:31 -07:00
Mitch Phillips
4cdf8a5d36 Revert "Reland D64327 [MC][ELF] Allow STT_SECTION referencing SHF_MERGE on REL targets"
This reverts commit b497665d98ad5026b1d3d67d5793a28fefe27bea.

Spent some time trying to reproduce this locally, reverting in a
desparate attempt to fix the sanitizer buildbot:
 - http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/28828

I don't know exactly why or how this patch breaks the bots, but it seems
pretty concrete that it's the culprit.
2020-08-07 10:56:33 -07:00
Tyker
c2b7184126 [NFC] Add utility to sum/merge stats files
Add a small script to sum *.stats file given as input and output the totals
usage example:
    merge-stats.py $(find ./builddir/ -name "*.stats") > total.stats

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D83505
2020-08-07 19:02:42 +02:00
David Green
1b078d7ecd [ARM] Extra reduction plus tailpredication tests. NFC 2020-08-07 17:16:56 +01:00
Amy Kwan
3ee1bf0ca0 [PowerPC] Add Vector Extract/Expand/Count with Mask, Move to VSR Mask Instruction Definitions and MC Tests
This patch adds the instruction definitions and assembly/disassembly tests for
the following set of instructions:

Vector Extract [byte | half | word | doubleword | quad] with mask
Vector Expand [byte | half | word | doubleword | quad] with mask
Move to VSR [byte | byte immediate | half | word | doubleword | quad] with mask
Vector Count Mask Bits [byte | half | word | doubleword]

Differential Revision: https://reviews.llvm.org/D83724
2020-08-07 11:02:08 -05:00
Kamau Bridgeman
48a9603fbc [PowerPC][PCRelative] Set TLS unsupported with PC relative memops
Introduce a fatal error if any thread local storage code is compiled
using pc relative memory operations as well as a hidden override
option `-enable-ppc-pcrel-tls` so that this support can be incrementally
added if possible.

Reviewed By: #powerpc, nemanjai

Differential Revision: https://reviews.llvm.org/D85448
2020-08-07 10:56:24 -05:00
Jay Foad
e9385fa488 [NFC][GVN] Fix "avaliable" typos
Differential Revision: https://reviews.llvm.org/D85520
2020-08-07 14:22:24 +01:00
Bevin Hansson
7c243aea4b [Intrinsic] Add sshl.sat/ushl.sat, saturated shift intrinsics.
Summary:
This patch adds two intrinsics, llvm.sshl.sat and llvm.ushl.sat,
which perform signed and unsigned saturating left shift,
respectively.

These are useful for implementing the Embedded-C fixed point
support in Clang, originally discussed in
http://lists.llvm.org/pipermail/llvm-dev/2018-August/125433.html
and
http://lists.llvm.org/pipermail/cfe-dev/2018-May/058019.html

Reviewers: leonardchan, craig.topper, bjope, jdoerfert

Subscribers: hiraditya, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D83216
2020-08-07 15:09:24 +02:00
Bevin Hansson
71fc113f30 [LangRef] Minor fixes to intrinsic headers and descriptions. NFC. 2020-08-07 15:09:24 +02:00
Xing GUO
1762b5a368 [macho2yaml] Remove unused functions. NFC.
dumpDebugStrings() and dumpDebugAbbrev() are no longer used in
macho2yaml. This patch helps remove them.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D85496
2020-08-07 20:34:15 +08:00
Simon Pilgrim
2dd6d2b140 [DAG] GetDemandedBits - remove custom AND handling.
As mentioned on D85463, we should be using SimplifyMultipleUseDemandedBits (which is the default fallback).

The minor regression in illegal-bitfield-loadstore.ll will be addressed properly by D77804.
2020-08-07 12:55:47 +01:00
Simon Pilgrim
6c0079073f Remove unreachable break. NFC 2020-08-07 12:37:49 +01:00
Simon Pilgrim
64e8ba76d8 [SLP][X86] Add smax intrinsic reduction tests
SLP currently only matches the ICMP+SELECT patterns for min/max reductions
2020-08-07 11:48:08 +01:00
Simon Pilgrim
e07afa51ab [SLP][X86] Add abs/smax/smin/umax/umin intrinsic vectorization tests 2020-08-07 11:23:43 +01:00
QingShan Zhang
42ff7d0cb7 [NFC][Test] Format the test with script update_llc_test_checks.py 2020-08-07 10:22:38 +00:00
Max Kazantsev
7d32f6095a [Test] Added test showing missing range check elimination opportunity in IndVars
Seems that SCEV is not powerful enough to handle this.
2020-08-07 16:47:25 +07:00
Kazushi (Jam) Marukawa
535690cd25 [VE] Change to expand multiply related instructions
Change to expand MULHU/MULHS/UMUL_LOHI/SMUL_LOHI for i32 and i64 since
those instructions are not available on Aurora SX VE.  Some of them
are used in expansion of i128 multiply, so need to modify them to
support i128.  Then, update basic arithmetic regression tests of
i128 and signed/unsigned i32 typed integer values.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D85490
2020-08-07 18:22:25 +09:00
Igor Kudrin
432284da05 [DebugInfo] Remove DwarfUnit::getDwarfVersion(). NFC.
This helper method was used only in one place, which can easily use the
direct call.

Differential revision: https://reviews.llvm.org/D85438
2020-08-07 15:55:44 +07:00
Igor Kudrin
eabe546cbc [DebugInfo] Clean up DIEUnit. NFC.
This removes members of the DIEUnit class which were used only in unit
tests. Note also that child classes shadowed some of these methods,
namely, getDwarfVersion() was overridden in DwartfUnit and getLength()
was overridden in DwarfCompileUnit.

Differential Revision: https://reviews.llvm.org/D85436
2020-08-07 15:55:44 +07:00
Shinji Okumura
02e369eb69 [Attributor] AAPotentialValues Interface
This is a split patch of D80991.
This patch introduces AAPotentialValues and its interface only.
For more detail of AAPotentialValues abstract attribute, see the original patch.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D83283
2020-08-07 17:35:12 +09:00
Christian Kühnel
e33dafd15e Revert "[CMake] Simplify CMake handling for zlib"
This reverts commit 1adc494bce44f6004994deed61b30d4b71fe1d05.
This patch broke the Windows compilation on buildbot and pre-merge testing:
http://lab.llvm.org:8011/builders/mlir-windows/builds/5945
https://buildkite.com/llvm-project/llvm-master-build/builds/780
2020-08-07 09:36:49 +02:00
Max Kazantsev
2a20f7c161 [Test] Add one more test on IndVars that was failing on one of older builds 2020-08-07 14:23:55 +07:00
QingShan Zhang
abbd439db7 [NFC] Add the stats for load/store cluster
We have the stats for MacroFusion but miss it for load/store cluster.
2020-08-07 07:09:48 +00:00
David Sherwood
396a61103c [SVE][CodeGen] Fix bug with store of unpacked FP scalable vectors
Fixed an incorrect pattern in lib/Target/AArch64/AArch64SVEInstrInfo.td
for storing out <vscale x 2 x f32> unpacked scalable vectors. Added
a couple of tests to

  test/CodeGen/AArch64/sve-st1-addressing-mode-reg-imm.ll

Differential Revision: https://reviews.llvm.org/D85441
2020-08-07 07:19:09 +01:00
biplmish
f87266ec05 [PowerPC] Implement Vector Extract Low/High Order Builtins in LLVM/Clang
This patch implements the function prototypes vec_extractl and vec_extracth in altivec.h to utilize the vector extract double element instructions introduced in Power10.

Differential Revision: https://reviews.llvm.org/D84622
2020-08-07 01:02:29 -05:00
QingShan Zhang
b0aa16911a [PowerPC] Support constrained fp operation for setcc
The constrained fp operation fcmp was added by https://reviews.llvm.org/D69281.
This patch is trying to add the support for PowerPC backend.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D81727
2020-08-07 05:16:36 +00:00
QingShan Zhang
f8c2a4c0d9 [Scheduling] Create the missing dependency edges for store cluster
If it is load cluster, we don't need to create the dependency edges(SUb->reg) from SUb to SUa
as they both depend on the base register "reg"

     +-------+
+---->  reg  |
|    +---+---+
|        ^
|        |
|        |
|        |
|    +---+---+
|    |  SUa  |  Load 0(reg)
|    +---+---+
|        ^
|        |
|        |
|    +---+---+
+----+  SUb  |  Load 4(reg)
     +-------+

But if it is store cluster, we need to create it as follow shows to avoid the instruction store
depend on scheduled in-between SUb and SUa.

     +-------+
+---->  reg  |
|    +---+---+
|        ^
|        |         Missing       +-------+
|        | +-------------------->+   y   |
|        | |                     +---+---+
|    +---+-+-+                       ^
|    |  SUa  |  Store x 0(reg)       |
|    +---+---+                       |
|        ^                           |
|        |  +------------------------+
|        |  |
|    +---+--++
+----+  SUb  |  Store y 4(reg)
     +-------+

Reviewed By: evandro, arsenm, rampitec, foad, fhahn

Differential Revision: https://reviews.llvm.org/D72031
2020-08-07 04:58:03 +00:00
Vitaly Buka
f8fc07d99e [StackSafety,NFC] Fix tests in debug 2020-08-06 20:46:39 -07:00
Shinji Okumura
ae45682066 [Attributor] Check violation of returned position nonnull and noundef attribute in AAUndefinedBehavior
This patch is a follow up of D84733.
If a function has noundef attribute in returned position, instructions that return undef or poison value cause UB.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D85178
2020-08-07 12:02:42 +09:00
Vitaly Buka
4cdf5a3f95 [StackSafety,NFC] Add more tests 2020-08-06 19:50:05 -07:00
Vitaly Buka
156223b38e [StackSafety,NFC] Sort llvm-lto2 resolutions in tests 2020-08-06 19:46:52 -07:00
Vitaly Buka
15a533fc32 [StackSafety,NFC] Add debug counters 2020-08-06 19:24:02 -07:00
Vitaly Buka
4124f20201 [StackSafety,NFC] Use CHECK-EMPTY in tests 2020-08-06 19:19:51 -07:00
Vitaly Buka
68e4929619 [LLParser,NFC] Simplify forward GV refs update
Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D85238
2020-08-06 19:18:51 -07:00
Vitaly Buka
3b944733de [StackSafety] Skip ambiguous lifetime analysis
If we can't identify alloca used in lifetime marker we
need to assume to worst case scenario.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D84630
2020-08-06 19:10:33 -07:00
Vitaly Buka
567e88646c [LTO,NFC] Skip generateParamAccessSummary when empty
addGlobalValueSummary can check newly added FunctionSummary
and set HasParamAccess to mark that generateParamAccessSummary
is needed.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D85182
2020-08-06 19:01:19 -07:00