]> granicus.if.org Git - llvm/log
llvm
5 years ago[X86][AVX] Ensure chained subvector insertions are the same size (PR42833)
Simon Pilgrim [Wed, 31 Jul 2019 12:55:39 +0000 (12:55 +0000)]
[X86][AVX] Ensure chained subvector insertions are the same size (PR42833)

Before combining insert_subvector(insert_subvector(vec, sub0, c0), sub1, c1) patterns, ensure that the subvectors are all the same type. On AVX512 targets especially we might have a mixture of 128/256 subvector insertions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367429 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64] Add support for Transactional Memory Extension (TME)
Momchil Velikov [Wed, 31 Jul 2019 12:52:17 +0000 (12:52 +0000)]
[AArch64] Add support for Transactional Memory Extension (TME)

Re-commit r366322 after some fixes

TME is a future architecture technology, documented in

  https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
  https://developer.arm.com/docs/ddi0601/a

More about the future architectures:

  https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
TCANCEL and the target feature/arch extension "tme".

It also implements TME builtin functions, defined in ACLE Q2 2019
(https://developer.arm.com/docs/101028/latest)

Differential Revision: https://reviews.llvm.org/D64416

Patch by Javed Absar and Momchil Velikov

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367428 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM] Fix Alignment death tests in Release Mode
Guillaume Chatelet [Wed, 31 Jul 2019 12:47:20 +0000 (12:47 +0000)]
[LLVM] Fix Alignment death tests in Release Mode

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367427 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Regenerate lrshrink test checks to make D65354 diff easier
Simon Pilgrim [Wed, 31 Jul 2019 12:30:24 +0000 (12:30 +0000)]
[X86] Regenerate lrshrink test checks to make D65354 diff easier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367426 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Regenerate callee-saved test checks to make D65354 diff easier
Simon Pilgrim [Wed, 31 Jul 2019 12:29:07 +0000 (12:29 +0000)]
[X86] Regenerate callee-saved test checks to make D65354 diff easier

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367425 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Regenerate alias-static-alloca test checks to make D65354 diff easier
Simon Pilgrim [Wed, 31 Jul 2019 12:27:47 +0000 (12:27 +0000)]
[X86] Regenerate alias-static-alloca test checks to make D65354 diff easier

I've manually added the stack offsets back as these are worth keeping - we really need a way for update_llc_test_checks.py not to mask out useful address math

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367424 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Fixup DNDEBUG build - variable is only used in assertion
Roman Lebedev [Wed, 31 Jul 2019 12:26:37 +0000 (12:26 +0000)]
[DivRemPairs] Fixup DNDEBUG build - variable is only used in assertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367423 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r367393
Nico Weber [Wed, 31 Jul 2019 12:19:28 +0000 (12:19 +0000)]
gn build: Merge r367393

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367422 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Regenerate vp2intersect tests
Simon Pilgrim [Wed, 31 Jul 2019 12:17:10 +0000 (12:17 +0000)]
[X86] Regenerate vp2intersect tests

Enable nounwind to remove unnecessary stack manipulation code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367421 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Recommit: Handling for expanded-form rem - recomposition (PR42673)
Roman Lebedev [Wed, 31 Jul 2019 12:06:51 +0000 (12:06 +0000)]
[DivRemPairs] Recommit: Handling for expanded-form rem - recomposition (PR42673)

Summary:
While `-div-rem-pairs` pass can decompose rem in div+rem pair when div-rem pair
is unsupported by target, nothing performs the opposite fold.
We can't do that in InstCombine or DAGCombine since neither of those has access to TTI.
So it makes most sense to teach `-div-rem-pairs` about it.

If we matched rem in expanded form, we know we will be able to place div-rem pair
next to each other so we won't regress the situation.
Also, we shouldn't decompose rem if we matched already-decomposed form.
This is surprisingly straight-forward otherwise.

The original patch was committed in rL367288 but was reverted in rL367289
because it exposed pre-existing RAUW issues in internal data structures
of the pass; those now have been addressed in a previous patch.

https://bugs.llvm.org/show_bug.cgi?id=42673

Reviewers: spatel, RKSimon, efriedma, ZaMaZaN4iK, bogner

Reviewed By: bogner

Subscribers: bogner, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65298

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367419 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Avoid RAUW pitfalls (PR42823)
Roman Lebedev [Wed, 31 Jul 2019 12:06:38 +0000 (12:06 +0000)]
[DivRemPairs] Avoid RAUW pitfalls (PR42823)

Summary:
`DivRemPairs` internally creates two maps:
* {sign, divident, divisor} -> div instruction
* {sign, divident, divisor} -> rem instruction
Then it iterates over rem map, and looks if there is an entry
in div map with the same key. Then depending on some internal logic
it may RAUW rem instruction with something else.

But if that rem instruction is an input to other div/rem,
then it was used as a key in these maps, so the old value (used in key)
is now dandling, because RAUW didn't update those maps.
And we can't even RAUW map keys in general, there's `ValueMap`,
but we don't have a single `Value` as key...

The bug was discovered via D65298, and the test there exists.
Now, i'm not sure how to expose this issue in trunk.
The bug is clearly there if i change the map keys to be `AssertingVH`/`PoisoningVH`,
but i guess this didn't miscompiled anything thus far?
I really don't think this is benin without that patch.

The fix is actually rather straight-forward - instead of trying to somehow
shoe-horn `ValueMap` here (doesn't fit, key isn't just `Value`), or writing a new
`ValueMap` with key being a struct of `Value`s, we can just have an intermediate
data structure - a vector, each entry containing matching `Div, Rem` pair,
and pre-filling it before doing any modifications.
This way we won't need to query map after doing RAUW, so no bug is possible.

Reviewers: spatel, bogner, RKSimon, craig.topper

Reviewed By: spatel

Subscribers: hiraditya, hans, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65451

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367417 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs][NFC] Autogenerate all checklines
Roman Lebedev [Wed, 31 Jul 2019 12:06:16 +0000 (12:06 +0000)]
[DivRemPairs][NFC] Autogenerate all checklines

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367415 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][AVX] Add reduced test case for PR42833
Simon Pilgrim [Wed, 31 Jul 2019 11:35:01 +0000 (11:35 +0000)]
[X86][AVX] Add reduced test case for PR42833

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367412 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRe-disable C4324 MSVC warning that was enabled in D65458 / rL367383
Simon Pilgrim [Wed, 31 Jul 2019 11:06:05 +0000 (11:06 +0000)]
Re-disable C4324 MSVC warning that was enabled in D65458 / rL367383

This was breaking /WX builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367409 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM] Generate MVE VFMAs
Oliver Cruickshank [Wed, 31 Jul 2019 10:44:11 +0000 (10:44 +0000)]
[ARM] Generate MVE VFMAs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367408 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Test Commit
Oliver Cruickshank [Wed, 31 Jul 2019 10:08:09 +0000 (10:08 +0000)]
[NFC] Test Commit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367405 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix mismatching vector type in AlignmentTest.cpp
Guillaume Chatelet [Wed, 31 Jul 2019 10:00:48 +0000 (10:00 +0000)]
Fix mismatching vector type in AlignmentTest.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367404 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[RISCV] Support 'f' Inline Assembly Constraint
Sam Elliott [Wed, 31 Jul 2019 09:45:55 +0000 (09:45 +0000)]
[RISCV] Support 'f' Inline Assembly Constraint

Summary:
This adds the 'f' inline assembly constraint, as supported by GCC. An
'f'-constrained operand is passed in a floating point register. Exactly
which kind of floating-point register (32-bit or 64-bit) is decided
based on the operand type and the available standard extensions (-f and
-d, respectively).

This patch adds support in both the clang frontend, and LLVM itself.

Reviewers: asb, lewis-revill

Reviewed By: asb

Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D65500

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367403 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][ARMCGP] Use switch in isSupportedValue
Sam Parker [Wed, 31 Jul 2019 09:34:11 +0000 (09:34 +0000)]
[NFC][ARMCGP] Use switch in isSupportedValue

Use a switch instead of many isa<> while checking for supported
values. Also be explicit about which cast instructions are supported;
This allows the removal of SIToFP from GenerateSignBits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367402 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRecommit "[GVN] Preserve loop related analysis/canonical forms."
Florian Hahn [Wed, 31 Jul 2019 09:27:54 +0000 (09:27 +0000)]
Recommit "[GVN] Preserve loop related analysis/canonical forms."

This fixes some pipeline tests.
This reverts commit d0b6f42936bfb6d56d325c732ae79400c9c6016a.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367401 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAdd default constructor for MaybeAlign
Guillaume Chatelet [Wed, 31 Jul 2019 09:16:24 +0000 (09:16 +0000)]
Add default constructor for MaybeAlign

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367400 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][SVE2] Load/store instruction fixes
Cullen Rhodes [Wed, 31 Jul 2019 09:10:36 +0000 (09:10 +0000)]
[AArch64][SVE2] Load/store instruction fixes

Summary:
* Loads and stores in SVE2 are gather/scatter not contiguous, fixed by
  renaming multiclasses to reflect this and also updated comments.
* Remove aliases from load/store multiclasses that reflect the behaviour
  of the original form.
* Fix bug in scatter store implementation, vector list should be used as
  input, not output.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D65392

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367398 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[RISCV] Add support for lowering floating point inlineasm clobbers
Simon Cook [Wed, 31 Jul 2019 09:07:21 +0000 (09:07 +0000)]
[RISCV] Add support for lowering floating point inlineasm clobbers

This adds the required extension to RISC-V's getRegForInlineAsmConstraint
in order to be able to correctly distringuish between the 32 and 64-bit
floating point registers when the generic fX name appears in inlineasm
clobber contraints. It also adds a check to validate that callee saved
floating point registers are only saved in this case when a hard-float
ABI is selected.

Differential Revision: https://reviews.llvm.org/D64751

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367397 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][SVE2] Minor refactoring and cleanup
Cullen Rhodes [Wed, 31 Jul 2019 08:58:16 +0000 (08:58 +0000)]
[AArch64][SVE2] Minor refactoring and cleanup

Summary:
* Clarify comment with SVE2 for predicated shifts and move next to other
  shift instructions.
* Clarify comments for various instructions.
* Move FCVTX instruction next to other fp conversions.
* Move FLOGB to next to other fp instructions and fix description.
* Remove "cons" from non-constructive multiclass for bitwise shift-right
  and accumulate instructions.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D65390

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367396 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[docs] Add cmake to Software requirements
Diana Picus [Wed, 31 Jul 2019 08:48:36 +0000 (08:48 +0000)]
[docs] Add cmake to Software requirements

Add cmake to the list of packages required for compiling LLVM.
Also move make to the bottom of the list and mark it as optional.

Differential Revision: https://reviews.llvm.org/D65438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367395 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][SVE2] Use destination register as source register
Cullen Rhodes [Wed, 31 Jul 2019 08:45:57 +0000 (08:45 +0000)]
[AArch64][SVE2] Use destination register as source register

Summary:
This patch fixes a bug in the following instructions that should have been
implemented as destructive. A destructive instruction is an instruction where
one of the source registers also acts as the destination register. Therefore,
the contents of the source register, when the instruction begins execution, are
replaced by the result of the instruction when the instruction completes
execution [1]:

  * SRI/SLI
  * EORBT/EORTB
  * TBX
  * Narrowing top instructions
  * FP convert precision instructions

These changes are non-functional from the assembler/diassembler point-of-view
but are necessary for correct codegen.

[1] https://static.docs.arm.com/ddi0584/ae/DDI0584A_e_SVE_supp_armv8A.pdf

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D65389

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367394 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LLVM][NFC] Adding an Alignment type to LLVM
Guillaume Chatelet [Wed, 31 Jul 2019 08:27:42 +0000 (08:27 +0000)]
[LLVM][NFC] Adding an Alignment type to LLVM

Summary:
This patch introduces a type to straighten LLVM's alignment management.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html

The next step is to use this type throughout LLVM

Reviewers: jfb, jakehehrlich

Subscribers: mgorny, mgrang, dexonsmith, llvm-commits, courbet

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367393 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm/Object] - Add a test for "empty string table" error.
George Rimar [Wed, 31 Jul 2019 08:12:01 +0000 (08:12 +0000)]
[llvm/Object] - Add a test for "empty string table" error.

This error was never tested. In this patch I improved
the error message, added the test case and also simplified
the code that processes a similar error right below.

Differential revision: https://reviews.llvm.org/D65396

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367391 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][ParallelDSP] Convert to function pass
Sam Parker [Wed, 31 Jul 2019 07:32:03 +0000 (07:32 +0000)]
[ARM][ParallelDSP] Convert to function pass

Run across a whole function, visiting each basic block one at a time.

Differential Revision: https://reviews.llvm.org/D65324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367389 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agorevert r367382 because buildbot failure
Zi Xuan Wu [Wed, 31 Jul 2019 07:03:42 +0000 (07:03 +0000)]
revert r367382 because buildbot failure

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367388 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Remove LLVM_ALIGNAS
JF Bastien [Wed, 31 Jul 2019 03:22:08 +0000 (03:22 +0000)]
[NFC] Remove LLVM_ALIGNAS

Summary: The minimum compilers support all have alignas, and we don't use LLVM_ALIGNAS anywhere anymore. This also removes an MSVC diagnostic which, according to the comment above, isn't relevant anymore.

Reviewers: rnk

Subscribers: mgorny, jkorous, dexonsmith, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D65458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367383 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PowerPC] Eliminate loads/swap feeding swap/store for vector type by using big-endian...
Zi Xuan Wu [Wed, 31 Jul 2019 02:56:00 +0000 (02:56 +0000)]
[PowerPC] Eliminate loads/swap feeding swap/store for vector type by using big-endian load/store

In PowerPC, there is instruction to load vector in big endian element order when it's in little endian target.
So we can combine vector load + reverse into big endian load to eliminate the swap instruction.
Also combine vector reverse + store into big endian store.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367382 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU] Fix high occupancy calculation and print it
Stanislav Mekhanoshin [Wed, 31 Jul 2019 01:07:10 +0000 (01:07 +0000)]
[AMDGPU] Fix high occupancy calculation and print it

We had couple places which still return 10 as a maximum
occupancy. Fixed.

Also print comment about occupancy as compiler see it.

Differential Revision: https://reviews.llvm.org/D65423

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367381 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoGlobalISel: Replace artifact combiner checks with assert
Matt Arsenault [Wed, 31 Jul 2019 00:30:37 +0000 (00:30 +0000)]
GlobalISel: Replace artifact combiner checks with assert

It has bothered me for a while that these guard against cases that
should never happene, so replace these with asserts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367376 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MS] Emit S_HEAPALLOCSITE debug info in SelectionDAG
Amy Huang [Wed, 31 Jul 2019 00:16:13 +0000 (00:16 +0000)]
[MS] Emit S_HEAPALLOCSITE debug info in SelectionDAG

Summary: This emits labels around heapallocsite calls in SelectionDAG.

Reviewers: rnk

Subscribers: MatzeB, aprantl, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D61105

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367374 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoTableGen: Add MinAlignment predicate
Matt Arsenault [Wed, 31 Jul 2019 00:14:43 +0000 (00:14 +0000)]
TableGen: Add MinAlignment predicate

AMDGPU uses some custom code predicates for testing alignments.

I'm still having trouble comprehending the behavior of predicate bits
in the PatFrag hierarchy. Any attempt to abstract these properties
unexpectdly fails to apply them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367373 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoReland: [Remarks] Add an LLVM-bitstream-based remark serializer
Francis Visoiu Mistrih [Wed, 31 Jul 2019 00:13:51 +0000 (00:13 +0000)]
Reland: [Remarks] Add an LLVM-bitstream-based remark serializer

Add a new serializer, using a binary format based on the LLVM bitstream
format.

This format provides a way to serialize the remarks in two modes:

1) Separate mode: the metadata is separate from the remark entries.
2) Standalone mode: the metadata and the remark entries are in the same
file.

The format contains:

* a meta block: container version, container type, string table,
external file path, remark version
* a remark block: type, remark name, pass name, function name, debug
file, debug line, debug column, hotness, arguments (key, value, debug
file, debug line, debug column)

A string table is required for this format, which will be dumped in the
meta block to be consumed before parsing the remark blocks.

On clang itself, we noticed a size reduction of 13.4x compared to YAML,
and a compile-time reduction of between 1.7% and 3.5% on CTMark.

Differential Revision: https://reviews.llvm.org/D63466

Original llvm-svn: 367364
Revert llvm-svn: 367370

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367372 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[Remarks] Add an LLVM-bitstream-based remark serializer"
Francis Visoiu Mistrih [Wed, 31 Jul 2019 00:01:34 +0000 (00:01 +0000)]
Revert "[Remarks] Add an LLVM-bitstream-based remark serializer"

This reverts commit r367364.

Breaks some bots: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-gn/builds/3161/steps/annotate/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367370 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoGlobalISel: Add G_ATOMICRMW_{FADD|FSUB}
Matt Arsenault [Tue, 30 Jul 2019 23:56:30 +0000 (23:56 +0000)]
GlobalISel: Add G_ATOMICRMW_{FADD|FSUB}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367369 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r367364
Nico Weber [Tue, 30 Jul 2019 23:38:09 +0000 (23:38 +0000)]
gn build: Merge r367364

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367366 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DAGCombiner] Add an option to control whether or not to enable store merging.
Wei Mi [Tue, 30 Jul 2019 23:14:56 +0000 (23:14 +0000)]
[DAGCombiner] Add an option to control whether or not to enable store merging.

Add an option to control whether or not to enable store merging in dag combiner
so we can workaround some bugs more easily.

Differential Revision: https://reviews.llvm.org/D65482

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367365 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Remarks] Add an LLVM-bitstream-based remark serializer
Francis Visoiu Mistrih [Tue, 30 Jul 2019 23:11:57 +0000 (23:11 +0000)]
[Remarks] Add an LLVM-bitstream-based remark serializer

Add a new serializer, using a binary format based on the LLVM bitstream
format.

This format provides a way to serialize the remarks in two modes:

1) Separate mode: the metadata is separate from the remark entries.
2) Standalone mode: the metadata and the remark entries are in the same
file.

The format contains:

* a meta block: container version, container type, string table,
external file path, remark version
* a remark block: type, remark name, pass name, function name, debug
file, debug line, debug column, hotness, arguments (key, value, debug
file, debug line, debug column)

A string table is required for this format, which will be dumped in the
meta block to be consumed before parsing the remark blocks.

On clang itself, we noticed a size reduction of 13.4x compared to YAML,
and a compile-time reduction of between 1.7% and 3.5% on CTMark.

Differential Revision: https://reviews.llvm.org/D63466

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367364 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRemove cmake checks for MSVC 1900 / VS 2013
Reid Kleckner [Tue, 30 Jul 2019 22:49:11 +0000 (22:49 +0000)]
Remove cmake checks for MSVC 1900 / VS 2013

Our minimum Visual C++ version is 19.10 from Visual Studio 2017.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367362 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Improve cmake diagnostic when checking atomics
JF Bastien [Tue, 30 Jul 2019 22:08:38 +0000 (22:08 +0000)]
[NFC] Improve cmake diagnostic when checking atomics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367359 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Fix mistake in comment. NFC
Craig Topper [Tue, 30 Jul 2019 21:00:24 +0000 (21:00 +0000)]
[X86] Fix mistake in comment. NFC

The code is matching sext not zext.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367357 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[benchmark] Fix win32 link on case-sensitive fs
Roman Lebedev [Tue, 30 Jul 2019 20:47:59 +0000 (20:47 +0000)]
[benchmark] Fix win32 link on case-sensitive fs

Summary: This fixes cross-builds with MinGW from case-sensitive file-systems (on Linux)

This is a cherry-pick from
https://github.com/google/benchmark/pull/840
https://github.com/google/benchmark/commit/8e48105d465c586068dd8e248fe75a8971c6ba3a

Original patch by: @jschueller (Julien Schueller) !

Differential Revision: https://reviews.llvm.org/D61371

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367356 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU] Print register pressure for agpr and vgpr separately
Stanislav Mekhanoshin [Tue, 30 Jul 2019 20:45:15 +0000 (20:45 +0000)]
[AMDGPU] Print register pressure for agpr and vgpr separately

Differential Revision: https://reviews.llvm.org/D65476

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367355 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[MemorySSA] Extend allowed behavior for simplified instructions.
Alina Sbirlea [Tue, 30 Jul 2019 20:10:33 +0000 (20:10 +0000)]
[MemorySSA] Extend allowed behavior for simplified instructions.

Summary:
LoopRotate may simplify instructions, leading to the new instructions not having memory accesses created for them.
Allow this behavior, by allowing the new access to be null when the template is null, and looking upwards for the proper defined access when dealing with simplified instructions.

Reviewers: george.burgess.iv

Subscribers: jlebar, Prazek, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65338

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367352 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NVPTX] Fix PR41651
Michael Liao [Tue, 30 Jul 2019 19:52:01 +0000 (19:52 +0000)]
[NVPTX] Fix PR41651

Summary:
- Use the passed `DL` directly as retrieving data layout from CS by
  checking the called function is not reliable. Under indirect function
  call, there is no called function.

Subscribers: jholewinski, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65468

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367349 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[dsymutil] Pass LinkOptions by value instead of const ref.
Jonas Devlieghere [Tue, 30 Jul 2019 19:34:26 +0000 (19:34 +0000)]
[dsymutil] Pass LinkOptions by value instead of const ref.

When looping over the difference architectures in a fat binary, we
modify the link options before dispatching the link step to a different
thread. Passing the options by cont reference is not thread safe, as we
might modify its fields before the whole sturct is copied over.

Given that the link options are already stored in the DwarfLinker, we
can easily fix this by passing a copy of the link options instead of a
reference, which would just get copied later on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367348 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU] Reserve all AGPRs on targets which do not have them
Stanislav Mekhanoshin [Tue, 30 Jul 2019 19:29:33 +0000 (19:29 +0000)]
[AMDGPU] Reserve all AGPRs on targets which do not have them

Differential Revision: https://reviews.llvm.org/D65471

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367347 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AMDGPU/GlobalISel] Add llvm.amdgcn.fdiv.fast legalization.
Austin Kerbow [Tue, 30 Jul 2019 18:49:16 +0000 (18:49 +0000)]
[AMDGPU/GlobalISel] Add llvm.amdgcn.fdiv.fast legalization.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: volkan, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64966

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367344 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FunctionAttrs] Annotate "willreturn" for AssumeLikeInst
Hideto Ueno [Tue, 30 Jul 2019 18:35:29 +0000 (18:35 +0000)]
[FunctionAttrs] Annotate "willreturn" for AssumeLikeInst

Summary:
In D37215, AssumeLikeInstruction are regarded as `willreturn`. In this patch, annotation is added to those which don't have `willreturn` now(`sideeffect, object_size, experimental_widenable_condition`).

Reviewers: jdoerfert, nikic, sstefan1

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367342 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Update comment I failed to update in r367340 / D65462
Nico Weber [Tue, 30 Jul 2019 18:19:13 +0000 (18:19 +0000)]
gn build: Update comment I failed to update in r367340 / D65462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367341 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Fix check-clang-tools after r362702.
Nico Weber [Tue, 30 Jul 2019 18:16:55 +0000 (18:16 +0000)]
gn build: Fix check-clang-tools after r362702.

r362702 added a test that requires clang-tidy to be linked
into libclang, so add that to the gn build.

Differential Revision: https://reviews.llvm.org/D65462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367340 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[WebAssembly] Do not emit tail calls with return type mismatch
Thomas Lively [Tue, 30 Jul 2019 18:08:39 +0000 (18:08 +0000)]
[WebAssembly] Do not emit tail calls with return type mismatch

Summary:
return_call and return_call_indirect are only valid if the return
types of the callee and caller match. We were previously not enforcing
that, which was producing invalid modules.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65246

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367339 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] remove obsolete comment
JF Bastien [Tue, 30 Jul 2019 17:21:30 +0000 (17:21 +0000)]
[NFC] remove obsolete comment

LLVM_ALIGNAS was removed from this class in http://llvm.org/r338099 but the comment was left there. The class is still sommewhat relevant despite the comment, let's keep it there with its one use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367336 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert [GVN] Preserve loop related analysis/canonical forms.
Florian Hahn [Tue, 30 Jul 2019 17:04:58 +0000 (17:04 +0000)]
Revert [GVN] Preserve loop related analysis/canonical forms.

This reverts r367332 (git commit 2d7227ec3ac91f36fc32b1c21e72e2f1f5d030ad)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367335 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Docs] Fix sphinx warning in OCamlLangImpl5.rst
Francis Visoiu Mistrih [Tue, 30 Jul 2019 16:56:45 +0000 (16:56 +0000)]
[Docs] Fix sphinx warning in OCamlLangImpl5.rst

The path to the image was outdated.

http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/33865/steps/docs-llvm-html/logs/stdio

llvm/docs/tutorial/OCamlLangImpl5.rst:173: WARNING: image file not readable: tutorial/LangImpl05-cfg.png

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367334 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[GVN] Preserve loop related analysis/canonical forms.
Florian Hahn [Tue, 30 Jul 2019 16:43:39 +0000 (16:43 +0000)]
[GVN] Preserve loop related analysis/canonical forms.

LoopInfo can be easily preserved by passing it to the functions that
modify the CFG (SplitCriticalEdge and MergeBlockIntoPredecessor.
SplitCriticalEdge also preserves LoopSimplify and LCSSA form when when passing in
LoopInfo. The test case shows that we preserve LoopSimplify and
LoopInfo. Adding addPreservedID(LCSSAID) did not preserve LCSSA for some
reason.

Also I am not sure if it is possible to preserve those in the new pass
manager, as they aren't analysis passes.

Reviewers: reames, hfinkel, davide, jdoerfert

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D65137

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367332 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] Remove uses of LLVM_ALIGNAS
JF Bastien [Tue, 30 Jul 2019 16:31:06 +0000 (16:31 +0000)]
[NFC] Remove uses of LLVM_ALIGNAS

It's not useful anymore: we mandate C++11, and already use alignas in a bunch of places.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367330 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Support] Workaround a GCC 4.8 bug on constant expression evaluation.
Michael Liao [Tue, 30 Jul 2019 16:11:48 +0000 (16:11 +0000)]
[Support] Workaround a GCC 4.8 bug on constant expression evaluation.

Summary:
- The following stripped code trigger a gcc-4.8 bug. To work that
  around, move the alignment evaluation into template parameter.

```
// https://godbolt.org/z/58p5_X
//

enum { aligned = 0, unaligned = 1 };

template <typename T, int alignment> struct PickAlignment {
  enum { value = alignment == 0 ? alignof(T) : alignment };
};

template <typename ValueType, std::size_t Alignment> struct packed {
private:
  struct {
    alignas(
        PickAlignment<ValueType, Alignment>::value) char buffer[sizeof(int)];
  } Value;
};

using ule16_t = packed<uint16_t, unaligned>;

ule16_t x;
```

- Also, replace `alignas` with `LLVMALIGN_AS` to improve the compiler
  compatibility.

Reviewers: jfb

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65452

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367329 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Remarks] Add two serialization modes for remarks: separate and standalone
Francis Visoiu Mistrih [Tue, 30 Jul 2019 16:01:40 +0000 (16:01 +0000)]
[Remarks] Add two serialization modes for remarks: separate and standalone

The default mode is separate, where the metadata is serialized
separately from the remarks.

Another mode is the standalone mode, where the metadata is serialized
before the remarks, on the same stream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367328 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[LoopFusion] Extend use of OptimizationRemarkEmitter
Kit Barton [Tue, 30 Jul 2019 15:58:43 +0000 (15:58 +0000)]
[LoopFusion] Extend use of OptimizationRemarkEmitter

Summary:
This patch extends the use of the OptimizationRemarkEmitter to provide
information about loops that are not fused, and loops that are not eligible for
fusion. In particular, it uses the OptimizationRemarkAnalysis to identify loops
that are not eligible for fusion and the OptimizationRemarkMissed to identify
loops that cannot be fused.

It also reuses the statistics to provide the messages used in the
OptimizationRemarks. This provides common message strings between the
optimization remarks and the statistics.

I would like feedback on this approach, in general. If people are OK with this,
I will flesh out additional remarks in subsequent commits.

Subscribers: hiraditya, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D63844

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367327 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAMDGPU: Avoid emitting "true" predicates
Matt Arsenault [Tue, 30 Jul 2019 15:56:43 +0000 (15:56 +0000)]
AMDGPU: Avoid emitting "true" predicates

Empty condition strings are considerde always true. This removes a lot
of clutter from the generated matcher tables.

This shrinks the source size of AMDGPUGenDAGISel.inc from 7.3M to
6.1M.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367326 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Add srem-of-srem tests (PR42823, D65298, D65451)
Roman Lebedev [Tue, 30 Jul 2019 15:46:03 +0000 (15:46 +0000)]
[DivRemPairs] Add srem-of-srem tests (PR42823, D65298, D65451)

The @srem_of_srem_expanded case exposed a RAUW pitfall in D65298.
Right now these don't appear to fail verification,
so it should be safe to precommit them.

https://reviews.llvm.org/D65298
https://bugs.llvm.org/show_bug.cgi?id=42823
https://reviews.llvm.org/D65451

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367325 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAddress post commit review comments on revision 366727.
Sean Fertile [Tue, 30 Jul 2019 15:37:01 +0000 (15:37 +0000)]
Address post commit review comments on revision 366727.

Addresses number of comment made on D64652 after commiting:

- Reorders function decls in the TargetLoweringObjectFileXCOFF class.
- Fix comment in MCSectionXCOFF to include description of external reference
  csects.
- Convert several llvm_unreachables to report_fatal_error
- Convert several dyn_casts to casts as they are expected not to fail.
- Avoid copying DataLayout object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367324 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[InstCombine] Fold "x ?% y ==/!= 0" to "x & (y-1) ==/!= 0" iff y is power-of-two
Roman Lebedev [Tue, 30 Jul 2019 15:28:22 +0000 (15:28 +0000)]
[InstCombine] Fold "x ?% y ==/!= 0" to  "x & (y-1) ==/!= 0" iff y is power-of-two

Summary:
I have stumbled into this by accident while preparing to extend backend `x s% C ==/!= 0` handling.

While we did happen to handle this fold in most of the cases,
the folding is indirect - we fold `x u% y` to `x & (y-1)` (iff `y` is power-of-two),
or first turn `x s% -y` to `x u% y`; that does handle most of the cases.
But we can't turn `x s% INT_MIN` to `x u% -INT_MIN`,
and thus we end up being stuck with `(x s% INT_MIN) == 0`.

There is no such restriction for the more general fold:
https://rise4fun.com/Alive/IIeS

To be noted, the fold does not enforce that `y` is a constant,
so it may indeed increase instruction count.
This is consistent with what `x u% y`->`x & (y-1)` already does.
I think it makes sense, it's at most one (simple) extra instruction,
while `rem`ainder is really much more un-simple (and likely **very** costly).

Reviewers: spatel, RKSimon, nikic, xbolva00, craig.topper

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65046

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367322 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoAsk confirmation when `git llvm push` will push multiple commits
Mehdi Amini [Tue, 30 Jul 2019 15:25:14 +0000 (15:25 +0000)]
Ask confirmation when `git llvm push` will push multiple commits

This can reduce unexpectedly pushing more than expected by the user.

Differential Revision: https://reviews.llvm.org/D64893

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367321 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoFix `git llvm` script when no arguments are supplied on Python 3
Mehdi Amini [Tue, 30 Jul 2019 15:25:11 +0000 (15:25 +0000)]
Fix `git llvm` script when no arguments are supplied on Python 3

Instead of displaying a help message, it was issuing an error message:

  AttributeError: 'Namespace' object has no attribute 'func'

https://bugs.python.org/issue16308 has more information on the bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367320 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] SimplifyDemandedVectorEltsForTargetNode should be calling resolveTargetShuffleI...
Simon Pilgrim [Tue, 30 Jul 2019 15:06:09 +0000 (15:06 +0000)]
[X86] SimplifyDemandedVectorEltsForTargetNode should be calling resolveTargetShuffleInputs not getTargetShuffleMask

Add TODO comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367318 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Use rebase_path on filename args to libcxx/utils/gen_link_script.py
Hans Wennborg [Tue, 30 Jul 2019 14:17:58 +0000 (14:17 +0000)]
gn build: Use rebase_path on filename args to libcxx/utils/gen_link_script.py

  $ ninja -j800
  [1/5] ACTION //libcxx/src:cxx_linker_script(//llvm/utils/gn/build/toolchain:stage2_unix)
  FAILED: lib/libc++.so
  python ../libcxx/utils/gen_link_script.py --input //build.gn/lib/libc++.so.0 --output //build.gn/lib/libc++.so c++abi unwind
  GENERATING SCRIPT: 'INPUT(libc++.so.0 -lc++abi -lunwind)' as file //build.gn/lib/libc++.so
  Traceback (most recent call last):
    File "../libcxx/utils/gen_link_script.py", line 57, in <module>
      sys.exit(main())
    File "../libcxx/utils/gen_link_script.py", line 50, in main
      with open(args.output, 'w') as f:
  IOError: [Errno 2] No such file or directory: '//build.gn/lib/libc++.so'
  ninja: build stopped: subcommand failed.

Differential revision: https://reviews.llvm.org/D65449

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367314 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[RISCV] Attempt to make rv{32,64}i-aliases-invalid.s less flaky
Sam Elliott [Tue, 30 Jul 2019 13:40:51 +0000 (13:40 +0000)]
[RISCV] Attempt to make rv{32,64}i-aliases-invalid.s less flaky

These tests have been disabled on Linux and Windows due to failing
there. I think that could be down to a race condition between stdout
and stderr, so I have disabled output to stdout.

For the moment, only re-enable on linux, because I don't have a windows
machine to test on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367311 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-objcopy] - Stop using Inputs/alloc-symtab.o
George Rimar [Tue, 30 Jul 2019 13:37:02 +0000 (13:37 +0000)]
[llvm-objcopy] - Stop using Inputs/alloc-symtab.o

Initially Inputs/alloc-symtab.o was added in D42222.
It contains an allocatable .symtab section. Today
we are able to create such sections using yaml2obj.

Later people started using this input for no solid reason in their tests.
Now multiple of tests are using it.
(And those tests do not need such a specific case actually).

In this patch I removed this binary and rewrote the few tests.

Differential revision: https://reviews.llvm.org/D65278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367310 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86][AVX] SimplifyDemandedVectorElts - handle extraction from X86ISD::SUBV_BROADCAST...
Simon Pilgrim [Tue, 30 Jul 2019 11:35:13 +0000 (11:35 +0000)]
[X86][AVX] SimplifyDemandedVectorElts - handle extraction from X86ISD::SUBV_BROADCAST source (PR42819)

PR42819 showed an issue that we couldn't handle the case where we demanded a 'sub-sub-vector' of the SUBV_BROADCAST 'sub-vector' source.

This patch recognizes these cases and extracts the sub-sub-vector instead of trying to broadcast to a type smaller than the 'sub-vector' source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367306 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[CMake] Define _FILE_OFFSET_BITS=64 on Solaris
Rainer Orth [Tue, 30 Jul 2019 10:33:20 +0000 (10:33 +0000)]
[CMake] Define _FILE_OFFSET_BITS=64 on Solaris

This is the compantion patch to https://reviews.llvm.org/D64482, needed to ensure
that builds with host compilers that don't yet predefine _FILE_OFFSET_BITS=64 on
Solaris succeed by always making the host and freshly built clang consistent.

Tested on x86_64-pc-solaris2.11.

Differential Revision: https://reviews.llvm.org/D64483

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367304 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][LowOverheadLoops] Enable by default
Sam Parker [Tue, 30 Jul 2019 08:14:28 +0000 (08:14 +0000)]
[ARM][LowOverheadLoops] Enable by default

The code is now in a good enough state to pass the bunch of tests that
I have run (after fixing the bugs), so let's enable it by default.

Differential Revision: https://reviews.llvm.org/D65277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367297 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[ARM][LowOverheadLoops] Revert non-header LE target
Sam Parker [Tue, 30 Jul 2019 08:08:44 +0000 (08:08 +0000)]
[ARM][LowOverheadLoops] Revert non-header LE target

Revert the hardware loop upon finding a LoopEnd that doesn't target
the loop header, instead of asserting a failure.

Differential Revision: https://reviews.llvm.org/D65268

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367296 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][X86][AArch64] Revisit test coverage for X s% C == 0 fold - add tests for negati...
Roman Lebedev [Tue, 30 Jul 2019 08:00:49 +0000 (08:00 +0000)]
[NFC][X86][AArch64] Revisit test coverage for X s% C == 0 fold - add tests for negative divisors, INT_MIN divisors

As discussed in the review, that fold is only valid for positive
divisors, so while we can negate negative divisors,
we have to special-case INT_MIN.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367294 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[AArch64][AsmParser] Remove SVE and SVE2 from ARMTargetParser
Cullen Rhodes [Tue, 30 Jul 2019 07:47:48 +0000 (07:47 +0000)]
[AArch64][AsmParser] Remove SVE and SVE2 from ARMTargetParser

Summary:
Patch removes SVE and SVE2 features from ARMTargetParser as these
features are not supported on ARM.

Reviewed By: rengolin

Differential Revision: https://reviews.llvm.org/D65385

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367292 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)"
Roman Lebedev [Tue, 30 Jul 2019 07:44:58 +0000 (07:44 +0000)]
Revert "[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)"

test-suite/MultiSource/Benchmarks/DOE-ProxyApps-C/miniGMG broke:

Only PHI nodes may reference their own value!
  %sub33 = srem i32 %sub33, %ranks_in_i

This reverts commit r367288.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367289 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)
Roman Lebedev [Tue, 30 Jul 2019 07:10:00 +0000 (07:10 +0000)]
[DivRemPairs] Handling for expanded-form rem - recomposition (PR42673)

Summary:
While `-div-rem-pairs` pass can decompose rem in div+rem pair when div-rem pair
is unsupported by target, nothing performs the opposite fold.
We can't do that in InstCombine or DAGCombine since neither of those has access to TTI.
So it makes most sense to teach `-div-rem-pairs` about it.

If we matched rem in expanded form, we know we will be able to place div-rem pair
next to each other so we won't regress the situation.
Also, we shouldn't decompose rem if we matched already-decomposed form.
This is surprisingly straight-forward otherwise.

https://bugs.llvm.org/show_bug.cgi?id=42673

Reviewers: spatel, RKSimon, efriedma, ZaMaZaN4iK, bogner

Reviewed By: bogner

Subscribers: bogner, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65298

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367288 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[APInt] Introduce clearLowBits()
Roman Lebedev [Tue, 30 Jul 2019 07:09:41 +0000 (07:09 +0000)]
[APInt] Introduce clearLowBits()

Summary: Equivalent to `x & -2^K`.

Reviewers: RKSimon, craig.topper

Reviewed By: RKSimon, craig.topper

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65369

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367287 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agoRevert "[llvm-objdump] Add warning messages if disassembly + source for problematic...
Michael Pozulp [Tue, 30 Jul 2019 07:05:27 +0000 (07:05 +0000)]
Revert "[llvm-objdump] Add warning messages if disassembly + source for problematic inputs"

This reverts r367284 (git commit b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772).
My changes to LLVMSymbolizer caused a test to fail:
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29488

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367286 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-objdump] Add warning messages if disassembly + source for problematic inputs
Michael Pozulp [Tue, 30 Jul 2019 05:28:26 +0000 (05:28 +0000)]
[llvm-objdump] Add warning messages if disassembly + source for problematic inputs

Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905

Reviewers: jhenderson, rupprecht, grimar

Reviewed By: jhenderson, grimar

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62462

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367284 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC][PowerPC] Add test case for D65063
Zi Xuan Wu [Tue, 30 Jul 2019 05:22:03 +0000 (05:22 +0000)]
[NFC][PowerPC] Add test case for D65063

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367283 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] use C++11 in AlignOf.h, remove AlignedCharArray
JF Bastien [Tue, 30 Jul 2019 04:03:33 +0000 (04:03 +0000)]
[NFC] use C++11 in AlignOf.h, remove AlignedCharArray

I removed all uses of AlignedCharArray since the minimum MSVC version can handle
alignas on char arrays correctly. We can therefore remove AlignedCharArray.

This patch also updates AlignedCharArrayUnion to use C++11.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367282 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FileCollector] test: disable the directory entry collection checks on windows
Alex Lorenz [Tue, 30 Jul 2019 00:27:33 +0000 (00:27 +0000)]
[FileCollector] test: disable the directory entry collection checks on windows

Looks like one of the entries isn't found on windows. I'm investigating why.
In the meantime, I'll disable this part of the test on windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367280 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[FileCollector] Add a VFS that records FS accesses using the FileCollector
Alex Lorenz [Mon, 29 Jul 2019 23:38:30 +0000 (23:38 +0000)]
[FileCollector] Add a VFS that records FS accesses using the FileCollector

This patch adds a VFS that can be overlaid on top of another VFS
to record file system accesses using the FileCollector.
This can help to gather files that are needed for reproducers.

Differential Revision: https://reviews.llvm.org/D65411

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367278 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[NFC] avoid AlignedCharArray in LLVM
JF Bastien [Mon, 29 Jul 2019 23:37:48 +0000 (23:37 +0000)]
[NFC] avoid AlignedCharArray in LLVM

As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367277 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-lipo] Fix test on Windows
Anusha Basana [Mon, 29 Jul 2019 22:27:27 +0000 (22:27 +0000)]
[llvm-lipo] Fix test on Windows

Error message outputs with lowercase on Windows.
Made test work on Widnows.

For example:
llvm-lipo: error: 'i386': no such file or directory

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367266 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[clang-tidy]: Google: new check 'google-upgrade-googletest-case'
Eric Fiselier [Mon, 29 Jul 2019 21:38:56 +0000 (21:38 +0000)]
[clang-tidy]: Google: new check 'google-upgrade-googletest-case'

Introduce a new check to upgrade user code based on API changes in Googletest.

The check finds uses of old Googletest APIs with "case" in their name and replaces them with the new APIs named with "suite".

Patch by Alex Strelnikov (strel@google.com)
Reviewed as D62977.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367263 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogit-llvm: Restore compatibility with git 1.8.3.
James Y Knight [Mon, 29 Jul 2019 21:01:11 +0000 (21:01 +0000)]
git-llvm: Restore compatibility with git 1.8.3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367259 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[IR] Consolidate fixed metadata kind definitions (NFC)
Vedant Kumar [Mon, 29 Jul 2019 20:24:20 +0000 (20:24 +0000)]
[IR] Consolidate fixed metadata kind definitions (NFC)

Put the list of fixed metadata kinds in one place.

Testing: check-llvm with+without LLVM_ENABLE_MODULES=On

Differential Revision: https://reviews.llvm.org/D64437

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367257 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[PowerPC][NFC]Fix a typo in comment.
Jinsong Ji [Mon, 29 Jul 2019 19:27:54 +0000 (19:27 +0000)]
[PowerPC][NFC]Fix a typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367252 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC
Craig Topper [Mon, 29 Jul 2019 19:22:51 +0000 (19:22 +0000)]
[X86] Fix typo in comment. We're looking at a right shift not a left shift. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367251 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[llvm-lipo] Implement -replace
Anusha Basana [Mon, 29 Jul 2019 18:46:34 +0000 (18:46 +0000)]
[llvm-lipo] Implement -replace

Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.

Differential Revision: https://reviews.llvm.org/D65247

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367248 91177308-0d34-0410-b5e6-96231b3b80d8

5 years agogn build: Merge r367071
Vitaly Buka [Mon, 29 Jul 2019 17:48:02 +0000 (17:48 +0000)]
gn build: Merge r367071

llvm-svn: 366289

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367245 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option
David Bolvansky [Mon, 29 Jul 2019 17:41:00 +0000 (17:41 +0000)]
[UpdateTestChecks] Emit warning when invalid value for -check-prefix(es) option

Summary:
The script is silent for the following issue:
FileCheck %s -check-prefix=CHECK,POPCOUNT

FileCheck will catch it later, but I think we can warn here too.

Now it warns:
 ./update_llc_test_checks.py file.ll
WARNING: Supplied prefix 'CHECK,POPCOUNT' is invalid. Prefix must contain only alphanumeric characters, hyphens and underscores. Did you mean --check-prefixes=CHECK,POPCOUNT?

Reviewers: lebedev.ri, spatel, RKSimon, craig.topper, nikic, gbedwell

Reviewed By: RKSimon

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367244 91177308-0d34-0410-b5e6-96231b3b80d8

5 years ago[Remarks] Update error message format string
Francis Visoiu Mistrih [Mon, 29 Jul 2019 17:40:34 +0000 (17:40 +0000)]
[Remarks] Update error message format string

All the clang-cmake-armv{7,8} bots are failing this test. This is an
attempt to fix this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367243 91177308-0d34-0410-b5e6-96231b3b80d8