]> granicus.if.org Git - llvm/log
llvm
5 years ago[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
Simon Pilgrim [Tue, 6 Aug 2019 12:41:29 +0000 (12:41 +0000)]
[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity

If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe.

Exposed by an incoming patch.

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

5 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Tue, 6 Aug 2019 12:15:18 +0000 (12:15 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

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

5 years agoTry to unbreak buildbots after r368014
Igor Kudrin [Tue, 6 Aug 2019 11:12:13 +0000 (11:12 +0000)]
Try to unbreak buildbots after r368014

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

5 years ago[X86][SSE] Enable min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 11:00:34 +0000 (11:00 +0000)]
[X86][SSE] Enable min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

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

5 years ago[X86][SSE] Add tests for min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 10:52:44 +0000 (10:52 +0000)]
[X86][SSE] Add tests for min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

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

5 years agoSwitch LLVM to use 64-bit offsets (2/5)
Igor Kudrin [Tue, 6 Aug 2019 10:49:40 +0000 (10:49 +0000)]
Switch LLVM to use 64-bit offsets (2/5)

This updates all libraries and tools in LLVM Core to use 64-bit offsets
which directly or indirectly come to DataExtractor.

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

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

5 years agoSupport 64-bit offsets in utility classes (1/5)
Igor Kudrin [Tue, 6 Aug 2019 10:47:20 +0000 (10:47 +0000)]
Support 64-bit offsets in utility classes (1/5)

Using 64-bit offsets is required to fully implement 64-bit DWARF.
As these classes are used in many different libraries they should
temporarily support both 32- and 64-bit offsets.

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

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

5 years ago[Strict FP] Allow custom operation actions
Ulrich Weigand [Tue, 6 Aug 2019 10:43:13 +0000 (10:43 +0000)]
[Strict FP] Allow custom operation actions

This patch changes the DAG legalizer to respect the operation actions
set by the target for strict floating-point operations. (Currently, the
legalizer will usually fall back to mutate to the non-strict action
(which is assumed to be legal), and only skip mutation if the strict
operation is marked legal.)

With this patch, if whenever a strict operation is marked as Legal or
Custom, it is passed to the target as usual. Only if it is marked as
Expand will the legalizer attempt to mutate to the non-strict operation.
Note that this will now fail if the non-strict operation is itself
marked as Custom -- the target will have to provide a Custom definition
for the strict operation then as well.

Reviewed By: hfinkel

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

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

5 years agoChange two unnecessary uses of llvm::size(C) to C.size()
Fangrui Song [Tue, 6 Aug 2019 10:24:36 +0000 (10:24 +0000)]
Change two unnecessary uses of llvm::size(C) to C.size()

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

5 years ago[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER
Cullen Rhodes [Tue, 6 Aug 2019 09:46:13 +0000 (09:46 +0000)]
[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER

Summary:
Before this patch MGATHER/MSCATTER is capable of representing all
common addressing modes, but only when illegal types are used.
This patch adds an IndexType property so more representations
are available when using legal types only.

Original modes:
 vector of bases
 base + vector of signed scaled offsets

New modes:
 base + vector of signed unscaled offsets
 base + vector of unsigned scaled offsets
 base + vector of unsigned unscaled offsets

The current behaviour of addressing modes for gather/scatter remains
unchanged.

Patch by Paul Walker.

Reviewed By: craig.topper

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

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

5 years ago[UpdateTestChecks] Fix an incorrect %s added in r368006
Fangrui Song [Tue, 6 Aug 2019 09:44:18 +0000 (09:44 +0000)]
[UpdateTestChecks] Fix an incorrect %s added in r368006

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

5 years ago[UpdateTestChecks] Apply some string concatenation cleanup
Fangrui Song [Tue, 6 Aug 2019 09:42:00 +0000 (09:42 +0000)]
[UpdateTestChecks] Apply some string concatenation cleanup

Some were what I suggested in D65610.

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

5 years agotest-release.sh: Reorder sed commands for the binary comparison
Hans Wennborg [Tue, 6 Aug 2019 09:30:10 +0000 (09:30 +0000)]
test-release.sh: Reorder sed commands for the binary comparison

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

5 years agoAArch64: use xzr/wzr for constant 0 in GlobalISel.
Tim Northover [Tue, 6 Aug 2019 09:18:41 +0000 (09:18 +0000)]
AArch64: use xzr/wzr for constant 0 in GlobalISel.

COPYs from xzr and wzr can often be folded away entirely during register
allocation, unlike a movz.

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

5 years ago[LLVM][Alignment] Introduce Alignment In Attributes
Guillaume Chatelet [Tue, 6 Aug 2019 09:16:33 +0000 (09:16 +0000)]
[LLVM][Alignment] Introduce Alignment In Attributes

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: jfb

Subscribers: hiraditya, dexonsmith, llvm-commits, courbet

Tags: #llvm

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

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

5 years ago[LLVM][Alignment] Introduce Alignment In GlobalObject
Guillaume Chatelet [Tue, 6 Aug 2019 09:03:21 +0000 (09:03 +0000)]
[LLVM][Alignment] Introduce Alignment In GlobalObject

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: jfb

Subscribers: hiraditya, dexonsmith, llvm-commits, courbet

Tags: #llvm

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

Address comments

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

5 years agoRevert r367941 "Add a note to the release not about a potentially breaking optimization"
Hans Wennborg [Tue, 6 Aug 2019 08:32:33 +0000 (08:32 +0000)]
Revert r367941 "Add a note to the release not about a potentially breaking optimization"

The note was moved to the release_90 branch in r367997.

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

5 years ago[llvm/test/Object] - Cleanup and move out the yaml2obj tests.
George Rimar [Tue, 6 Aug 2019 08:02:25 +0000 (08:02 +0000)]
[llvm/test/Object] - Cleanup and move out the yaml2obj tests.

There are multiple yaml2obj-* tests in llvm/test/Object
folder. This is not correct place to have them and my intention
was to move them out to test\tools\yaml2obj folder. I reviewed
them, made some changes, and my comments are below.

For all tests I:

Added comments when needed.
Moved them from llvm/test/Object to yaml2obj tests.
Another changes performed:

1) yaml2obj-invalid.yaml. It was a test for an invalid YAML input.
I just moved it.

2) yaml2obj-coff-multi-doc.test/yaml2obj-elf-multi-doc.test:
these were a tests for testing --docnum=x functionality,
one was for COFF and one for ELF. I merged them into one.

3) yaml2obj-elf-bits-endian.test:
I removed its 4 YAML inputs (merged into the main test).

4) yaml2obj-readobj.test:
This file has a long history. It was added to check the
"parsing of header charactestics" initially. Then was used to test
how yaml2obj writes the relocations. Then was upgraded to check how
yaml2obj handle "-o" option. I think it should be heavily splitted
and refactored in a separate patch. For now I leaved it as is, but restyled
to reduce the changes in a follow-ups.

5) yaml2obj-elf-alignment.yaml: its intention was to check we
can set sh-addralign field. I moved, renamed (to elf-sh-addralign.yaml)
and updated this test.

6) yaml2obj-elf-file-headers.yaml: I removed it.
It's intention was to check that
yaml2obj handles OS/ABI and ELF type (e.g Relocatable).
We are testing this already, for example in D64800. We might want
to add a better (more complete) test, but keeping the existent test
does not have much sense I think.

7) yaml2obj-elf-file-headers-with-e_flags.yaml: I would describe its intention
as "testing MIPS e_flags". It is far from being complete and tests only
a few flags. I leaved it alone for now.

8) yaml2obj-elf-rel.yaml: its intention is to check the MIPS32 relocations.
We have a version for MIPS64 here: test\Object\Mips\elf-mips64-rel.yaml
Seems them both are incomplete. I leaved them alone for now.

9) yaml2obj-elf-rel-noref.yaml: was introduced to check the support of arm32
R_ARM_V4BX relocatiion. I leaved it alone for now.

10) yaml2obj-elf-section-basic.yaml: it just checked that we are able to recognise
trivial fields like section 'Name', 'Type', 'Flags' and others. All of our yaml2obj
tests are heavily using it. I just removed this test.

11) yaml2obj-elf-section-invalid-size.yaml: its intention was to check the
"Section size must be greater than or equal to the content size" error.
I moved this test to `tools\yaml2obj\section-size-content.yaml'

12) yaml2obj-elf-symbol-basic.yaml: its intention seems was to support declarations
of the symbols in yaml2obj. I removed it. We use this in almost each test we already have.

13) yaml2obj-elf-symbol-LocalGlobalWeak.yaml: its intention was to check that we can
declare different symbol bindings. I moved it to tools\yaml2obj\elf-symbol-binding.yaml.

14) yaml2obj-coff-invalid-alignment.test: check that error is reported for a too large coff
section alignment. Moved it to tools\yaml2obj\coff-invalid-alignment.test

15) yaml2obj-elf-symbol-visibility.yaml: tests ELF symbols visibility. I improved it and
moved to tools\yaml2obj\elf-symbol-visibility.yaml and tools\obj2yaml\elf-symbol-visibility.yaml

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

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

5 years agoUse "isa" since the variable isn't used.
Bill Wendling [Tue, 6 Aug 2019 07:27:26 +0000 (07:27 +0000)]
Use "isa" since the variable isn't used.

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

5 years ago[LV][NFC] Share the LV illegality reporting with LoopVectorize.
Hideki Saito [Tue, 6 Aug 2019 06:08:48 +0000 (06:08 +0000)]
[LV][NFC] Share the LV illegality reporting with LoopVectorize.

Reviewers: hsaito, fhahn, rengolin

Reviewed By: rengolin

Patch by psamolysov, thanks!

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

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

5 years agoCodeGen: Migration to using Register
Matt Arsenault [Tue, 6 Aug 2019 03:59:31 +0000 (03:59 +0000)]
CodeGen: Migration to using Register

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

5 years agogn build: Add AMDGPU target
Nico Weber [Tue, 6 Aug 2019 02:25:49 +0000 (02:25 +0000)]
gn build: Add AMDGPU target

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

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

5 years agogn build: Leave a comment why "-gen-searchable-table" tablegen()s are not called...
Nico Weber [Tue, 6 Aug 2019 02:21:50 +0000 (02:21 +0000)]
gn build: Leave a comment why "-gen-searchable-table" tablegen()s are not called FooGenSearchableTable

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

5 years agogn build: Merge r367917
Nico Weber [Tue, 6 Aug 2019 02:17:05 +0000 (02:17 +0000)]
gn build: Merge r367917

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

5 years agoRe-commit: [AMDGPU] Use S_DENORM_MODE for gfx10
Austin Kerbow [Tue, 6 Aug 2019 02:16:11 +0000 (02:16 +0000)]
Re-commit: [AMDGPU] Use S_DENORM_MODE for gfx10

Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.

Reviewers: arsenm, rampitec

Reviewed By: arsenm, rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoFix another MSVC issue after 367965
Daniel Sanders [Tue, 6 Aug 2019 01:16:29 +0000 (01:16 +0000)]
Fix another MSVC issue after 367965

Repeated the fix for MCRegister in Register

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

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

5 years ago[Attributor][NFC] Outline common pattern into helper method
Johannes Doerfert [Tue, 6 Aug 2019 00:55:11 +0000 (00:55 +0000)]
[Attributor][NFC] Outline common pattern into helper method

This helper will also allow to also place logic to determine if an
abstract attribute is necessary in the first place.

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

5 years agoRe-commit Register/MCRegister: Add conversion operators to avoid use of implicit...
Daniel Sanders [Tue, 6 Aug 2019 00:53:47 +0000 (00:53 +0000)]
Re-commit Register/MCRegister: Add conversion operators to avoid use of implicit convert to unsigned. NFC

Added two more conversions to satisfy MSVC and moved the declaration of
MCPhysReg to MCRegister.h to enable that

This reverts r367932 (git commit eac86ec25f5cd5d7a973c913d3c2ca8c90b24115)

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

5 years ago[Attributor][Fix] Add const qualifier
Johannes Doerfert [Tue, 6 Aug 2019 00:46:02 +0000 (00:46 +0000)]
[Attributor][Fix] Add const qualifier

I forgot to add this as part of the last commit.

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

5 years ago[Attributor] Provide a generic interface to check live instructions
Johannes Doerfert [Tue, 6 Aug 2019 00:32:43 +0000 (00:32 +0000)]
[Attributor] Provide a generic interface to check live instructions

Summary:
Similar to `Attributor::checkForAllCallSites`, we now provide such
functionality for instructions of a certain opcode through
`Attributor::checkForAllInstructions` and the convenient wrapper
`Attributor::checkForAllCallLikeInstructions`. This cleans up code,
avoids duplication, and simplifies the usage of liveness information.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years ago[RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions
Shiva Chen [Tue, 6 Aug 2019 00:24:00 +0000 (00:24 +0000)]
[RISCV] Custom legalize i32 operations for RV64 to reduce signed extensions

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

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

5 years agoSilence ubsan after r367926.
Peter Collingbourne [Tue, 6 Aug 2019 00:21:30 +0000 (00:21 +0000)]
Silence ubsan after r367926.

Fixes e.g.
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-ubsan/builds/14273

We can't left shift here because left shifting of a negative number is UB.
The same doesn't apply to unsigned arithmetic, but switching to unsigned
doesn't appear to stop ubsan from complaining, so we need to mask out the
high bits.

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

5 years ago[NFC] Remove useless static
JF Bastien [Mon, 5 Aug 2019 23:52:38 +0000 (23:52 +0000)]
[NFC] Remove useless static

The function is already inline in the header, static isn't what we want.

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

5 years agoReverting D65760/r367944 due to buildbot failure.
Puyan Lotfi [Mon, 5 Aug 2019 23:47:07 +0000 (23:47 +0000)]
Reverting D65760/r367944 due to buildbot failure.

http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/15952/steps/build/logs/stdio

JITTargetMachineBuilder.cpp fails to build.

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

5 years ago[Attributor] Introduce the IRAttribute helper struct
Johannes Doerfert [Mon, 5 Aug 2019 23:35:12 +0000 (23:35 +0000)]
[Attributor] Introduce the IRAttribute helper struct

Summary:
Certain properties, e.g., an AttrKind, are not shared among all abstract
attributes. This patch extracts the functionality into a helper struct.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years ago[Attributor] Make abstract attributes stateless
Johannes Doerfert [Mon, 5 Aug 2019 23:32:31 +0000 (23:32 +0000)]
[Attributor] Make abstract attributes stateless

To remove boilerplate, mostly passing through values to the
AbstractAttriubute base class, we extract the state into an IRPosition
helper. There is no function change intended but the IRPosition struct
will provide more functionality down the line.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, jfb, llvm-commits

Tags: #llvm

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

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

5 years ago[Attributor] Use proper ID for attribute lookup
Johannes Doerfert [Mon, 5 Aug 2019 23:30:01 +0000 (23:30 +0000)]
[Attributor] Use proper ID for attribute lookup

Summary:
The new scheme is similar to the pass manager and dyn_cast scheme where
we identify classes by the address of a static member. This is better
than the old scheme in which we had to "invent" new Attributor enums if
there was no corresponding one.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years ago[Attributor][NFCI] Avoid duplication of the InformationCache reference
Johannes Doerfert [Mon, 5 Aug 2019 23:26:06 +0000 (23:26 +0000)]
[Attributor][NFCI] Avoid duplication of the InformationCache reference

Summary:
Instead of storing the reference to the InformationCache we now pass it
whenever it might be needed.

Reviewers: sstefan1, uenoku

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years ago[Attributor] Deduce the "no-return" attribute for functions
Johannes Doerfert [Mon, 5 Aug 2019 23:22:05 +0000 (23:22 +0000)]
[Attributor] Deduce the "no-return" attribute for functions

A function is "no-return" if we never reach a return instruction, either
because there are none or the ones that exist are dead.

Test have been adjusted:
  - either noreturn was added, or
  - noreturn was avoided by modifying the code.

The new noreturn_{sync,async} test make sure we do handle invoke
instructions with a noreturn (and potentially nowunwind) callee
correctly, even in the presence of potential asynchronous exceptions.

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

5 years ago[GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler()
Amara Emerson [Mon, 5 Aug 2019 23:05:28 +0000 (23:05 +0000)]
[GlobalISel][CallLowering] Rename isArgumentHandler() -> isIncomingArgumentHandler()

Previous name and comment incorrectly implied it was just for formal arg handlers,
which is not true.

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

5 years ago[ORC] Add CPU name and sub-target features to detectHost
Diego Caballero [Mon, 5 Aug 2019 23:02:12 +0000 (23:02 +0000)]
[ORC] Add CPU name and sub-target features to detectHost

This commit adds host CPU name and sub-target features to the
`JITTargetMachineBuilder` created by `JITTargetMachineBuilder::detectHost()`.

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

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

5 years ago[llvm-readelf] Support dumping of stack sizes sections with readelf --stack-sizes
Wolfgang Pieb [Mon, 5 Aug 2019 22:47:07 +0000 (22:47 +0000)]
[llvm-readelf] Support dumping of stack sizes sections with readelf --stack-sizes

Reviewers: jhenderson, grimar, rupprecht

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

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

5 years agoAdd a note to the release not about a potentially breaking optimization
Philip Reames [Mon, 5 Aug 2019 22:34:59 +0000 (22:34 +0000)]
Add a note to the release not about a potentially breaking optimization

This has come up twice already (once in pr42763 and once in the commit thread), so give warning of a new way in which UB can result in unexpected program behavior.

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

5 years agoAdd "REQUIRES: x86-registered-target" to test.
Peter Collingbourne [Mon, 5 Aug 2019 21:44:45 +0000 (21:44 +0000)]
Add "REQUIRES: x86-registered-target" to test.

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

5 years ago[WebAssembly] Fix conflict between ret legalization and sjlj
Keno Fischer [Mon, 5 Aug 2019 21:36:09 +0000 (21:36 +0000)]
[WebAssembly] Fix conflict between ret legalization and sjlj

Summary:
When the WebAssembly backend encounters a return type that doesn't
fit within i32, SelectionDAG performs sret demotion, adding an
additional argument to the start of the function that contains
a pointer to an sret buffer to use instead. However, this conflicts
with the emscripten sjlj lowering pass. There we translate calls like:

```
call {i32, i32} @foo()
```

into (in pseudo-llvm)
```
%addr = @foo
call {i32, i32} @__invoke_{i32,i32}(%addr)
```

i.e. we perform an indirect call through an extra function.
However, the sret transform now transforms this into
the equivalent of
```
        %addr = @foo
        %sret = alloca {i32, i32}
        call {i32, i32} @__invoke_{i32,i32}(%sret, %addr)
```
(while simultaneously translation the implementation of @foo as well).
Unfortunately, this doesn't work out. The __invoke_ ABI expected
the function address to be the first argument, causing crashes.

There is several possible ways to fix this:
1. Implementing the sret rewrite at the IR level as well and performing
   it as part of lowering to __invoke
2. Fixing the wasm backend to recognize that __invoke has a special ABI
3. A change to the binaryen/emscripten ABI to recognize this situation

This revision implements the middle option, teaching the backend to
treat __invoke_ functions specially in sret lowering. This is achieved
by
1) Introducing a new CallingConv ID for invoke functions
2) When this CallingConv ID is seen in the backend and the first argument
   is marked as sret (a function pointer would never be marked as sret),
   swapping the first two arguments.

Reviewed By: tlively, aheejin
Differential Revision: https://reviews.llvm.org/D65463

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

5 years ago[Attributor][Fix] Do not remove instructions during manifestation
Johannes Doerfert [Mon, 5 Aug 2019 21:35:02 +0000 (21:35 +0000)]
[Attributor][Fix] Do not remove instructions during manifestation

When we remove instructions cached references could still be live. This
patch avoids removing invoke instructions that are replaced by calls and
instead keeps them around but in a dead block.

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

5 years agoRevert Register/MCRegister: Add conversion operators to avoid use of implicit convert...
Daniel Sanders [Mon, 5 Aug 2019 21:34:45 +0000 (21:34 +0000)]
Revert Register/MCRegister: Add conversion operators to avoid use of implicit convert to unsigned. NFC

MSVC finds ambiguity where clang doesn't and it looks like it's not going to be an easy fix
Reverting while I figure out how to fix it

This reverts r367916 (git commit aa15ec3c231717826e3c262b5ef9813d2fb5cadb)
This reverts r367920 (git commit 5d14efe279b5db9f4746ff834ab5c70e249d3871)

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

5 years ago[Attributor][Fix] Keep invokes if handlers catch asynchronous exceptions
Johannes Doerfert [Mon, 5 Aug 2019 21:34:45 +0000 (21:34 +0000)]
[Attributor][Fix] Keep invokes if handlers catch asynchronous exceptions

Similar to other places where we transform invokes to calls we need to
be careful if the handler (=personality) can catch asynchronous
exceptions as they are not modeled as part of nounwind.

This is tested with D59978.

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

5 years agoBMI2 support is indicated in bit eight of EBX, not nine.
Eric Christopher [Mon, 5 Aug 2019 21:25:59 +0000 (21:25 +0000)]
BMI2 support is indicated in bit eight of EBX, not nine.
See Intel SDM, Vol 2A, Table 3-8:
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-2a-manual.pdf#page=296

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

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

5 years agollvm-symbolizer: Untag addresses in object files by default.
Peter Collingbourne [Mon, 5 Aug 2019 20:59:25 +0000 (20:59 +0000)]
llvm-symbolizer: Untag addresses in object files by default.

Any addresses that we pass to llvm-symbolizer are going to be untagged,
while any HWASAN instrumented globals are going to be tagged in the
symbol table. Therefore we need to untag the addresses before using them.

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

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

5 years ago[ORC] Work around broken GCC/libstdc++ by adding an explicit conversion.
Lang Hames [Mon, 5 Aug 2019 20:30:35 +0000 (20:30 +0000)]
[ORC] Work around broken GCC/libstdc++ by adding an explicit conversion.

This should fix the bots that have been failing due to r367712.

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

5 years agoFix MSVC error after r367916
Daniel Sanders [Mon, 5 Aug 2019 20:03:43 +0000 (20:03 +0000)]
Fix MSVC error after r367916

It seems that MSVC sees ambiguity between the operator==()'s where clang
doesn't

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

5 years ago[AArch64][GlobalISel] Inline tiny memcpy et al at -O0.
Amara Emerson [Mon, 5 Aug 2019 20:02:52 +0000 (20:02 +0000)]
[AArch64][GlobalISel] Inline tiny memcpy et al at -O0.

FastISel already does this since the initial arm64 port was upstreamed, so
it seems there are no issues with doing this at -O0 for very small memcpys.

Gives a 0.2% geomean code size improvement on CTMark.

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

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

5 years agoRegister/MCRegister: Add conversion operators to avoid use of implicit convert to...
Daniel Sanders [Mon, 5 Aug 2019 19:50:25 +0000 (19:50 +0000)]
Register/MCRegister: Add conversion operators to avoid use of implicit convert to unsigned. NFC

Summary:
This has no functional effect but makes it more obvious which parts of the
compiler do not use Register/MCRegister when you mark the implicit conversion
deprecated.

Implicit conversions for comparisons accounted for ~20% (~3k of ~13k) of
the implicit conversions when I first measured it. I haven't maintained
those numbers as other patches have landed though so it may be out of date.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: wdng, llvm-commits

Tags: #llvm

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

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

5 years agoRevert "Try to fix failing AMDGPU disasm test, both Lin/Win agree this is 0 not 0x0"
Dmitri Gribenko [Mon, 5 Aug 2019 19:07:09 +0000 (19:07 +0000)]
Revert "Try to fix failing AMDGPU disasm test, both Lin/Win agree this is 0 not 0x0"

This reverts commit r367907, it broke the test.

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

5 years ago[llvm-lipo] Implement -segalign
Anusha Basana [Mon, 5 Aug 2019 19:06:55 +0000 (19:06 +0000)]
[llvm-lipo] Implement -segalign

Sets section alignments of the specified architecture slices to the
alignment values.
Alignment values are hexadecimal values that are powers of 2.

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

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

5 years agoTry to fix failing AMDGPU disasm test, both Lin/Win agree this is 0 not 0x0
Reid Kleckner [Mon, 5 Aug 2019 18:46:26 +0000 (18:46 +0000)]
Try to fix failing AMDGPU disasm test, both Lin/Win agree this is 0 not 0x0

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

5 years agoRevert "[AMDGPU] Use S_DENORM_MODE for gfx10"
Dmitri Gribenko [Mon, 5 Aug 2019 18:36:43 +0000 (18:36 +0000)]
Revert "[AMDGPU] Use S_DENORM_MODE for gfx10"

This reverts commit r367882. It broke the test
MC/Disassembler/AMDGPU/gfx10_dasm_all.txt.

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

5 years ago[libc++] Take 2: Integrate the PSTL into libc++
Louis Dionne [Mon, 5 Aug 2019 18:29:14 +0000 (18:29 +0000)]
[libc++] Take 2: Integrate the PSTL into libc++

Summary:
This commit allows specifying LIBCXX_ENABLE_PARALLEL_ALGORITHMS when
configuring libc++ in CMake. When that option is enabled, libc++ will
assume that the PSTL can be found somewhere on the CMake module path,
and it will provide the C++17 parallel algorithms based on the PSTL
(that is assumed to be available).

The commit also adds support for running the PSTL tests as part of
the libc++ test suite.

The first attempt to commit this failed because it exposed a bug in the
tests for modules. Now that this has been fixed, it should be safe to
commit this.

Reviewers: EricWF

Subscribers: mgorny, christof, jkorous, dexonsmith, libcxx-commits, mclow.lists, EricWF

Tags: #libc

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

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

5 years ago[X86] Enable -x86-experimental-vector-widening-legalization by default.
Craig Topper [Mon, 5 Aug 2019 18:25:36 +0000 (18:25 +0000)]
[X86] Enable -x86-experimental-vector-widening-legalization by default.

This patch changes our defualt legalization behavior for 16, 32, and
64 bit vectors with i8/i16/i32/i64 scalar types from promotion to
widening. For example, v8i8 will now be widened to v16i8 instead of
promoted to v8i16. This keeps the elements widths the same and pads
with undef elements. We believe this is a better legalization strategy.
But it carries some issues due to the fragmented vector ISA. For
example, i8 shifts and multiplies get widened and then later have
to be promoted/split into vXi16 vectors.

This has the potential to cause regressions so we wanted to get
it in early in the 10.0 cycle so we have plenty of time to
address them.

Next steps will be to merge tests that explicitly test the command
line option. And then we can remove the option and its associated
code.

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

5 years agoRobustify update_test_checks.py to non-autogened tests, and add a mode to skip non...
Philip Reames [Mon, 5 Aug 2019 18:25:08 +0000 (18:25 +0000)]
Robustify update_test_checks.py to non-autogened tests, and add a mode to skip non-autogenerated ones

Intended use case is:
./utils/update_test_checks.py test/Transform/PassDir/* --update-only
(i.e. rapidly be able to see changes in autogened filed, before handing non-autogened tests individually)

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

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

5 years agoFix build when both gtest death tests and LLVM_NODISCARD are available.
David Blaikie [Mon, 5 Aug 2019 18:12:50 +0000 (18:12 +0000)]
Fix build when both gtest death tests and LLVM_NODISCARD are available.

(matching r367495)

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

5 years ago[AArch64] Expand bcmp() for small block lengths
Evandro Menezes [Mon, 5 Aug 2019 18:09:14 +0000 (18:09 +0000)]
[AArch64] Expand bcmp() for small block lengths

Patch D56593 by @courbet results in calls to `bcmp()` in some cases, should
the target support the it.  Unless `TTI::MemCmpExpansionOptions()`
is overridden by the target.

In a proprietary benchmark we see a performance drop of about 12% on PNG
compression before this patch, though it passes all tests.

This patch mirrors X86 for AArch64 and initializes
`TTI::MemCmpExpansionOptions()` to then expand calls to `bcmp()` when
appropriate.  No tuning of the parameters was performed, but, at this point,
it's enough to recover the performance drop above.

This problem also exists on ARM.  Once a consensus is reached for AArch64, we
can work to fix ARM as well.

Authors:
- Evandro Menezes (@evandro) <e.menezes@samsung.com>
- Brian Rzycki (@brzycki) <b.rzycki@samsung.com>

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

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

5 years ago[InstCombine][NFC] Tests for non-canonical clamp-like pattern
Roman Lebedev [Mon, 5 Aug 2019 18:01:22 +0000 (18:01 +0000)]
[InstCombine][NFC] Tests for non-canonical clamp-like pattern

As discussed in https://reviews.llvm.org/D65148#1607019

The canonical fold is: https://rise4fun.com/Alive/FKe

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

5 years agoNFC. Documenting Native tablegen dependency
Chris Bieneman [Mon, 5 Aug 2019 18:00:55 +0000 (18:00 +0000)]
NFC. Documenting Native tablegen dependency

Adding documentation explaining why this dependency is required and should not be removed again.

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

5 years agoNATIVE tablegen needs to depend on target tablegen
Chris Bieneman [Mon, 5 Aug 2019 17:50:08 +0000 (17:50 +0000)]
NATIVE tablegen needs to depend on target tablegen

This dependency was removed in  r357486, which has lead to a stream of difficult to diagnose bugs.

Without this dependency, when building with `LLVM_OPTIMIZED_TABLEGEN=On` the native tablegen executible may not be rebuilt at all, and often won't get rebuilt before targets that use the tablegen headers. In the best case this results in a build-time failure, in the worst case it results in runtime failures.

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

5 years ago[AArch64] Set preferred function alignment to 16 bytes on Neoverse N1
Pablo Barrio [Mon, 5 Aug 2019 17:38:58 +0000 (17:38 +0000)]
[AArch64] Set preferred function alignment to 16 bytes on Neoverse N1

Summary:
The Arm Neoverse N1 Software Optimization Guide [1], Section "4.8 Branch
instruction alignment" states:

"Consider aligning subroutine entry points and branch targets to 32B
boundaries, within the bounds of the code-density requirements of the
program."

This patch sets the preferred function alignment on Neoverse N1 to 2^4=16B.
This was already the case in some of the latest Cortex-A CPUs. Benchmarking
in previous Cortex-A CPUs suggested that 16B alignment is already better
than the default. See commit d04ee305.

The reason we don't set it to 32B right now (as the optimisation guide
suggests) is that this will impact code size and perhaps the instruction
cache performance. Therefore we need benchmark numbers first.

I have also added testing for A75 and A76 that we were missing.

[1] https://developer.arm.com/docs/swog309707/latest

Reviewers: fhahn, greened, samparker, dmgreen

Reviewed By: dmgreen

Subscribers: dmgreen, javed.absar, kristof.beyls, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] combine mul+shl separated by zext
Sanjay Patel [Mon, 5 Aug 2019 16:59:58 +0000 (16:59 +0000)]
[InstCombine] combine mul+shl separated by zext

This appears to slightly help patterns similar to what's
shown in PR42874:
https://bugs.llvm.org/show_bug.cgi?id=42874
...but not in the way requested.

That fix will require some later IR and/or backend pass to
decompose multiply/shifts into something more optimal per
target. Those transforms already exist in some basic forms,
but probably need enhancing to catch more cases.

https://rise4fun.com/Alive/Qzv2

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

5 years agogn build: run "gn format"
Nico Weber [Mon, 5 Aug 2019 16:55:04 +0000 (16:55 +0000)]
gn build: run "gn format"

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

5 years ago[llvm-readobj][test] Add llvm-readobj style test cases for r367878
Jordan Rupprecht [Mon, 5 Aug 2019 16:26:48 +0000 (16:26 +0000)]
[llvm-readobj][test] Add llvm-readobj style test cases for r367878

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

5 years ago[InstCombine] add tests for shl+mul; NFC
Sanjay Patel [Mon, 5 Aug 2019 16:17:07 +0000 (16:17 +0000)]
[InstCombine] add tests for shl+mul; NFC

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

5 years ago[AMDGPU] Use S_DENORM_MODE for gfx10
Austin Kerbow [Mon, 5 Aug 2019 16:09:49 +0000 (16:09 +0000)]
[AMDGPU] Use S_DENORM_MODE for gfx10

Summary: During fdiv32 lowering use S_DENORM_MODE to select denorm mode in gfx10.

Reviewers: arsenm, rampitec

Reviewed By: arsenm, rampitec

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoAMDGPU/LoadStoreOptimizer: Set the correct offset whem merging MMOs
Tom Stellard [Mon, 5 Aug 2019 16:08:44 +0000 (16:08 +0000)]
AMDGPU/LoadStoreOptimizer: Set the correct offset whem merging MMOs

Summary:
This is a follow up to r367237.  MachineFunction::getMachineMemOperand()
adds the offset parameter to the existing offset instead of resetting it.
So we need to reset the offset to the correct value after calling this
function.

Reviewers: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] add extra use constraint for shl-zext fold
Sanjay Patel [Mon, 5 Aug 2019 16:04:07 +0000 (16:04 +0000)]
[InstCombine] add extra use constraint for shl-zext fold

As the test shows, we can end up with more instructions than
we started with if we don't include the extra-use check.

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

5 years agoAMDGPU: Correct behavior of f16 buffer loads
Matt Arsenault [Mon, 5 Aug 2019 15:59:07 +0000 (15:59 +0000)]
AMDGPU: Correct behavior of f16 buffer loads

Don't assume format loads for f16. Also fixes support for targets
without i16.

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

5 years ago[llvm-readelf] Fix core note descriptions
Jordan Rupprecht [Mon, 5 Aug 2019 15:43:20 +0000 (15:43 +0000)]
[llvm-readelf] Fix core note descriptions

Summary:
Core files have different descriptions for note values. llvm-readelf currently prints the generic note type, which is wrong when using it to read a core file.

To verify the constants/strings, see:
Values: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/common.h;h=75c4fb7e9d7c0f780d635ac305f579546b7b071b;hb=HEAD#l571
Strings: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/readelf.c;h=c31a5c1266b7bb62a485895b01b49e1f832ade35;hb=HEAD#l16881

Note: this does not handle printing the note data for NT_FILE, it just fixes the descriptions.

Reviewers: MaskRay

Reviewed By: MaskRay

Subscribers: labath, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] add test for shl-zext with extra use; NFC
Sanjay Patel [Mon, 5 Aug 2019 15:25:07 +0000 (15:25 +0000)]
[InstCombine] add test for shl-zext with extra use; NFC

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

5 years agoAMDGPU: Correct behavior of f16/i16 non-format store intrinsics
Matt Arsenault [Mon, 5 Aug 2019 14:57:59 +0000 (14:57 +0000)]
AMDGPU: Correct behavior of f16/i16 non-format store intrinsics

This was switching to use a format store for a non-format store for
f16 types. Also fixes i16/f16 stores on targets without legal f16.

The corresponding loads also need to be fixed.

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

5 years agoAMDGPU/GlobalISel: Alternative mappings for constants
Matt Arsenault [Mon, 5 Aug 2019 14:40:26 +0000 (14:40 +0000)]
AMDGPU/GlobalISel: Alternative mappings for constants

Without context we assume SGPR. Allowing VGPR constants theoretically
helps avoid a copy. This seems to not actually work now, and the
choice isn't based on the use bank.

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

5 years agoAMDGPU/GlobalISel: Don't reject shader types
Matt Arsenault [Mon, 5 Aug 2019 14:40:23 +0000 (14:40 +0000)]
AMDGPU/GlobalISel: Don't reject shader types

I'm not sure what complications these present, but the current
argument lowering is pretty much directly copied from the DAG
lowering, so I assume these work as they should.

No tests because I'm lazy and things are getting pretty close to the
point where the existing calling-conventions.ll can be shared with
SelectionDAG.

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

5 years agogn build: Merge r367864
Nico Weber [Mon, 5 Aug 2019 14:22:21 +0000 (14:22 +0000)]
gn build: Merge r367864

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

5 years agoChanging representation of .cv_def_range directives in Codeview debug info assembly...
Nilanjana Basu [Mon, 5 Aug 2019 14:16:58 +0000 (14:16 +0000)]
Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability

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

5 years ago[yaml2obj][tests] Fix overly restrictive od output check
Hubert Tong [Mon, 5 Aug 2019 13:55:41 +0000 (13:55 +0000)]
[yaml2obj][tests] Fix overly restrictive od output check

Summary:
rL364517 introduced further instances of `od` output checking of the
kind previously corrected by rL363829. This patch corrects the issue by
suppressing output of the input offset. The check remains sufficiently
sensitive to test for the intended value of the specific byte since the
relevant byte value is the only output we are expecting from `od`.

Reviewers: grimar, xingxue, daltenty, jasonliu, jhenderson, MaskRay

Reviewed By: grimar, MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years agoRevert "Changing representation of .cv_def_range directives in Codeview debug info...
Nilanjana Basu [Mon, 5 Aug 2019 13:55:21 +0000 (13:55 +0000)]
Revert "Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability"

This reverts commit a885afa9fa8cab3b34f1ddf3d21535f88b662881.

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

5 years ago[yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.
George Rimar [Mon, 5 Aug 2019 13:54:35 +0000 (13:54 +0000)]
[yaml2obj] - Allow overriding sh_entsize for SHT_GNU_versym sections.

This allows to write a test case for one of untested errors
in llvm/Object/ELF.h.

I did it in this patch to demonstrate.

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

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

5 years ago[AArch64] Implement initial SVE calling convention support
Cullen Rhodes [Mon, 5 Aug 2019 13:44:10 +0000 (13:44 +0000)]
[AArch64] Implement initial SVE calling convention support

Summary:

This patch adds initial support for the SVE calling convention such that
SVE types can be passed as arguments and return values to/from a
subroutine.

The SVE AAPCS states [1]:

    z0-z7 are used to pass scalable vector arguments to a subroutine,
    and to return scalable vector results from a function. If a
    subroutine takes arguments in scalable vector or predicate
    registers, or if it is a function that returns results in such
    registers, it must ensure that the entire contents of z8-z23 are
    preserved across the call. In other cases it need only preserve the
    low 64 bits of z8-z15, as described in ยง5.1.2.

    p0-p3 are used to pass scalable predicate arguments to a subroutine
    and to return scalable predicate results from a function. If a
    subroutine takes arguments in scalable vector or predicate
    registers, or if it is a function that returns results in these
    registers, it must ensure that p4-p15 are preserved across the call.
    In other cases it need not preserve any scalable predicate register
    contents.

SVE predicate and data registers are passed indirectly (i.e. spilled to the
stack and pass the address) if they exceed the registers used for argument
passing defined by the PCS referenced above.  Until SVE stack support is merged
we can't spill SVE registers to the stack, so currently an llvm_unreachable is
used where we will eventually handle this.

[1] https://static.docs.arm.com/100986/0000/100986_0000.pdf

Reviewed By: ostannard

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

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

5 years ago[MCA][doc] Add a section for the 'Bottleneck Analysis'.
Andrea Di Biagio [Mon, 5 Aug 2019 13:18:37 +0000 (13:18 +0000)]
[MCA][doc] Add a section for the 'Bottleneck Analysis'.

Also clarify the meaning of 'Block RThroughput' and 'RThroughput'.

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

5 years ago[obj2yaml] - Teach tool to dump SHT_NULL sections.
George Rimar [Mon, 5 Aug 2019 13:16:06 +0000 (13:16 +0000)]
[obj2yaml] - Teach tool to dump SHT_NULL sections.

Recently an advanced support of SHT_NULL sections
was implemented in yaml2obj.

This patch adds a corresponding support to obj2yaml.

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

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

5 years agoChanging representation of .cv_def_range directives in Codeview debug info assembly...
Nilanjana Basu [Mon, 5 Aug 2019 13:11:51 +0000 (13:11 +0000)]
Changing representation of .cv_def_range directives in Codeview debug info assembly format for better readability

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

5 years agotest-release.sh: Perform the sed substitution on both files (PR42739)
Hans Wennborg [Mon, 5 Aug 2019 13:04:12 +0000 (13:04 +0000)]
test-release.sh: Perform the sed substitution on both files (PR42739)

The comparison would otherwise fail if Phase2 occurrs naturally in the
object file. It would get replaced with Phase3 in the one .o, but not
in the other.

We were already running both files through sed to have them processed in
this same way; this is a logical extension of that.

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

5 years agoWrite the RequiredLibraries for 'all' in LibraryDependencies.inc in a deterministic...
Hans Wennborg [Mon, 5 Aug 2019 13:04:07 +0000 (13:04 +0000)]
Write the RequiredLibraries for 'all' in LibraryDependencies.inc in a deterministic order (PR42739)

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

5 years agogn build: Merge r367839
Nico Weber [Mon, 5 Aug 2019 12:44:53 +0000 (12:44 +0000)]
gn build: Merge r367839

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

5 years ago[DAGCombiner][x86] prevent infinite loop from truncate/extend transforms
Sanjay Patel [Mon, 5 Aug 2019 11:27:07 +0000 (11:27 +0000)]
[DAGCombiner][x86] prevent infinite loop from truncate/extend transforms

The test case is based on the example from the post-commit thread for:
https://reviews.llvm.org/rGc9171bd0a955

This replaces the x86-specific simple-type check from:
rL367766
with a check in the DAGCombiner. Adding the check isn't
strictly necessary after the fix from:
rL367768
...but it seems likely that we're heading for trouble if
we are creating weird types in this transform.

I combined the earlier legality check into the initial
clause to simplify the code.

So we should only try the trunc/sext transform at the
earliest combine stage, but we limit the transform to
simple types anyway because the TLI hook is probably
too lax about what it considers a free truncate.

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

5 years ago[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.
George Rimar [Mon, 5 Aug 2019 11:19:28 +0000 (11:19 +0000)]
[llvm/Object] - Remove ELFFile<ELFT>::getSection(const StringRef SectionName). NFC.

This method is dead. It was introduced in D47989,
but now the logic from D63475 is used in llvm-readobj instead.
Also it has a problem: it returns the first matching section,
even if there are multiple sections with the same name.

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

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

5 years ago[MVT][SVE] Map between scalable vector IR Type and VTs
Graham Hunter [Mon, 5 Aug 2019 11:18:19 +0000 (11:18 +0000)]
[MVT][SVE] Map between scalable vector IR Type and VTs

Adds a two way mapping between the scalable vector IR type and
corresponding SelectionDAG ValueTypes.

Reviewers: craig.topper, jeroen.dobbelaere, fhahn, rengolin, greened, rovka

Reviewed By: greened

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

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

5 years ago[AArch64] Skip isZIPMask check for masks with an odd number of elements.
Florian Hahn [Mon, 5 Aug 2019 11:12:23 +0000 (11:12 +0000)]
[AArch64] Skip isZIPMask check for masks with an odd number of elements.

We process 2 elements at a time and expect the number of elements to be
even. Similar to D60690.

Reviewers: dmgreen, samparker, t.p.northover

Reviewed By: dmgreen

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

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

5 years ago[LLVM][Alignment] Introduce Alignment Type
Guillaume Chatelet [Mon, 5 Aug 2019 11:02:05 +0000 (11:02 +0000)]
[LLVM][Alignment] Introduce Alignment Type

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, jfb, jakehehrlich

Reviewed By: jfb

Subscribers: wuzish, jholewinski, arsenm, dschuff, nemanjai, jvesely, nhaehnle, javed.absar, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, s.egerton, llvm-commits

Tags: #llvm

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

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

5 years ago[TLI][NFC] Fixed typo
David Bolvansky [Mon, 5 Aug 2019 10:14:09 +0000 (10:14 +0000)]
[TLI][NFC] Fixed typo

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

5 years ago[InstCombine] Added mempcpy tests [NFC]
David Bolvansky [Mon, 5 Aug 2019 09:58:32 +0000 (09:58 +0000)]
[InstCombine] Added mempcpy tests [NFC]

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

5 years ago[LLVM][Alignment] Introduce Alignment In CallingConv
Guillaume Chatelet [Mon, 5 Aug 2019 09:49:09 +0000 (09:49 +0000)]
[LLVM][Alignment] Introduce Alignment In CallingConv

Summary:
This is patch is part of a serie to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Subscribers: hiraditya, llvm-commits, courbet, jfb

Tags: #llvm

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

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