]> granicus.if.org Git - llvm/log
llvm
5 years agoFix uninitialized variable warnings in directory_entry default constructor. NFCI
Simon Pilgrim [Fri, 4 Oct 2019 12:45:42 +0000 (12:45 +0000)]
Fix uninitialized variable warnings in directory_entry default constructor. NFCI

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

5 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Fri, 4 Oct 2019 12:45:27 +0000 (12:45 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

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

5 years ago[AMDGPU][MC][GFX10] Enabled decoding of 'null' operand
Dmitry Preobrazhensky [Fri, 4 Oct 2019 12:38:36 +0000 (12:38 +0000)]
[AMDGPU][MC][GFX10] Enabled decoding of 'null' operand

See bug 43485: https://bugs.llvm.org/show_bug.cgi?id=43485

Reviewers: arsenm, rampitec

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

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

5 years agoARM-Darwin: keep the frame register reserved even if not updated.
Tim Northover [Fri, 4 Oct 2019 12:29:32 +0000 (12:29 +0000)]
ARM-Darwin: keep the frame register reserved even if not updated.

Darwin platforms need the frame register to always point at a valid record even
if it's not updated in a leaf function. Backtraces are more important than one
extra GPR.

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

5 years ago[llvm-ar][test] Clarified comment
Owen Reynolds [Fri, 4 Oct 2019 12:26:25 +0000 (12:26 +0000)]
[llvm-ar][test] Clarified comment

The test is dependant on the installation of the en_US.UTF-8
locale. The reasoning for this is clarified in the amended comment.

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

5 years ago[AMDGPU][MC][GFX10] Corrected definition of FLAT GLOBAL/SCRATCH instructions
Dmitry Preobrazhensky [Fri, 4 Oct 2019 12:10:22 +0000 (12:10 +0000)]
[AMDGPU][MC][GFX10] Corrected definition of FLAT GLOBAL/SCRATCH instructions

See bug 43483: https://bugs.llvm.org/show_bug.cgi?id=43483

Reviewers: arsenm, rampitec

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

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

5 years ago[llvm-readobj] Remove redundant semicolon. NFC
Simon Atanasyan [Fri, 4 Oct 2019 12:08:10 +0000 (12:08 +0000)]
[llvm-readobj] Remove redundant semicolon. NFC

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

5 years ago[llvm-readobj][mips] Inline `printMipsPLTGOT` method
Simon Atanasyan [Fri, 4 Oct 2019 11:59:23 +0000 (11:59 +0000)]
[llvm-readobj][mips] Inline `printMipsPLTGOT` method

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

5 years ago[llvm-readobj][mips] Implement GNU-style printing of .MIPS.abiflags section
Simon Atanasyan [Fri, 4 Oct 2019 11:59:16 +0000 (11:59 +0000)]
[llvm-readobj][mips] Implement GNU-style printing of .MIPS.abiflags section

In this patch `llvm-readobj` prints ASEs flags on a single line
separated by a comma. GNU `readelf` prints each ASEs flag on
a separate line. It will be fixed later.

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

5 years ago[llvm-readobj] Replace arch-specific ObjDumper methods by the single `printArchSpecif...
Simon Atanasyan [Fri, 4 Oct 2019 11:59:06 +0000 (11:59 +0000)]
[llvm-readobj] Replace arch-specific ObjDumper methods by the single `printArchSpecificInfo`

Initially llvm-readobj supports multiple command line options like
`--arm-attributes` and `--mips-plt-got` for display ELF arch-specific
information. Now all these options are superseded by the
`--arch-specific` one. It makes sense to have a single `printArchSpecificInfo`
method in the base `ObjDumper`, and hide all ELF/target specific details
in the `ELFDumper::printArchSpecificInfo` override.

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

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

5 years agoFix MSVC "not all control paths return a value" warning. NFCI.
Simon Pilgrim [Fri, 4 Oct 2019 11:24:51 +0000 (11:24 +0000)]
Fix MSVC "not all control paths return a value" warning. NFCI.

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

5 years agoFix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
Simon Pilgrim [Fri, 4 Oct 2019 11:24:35 +0000 (11:24 +0000)]
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.

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

5 years agoRevert [test] Remove locale dependency for mri-utf8.test
Owen Reynolds [Fri, 4 Oct 2019 11:12:37 +0000 (11:12 +0000)]
Revert [test] Remove locale dependency for mri-utf8.test

This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee)

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

5 years ago[DebugInfo] LiveDebugValues: move DBG_VALUE creation into VarLoc class
Jeremy Morse [Fri, 4 Oct 2019 10:53:47 +0000 (10:53 +0000)]
[DebugInfo] LiveDebugValues: move DBG_VALUE creation into VarLoc class

Rather than having a mixture of location-state shared between DBG_VALUEs
and VarLoc objects in LiveDebugValues, this patch makes VarLoc the
master record of variable locations. The refactoring means that the
transfer of locations from one place to another is always a performed by
an operation on an existing VarLoc, that produces another transferred
VarLoc. DBG_VALUEs are only created at the end of LiveDebugValues, once
all locations are known. As a plus, there is now only one method where
DBG_VALUEs can be created.

The test case added covers a circumstance that is now impossible to
express in LiveDebugValues: if an already-indirect DBG_VALUE is spilt,
previously it would have been restored-from-spill as a direct DBG_VALUE.
We now don't lose this information along the way, as VarLocs always
refer back to the "original" non-transfer DBG_VALUE, and we can always
work out whether a location was "originally" indirect.

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

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

5 years agogn build: (manually) merge r373718
Nico Weber [Fri, 4 Oct 2019 10:20:47 +0000 (10:20 +0000)]
gn build: (manually) merge r373718

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

5 years agoRevert "[NFC] [FileCheck] Fix init of stack objects in unit tests"
Dmitri Gribenko [Fri, 4 Oct 2019 09:42:19 +0000 (09:42 +0000)]
Revert "[NFC] [FileCheck] Fix init of stack objects in unit tests"

This reverts commit r373717. It broke the build:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18721.

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

5 years ago[DebugInfo] LiveDebugValues: defer DBG_VALUE creation during analysis
Jeremy Morse [Fri, 4 Oct 2019 09:38:05 +0000 (09:38 +0000)]
[DebugInfo] LiveDebugValues: defer DBG_VALUE creation during analysis

When transfering variable locations from one place to another,
LiveDebugValues immediately creates a DBG_VALUE representing that
transfer. This causes trouble if the variable location should
subsequently be invalidated by a loop back-edge, such as in the added
test case: the transfer DBG_VALUE from a now-invalid location is used
as proof that the variable location is correct. This is effectively a
self-fulfilling prophesy.

To avoid this, defer the insertion of transfer DBG_VALUEs until after
analysis has completed. Some of those transfers are still sketchy, but
we don't propagate them into other blocks now.

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

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

5 years ago[TableGen] Introduce a generic automaton (DFA) backend
James Molloy [Fri, 4 Oct 2019 09:03:36 +0000 (09:03 +0000)]
[TableGen] Introduce a generic automaton (DFA) backend

Summary:
This patch introduces -gen-automata, a backend for generating deterministic finite-state automata.

DFAs are already generated by the -gen-dfa-packetizer backend. This backend is more generic and will
hopefully be used to implement the DFA generation (and determinization) for the packetizer in the
future.

This backend allows not only generation of a DFA from an NFA (nondeterministic finite-state
automaton), it also emits sidetables that allow a path through the DFA under a sequence of inputs to
be analyzed, and the equivalent set of all possible NFA transitions extracted.

This allows a user to not just answer "can my problem be solved?" but also "what is the
solution?". Clearly this analysis is more expensive than just playing a DFA forwards so is
opt-in. The DFAPacketizer has this behaviour already but this is a more compact and generic
representation.

Examples are bundled in unittests/TableGen/Automata.td. Some are trivial, but the BinPacking example
is a stripped-down version of the original target problem I set out to solve, where we pack values
(actually immediates) into bins (an immediate pool in a VLIW bundle) subject to a set of esoteric
constraints.

Reviewers: t.p.northover

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years ago[NFC] [FileCheck] Fix init of stack objects in unit tests
Thomas Preud'homme [Fri, 4 Oct 2019 09:00:44 +0000 (09:00 +0000)]
[NFC] [FileCheck] Fix init of stack objects in unit tests

Summary:
Fix initialization style of objects allocated on the stack in unit test
to use the "Type Var(init list)" convention.

Reviewers: jhenderson, probinson, arichardson, grimar, jdenny

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years agoAMDGPU/GlobalISel: Fix using wrong addrspace for aperture
Matt Arsenault [Fri, 4 Oct 2019 08:35:38 +0000 (08:35 +0000)]
AMDGPU/GlobalISel: Fix using wrong addrspace for aperture

This was always passing the destination flat address space, when it
should be picking between the two valid source options.

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

5 years agoAMDGPU/GlobalISel: Select G_PTRTOINT
Matt Arsenault [Fri, 4 Oct 2019 08:35:37 +0000 (08:35 +0000)]
AMDGPU/GlobalISel: Select G_PTRTOINT

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

5 years agoAMDGPU/GlobalISel: Support wave32 waterfall loops
Matt Arsenault [Fri, 4 Oct 2019 08:35:35 +0000 (08:35 +0000)]
AMDGPU/GlobalISel: Support wave32 waterfall loops

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

5 years ago[X86] Enable inline memcmp() to use AVX512
David Zarzycki [Fri, 4 Oct 2019 07:42:34 +0000 (07:42 +0000)]
[X86] Enable inline memcmp() to use AVX512

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

5 years agoRevert "[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp...
Martin Storsjo [Fri, 4 Oct 2019 07:22:37 +0000 (07:22 +0000)]
Revert "[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC."

This reverts SVN r373698, as it broke sanitizer tests, e.g. in
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/52441.

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

5 years ago[test] Remove locale dependency for mri-utf8.test
Thomas Preud'homme [Fri, 4 Oct 2019 07:13:46 +0000 (07:13 +0000)]
[test] Remove locale dependency for mri-utf8.test

Summary:
llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
installed for its last RUN line to work. If not installed, the unicode
string gets encoded (interpreted) as ascii which fails since the most
significant byte is non zero. This commit changes the call to open to
use a binary literal of the UTF-8 encoding for the pound sign instead,
thus bypassing the encoding step.

Note that the echo to create the <pound sign>.txt file will work
regardless of the locale because both the shell and the echo (in case
it's not a builtin of the shell concerned) only care about ascii
character to operate. Indeed, the mri-utf8.test file (and in particular
the pound sign) is encoded in UTF-8 and UTF-8 guarantees only ascii
characters can create bytes that can be interpreted as ascii characters
(i.e. bytes with the most significant bit null).

So the process to break down the filename in the line goes something
along:
- find an ascii chevron '>'
- find beginning of the filename by removing ascii space-like characters
- find ascii newline character indicating the end of the redirection (no
  semicolon ';', closing curly bracket '}' or parenthesis ')' or the
  like
- create a file whose name is made of all the bytes in between beginning
  and end of filename *without interpretting them*

Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[AMDGPU][SILoadStoreOptimizer] NFC: Refactor code
Piotr Sobczak [Fri, 4 Oct 2019 07:09:40 +0000 (07:09 +0000)]
[AMDGPU][SILoadStoreOptimizer] NFC: Refactor code

Summary:
This patch fixes a potential aliasing problem in InstClassEnum,
where local values were mixed with machine opcodes.

Introducing InstSubclass will keep them separate and help extending
InstClassEnum with other instruction types (e.g. MIMG) in the future.

This patch also makes getSubRegIdxs() more concise.

Reviewers: nhaehnle, arsenm, tstellar

Reviewed By: arsenm

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

Tags: #llvm

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

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

5 years ago[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.
Martin Storsjo [Fri, 4 Oct 2019 07:05:42 +0000 (07:05 +0000)]
[Symbolize] Use the local MSVC C++ demangler instead of relying on dbghelp. NFC.

This allows making a couple llvm-symbolizer tests run in all
environments.

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

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

5 years ago[test] Remove a needless declaration of REQUIRES: target-windows
Martin Storsjo [Fri, 4 Oct 2019 07:05:29 +0000 (07:05 +0000)]
[test] Remove a needless declaration of REQUIRES: target-windows

This test only relies on running on a case insensitive file system,
the exact target triple of the toolchain shouldn't matter.

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

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

5 years ago[JITLink] Remove a redundant semicolon, silencing -Wpedantic warnings with GCC. NFC.
Martin Storsjo [Fri, 4 Oct 2019 07:05:22 +0000 (07:05 +0000)]
[JITLink] Remove a redundant semicolon, silencing -Wpedantic warnings with GCC. NFC.

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

5 years ago[JITLink] Explicitly destroy bumpptr-allocated blocks to avoid a memory leak.
Lang Hames [Fri, 4 Oct 2019 05:24:40 +0000 (05:24 +0000)]
[JITLink] Explicitly destroy bumpptr-allocated blocks to avoid a memory leak.

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

5 years ago[JITLink] Fix an unused variable warning.
Lang Hames [Fri, 4 Oct 2019 05:24:39 +0000 (05:24 +0000)]
[JITLink] Fix an unused variable warning.

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

5 years agogn build: Merge r373689
GN Sync Bot [Fri, 4 Oct 2019 04:00:11 +0000 (04:00 +0000)]
gn build: Merge r373689

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

5 years ago[JITLink] Switch from an atom-based model to a "blocks and symbols" model.
Lang Hames [Fri, 4 Oct 2019 03:55:26 +0000 (03:55 +0000)]
[JITLink] Switch from an atom-based model to a "blocks and symbols" model.

In the Atom model the symbols, content and relocations of a relocatable object
file are represented as a graph of atoms, where each Atom represents a
contiguous block of content with a single name (or no name at all if the
content is anonymous), and where edges between Atoms represent relocations.
If more than one symbol is associated with a contiguous block of content then
the content is broken into multiple atoms and layout constraints (represented by
edges) are introduced to ensure that the content remains effectively contiguous.
These layout constraints must be kept in mind when examining the content
associated with a symbol (it may be spread over multiple atoms) or when applying
certain relocation types (e.g. MachO subtractors).

This patch replaces the Atom model in JITLink with a blocks-and-symbols model.
The blocks-and-symbols model represents relocatable object files as bipartite
graphs, with one set of nodes representing contiguous content (Blocks) and
another representing named or anonymous locations (Symbols) within a Block.
Relocations are represented as edges from Blocks to Symbols. This scheme
removes layout constraints (simplifying handling of MachO alt-entry symbols,
and hopefully ELF sections at some point in the future) and simplifies some
relocation logic.

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

5 years ago[RISCV] Split SP adjustment to reduce the offset of callee saved register spill and...
Shiva Chen [Fri, 4 Oct 2019 02:00:57 +0000 (02:00 +0000)]
[RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore

We would like to split the SP adjustment to reduce the instructions in
prologue and epilogue as the following case. In this way, the offset of
the callee saved register could fit in a single store.

    add     sp,sp,-2032
    sw      ra,2028(sp)
    sw      s0,2024(sp)
    sw      s1,2020(sp)
    sw      s3,2012(sp)
    sw      s4,2008(sp)
    add     sp,sp,-64

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

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

5 years ago[dsymutil] Fix stack-use-after-scope
Jonas Devlieghere [Fri, 4 Oct 2019 00:39:48 +0000 (00:39 +0000)]
[dsymutil] Fix stack-use-after-scope

The lambda is taking the stack-allocated Verify boolean by reference and
it would go out of scope on the next iteration. Moving it out of the
loop should fix the issue.

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

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

5 years agoLowerTypeTests: Rename local functions to avoid collisions with identically named...
Peter Collingbourne [Thu, 3 Oct 2019 23:42:44 +0000 (23:42 +0000)]
LowerTypeTests: Rename local functions to avoid collisions with identically named functions in ThinLTO modules.

Without this we can encounter link errors or incorrect behaviour
at runtime as a result of the wrong function being referenced.

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

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

5 years ago[llvm-objdump][test] Move test to X86 dir to avoid errors disassembling on non-x86
Jordan Rupprecht [Thu, 3 Oct 2019 23:08:22 +0000 (23:08 +0000)]
[llvm-objdump][test] Move test to X86 dir to avoid errors disassembling on non-x86

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

5 years ago[MemorySSA] Don't hoist stores if interfering uses (as calls) exist.
Alina Sbirlea [Thu, 3 Oct 2019 22:20:04 +0000 (22:20 +0000)]
[MemorySSA] Don't hoist stores if interfering uses (as calls) exist.

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

5 years ago[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Jordan Rupprecht [Thu, 3 Oct 2019 22:01:08 +0000 (22:01 +0000)]
[llvm-objdump] Further rearrange llvm-objdump sections for compatability

Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.

I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly

Reviewers: jhenderson, justice_adams, grimar, ychen, espindola

Reviewed By: jhenderson

Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay

Tags: #llvm

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

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

5 years ago[DAGCombiner] add operation legality checks before creating shift ops (PR43542)
Sanjay Patel [Thu, 3 Oct 2019 21:34:04 +0000 (21:34 +0000)]
[DAGCombiner] add operation legality checks before creating shift ops (PR43542)

As discussed on llvm-dev and:
https://bugs.llvm.org/show_bug.cgi?id=43542
...we have transforms that assume shift operations are legal and transforms to
use them are profitable, but that may not hold for simple targets.

In this case, the MSP430 target custom lowers shifts by repeating (many)
simpler/fixed ops. That can be avoided by keeping this code as setcc/select.

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

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

5 years agoReland r349624: Let TableGen write output only if it changed, instead of doing so...
Nico Weber [Thu, 3 Oct 2019 21:22:28 +0000 (21:22 +0000)]
Reland r349624: Let TableGen write output only if it changed, instead of doing so in cmake

Move the write-if-changed logic behind a flag and don't pass it
with the MSVC generator. msbuild doesn't have a restat optimization,
so not doing write-if-change there doesn't have a cost, and it
should fix whatever causes PR43385.

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

5 years agoDebugInfo: Generalize rnglist emission as a precursor to reusing it for loclist emission
David Blaikie [Thu, 3 Oct 2019 20:56:23 +0000 (20:56 +0000)]
DebugInfo: Generalize rnglist emission as a precursor to reusing it for loclist emission

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

5 years agogn build: (manually) merge 373651 better
Nico Weber [Thu, 3 Oct 2019 20:41:57 +0000 (20:41 +0000)]
gn build: (manually) merge 373651 better

The reland uses a static library, not an object library.
Doesn't really matter for the gn build, but it's probalby
nice to have the same semantics for the target type.

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

5 years ago[Tests] Add a unordered atomic load combine test
Philip Reames [Thu, 3 Oct 2019 20:28:59 +0000 (20:28 +0000)]
[Tests] Add a unordered atomic load combine test

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

5 years ago[Test] Fix inconsistency in alignment in test case
Philip Reames [Thu, 3 Oct 2019 20:24:18 +0000 (20:24 +0000)]
[Test] Fix inconsistency in alignment in test case

The IR was using a fixed 8 byte alignment, but the MIR portion was using native alignment.  Since the test doesn't appear to be deliberately testing overalignment, just make the IR match the MIR.

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

5 years ago[AArch64][SVE] Move the testcase into CodeGen dir
Jinsong Ji [Thu, 3 Oct 2019 20:21:23 +0000 (20:21 +0000)]
[AArch64][SVE] Move the testcase into CodeGen dir

https://reviews.llvm.org/rL373600 added an AArch64 testcase in top dir
which should be moved to Codegen dir.

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

5 years ago[AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a
Nick Desaulniers [Thu, 3 Oct 2019 20:10:02 +0000 (20:10 +0000)]
[AArch64InstPrinter] prefer bfi to bfc for < armv8.2-a

Summary:
Fixes pr/42576.

Link: https://github.com/ClangBuiltLinux/linux/issues/697
Reviewers: t.p.northover

Reviewed By: t.p.northover

Subscribers: kristof.beyls, hiraditya, llvm-commits, srhines

Tags: #llvm

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

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

5 years agoReland "gn build: (manually) merge r373551"
Nico Weber [Thu, 3 Oct 2019 20:07:03 +0000 (20:07 +0000)]
Reland "gn build: (manually) merge r373551"

373551 relanded in 373651.

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

5 years ago[PowerPC] Adjust the naming and operand order of fnmsub patterns
Jinsong Ji [Thu, 3 Oct 2019 19:36:42 +0000 (19:36 +0000)]
[PowerPC] Adjust the naming and operand order of fnmsub patterns

Summary:
This is follow up patch of https://reviews.llvm.org/D67595.
Adjust naming and the Commutable operands for additional patterns
to make it easier to read.

The testcase update also show that we can save some unecessary fmr as
well.

Reviewers: #powerpc, steven.zhang, hfinkel, nemanjai

Reviewed By: #powerpc, nemanjai

Subscribers: wuzish, hiraditya, kbarton, MaskRay, shchenz, llvm-commits

Tags: #llvm

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

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

5 years ago[gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion
Daniel Sanders [Thu, 3 Oct 2019 19:13:39 +0000 (19:13 +0000)]
[gicombiner] Add a CodeExpander to handle C++ fragments with variable expansion

Summary:
This will handle expansion of C++ fragments in the declarative combiner
including custom predicates, and escapes into C++ to aid the migration
effort.

Fixed the -DLLVM_LINK_LLVM_DYLIB=ON using DISABLE_LLVM_LINK_LLVM_DYLIB when
creating the library. Apparently it automatically links to libLLVM.dylib
and we don't want that from tablegen.

Reviewers: bogner, volkan

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 373551

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

5 years ago[NFC] Fix unused variable in release builds
Jordan Rupprecht [Thu, 3 Oct 2019 18:35:44 +0000 (18:35 +0000)]
[NFC] Fix unused variable in release builds

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

5 years ago[X86] Add v32i8 shuffle lowering strategy to recognize two v4i64 vectors truncated...
Craig Topper [Thu, 3 Oct 2019 18:34:42 +0000 (18:34 +0000)]
[X86] Add v32i8 shuffle lowering strategy to recognize two v4i64 vectors truncated to v4i8 and concatenated into the lower 8 bytes with undef/zero upper bytes.

This patch recognizes the shuffle pattern we get from a
v8i64->v8i8 truncate when v8i64 isn't a legal type.

With VLX we can use two VTRUNCs, unpckldq, and a insert_subvector.

Diffrential Revision: https://reviews.llvm.org/D68374

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

5 years ago[X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.
Simon Pilgrim [Thu, 3 Oct 2019 18:13:50 +0000 (18:13 +0000)]
[X86] matchShuffleWithSHUFPD - use Zeroable element mask directly. NFCI.

We can make use of the Zeroable mask to indicate which elements we can safely set to zero instead of creating a target shuffle mask on the fly.

This only leaves one user of createTargetShuffleMask which we can hopefully get rid of in a similar manner.

This is part of the work to fix PR43024 and allow us to use SimplifyDemandedElts to simplify shuffle chains - we need to get to a point where the target shuffle masks isn't adjusted by its source inputs in setTargetShuffleZeroElements but instead we cache them in a parallel Zeroable mask.

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

5 years ago[dsymutil] Don't overload LinkOptions.
Jonas Devlieghere [Thu, 3 Oct 2019 18:02:09 +0000 (18:02 +0000)]
[dsymutil] Don't overload LinkOptions.

This should fix the build bots:

  error: declaration of â€˜llvm::dsymutil::LinkOptions
  DsymutilOptions::LinkOptions’ [-fpermissive]

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

5 years agoAMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT
Matt Arsenault [Thu, 3 Oct 2019 17:59:03 +0000 (17:59 +0000)]
AMDGPU/GlobalISel: Handle RegBankSelect of G_INSERT_VECTOR_ELT

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

5 years agoAMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelect
Matt Arsenault [Thu, 3 Oct 2019 17:55:27 +0000 (17:55 +0000)]
AMDGPU/GlobalISel: Split 64-bit vector extracts during RegBankSelect

Register indexing 64-bit elements is possible on the SALU, but not the
VALU. Handle splitting this into two 32-bit indexes. Extend waterfall
loop handling to allow moving a range of instructions.

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

5 years agoAMDGPU/GlobalISel: Allow VGPR to index SGPR register
Matt Arsenault [Thu, 3 Oct 2019 17:50:32 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Allow VGPR to index SGPR register

We can still do a waterfall loop over the index if using a VGPR to
index an SGPR. The result will still be a VGPR, but we can avoid the
wide copy of the source register to a VGPR.

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

5 years agoAMDGPU/GlobalISel: Add some more tests for G_INSERT legalization
Matt Arsenault [Thu, 3 Oct 2019 17:50:31 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Add some more tests for G_INSERT legalization

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

5 years agoAMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and
Matt Arsenault [Thu, 3 Oct 2019 17:50:29 +0000 (17:50 +0000)]
AMDGPU/GlobalISel: Fix mutationIsSane assert v8s8 and

This would try to do FewerElements to v9s8

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

5 years agoFix build failure with GCC on identifier reusing.
Michael Liao [Thu, 3 Oct 2019 17:47:46 +0000 (17:47 +0000)]
Fix build failure with GCC on identifier reusing.

- GCC is different from clang and other compilers on that.
  https://godbolt.org/z/CeQE1V

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

5 years agoAMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructions
Tom Stellard [Thu, 3 Oct 2019 17:11:47 +0000 (17:11 +0000)]
AMDGPU/SILoadStoreOptimizer: Optimize scanning for mergeable instructions

Summary:
This adds a pre-pass to this optimization that scans through the basic
block and generates lists of mergeable instructions with one list per unique
address.

In the optimization phase instead of scanning through the basic block for mergeable
instructions, we now iterate over the lists generated by the pre-pass.

The decision to re-optimize a block is now made per list, so if we fail to merge any
instructions with the same address, then we do not attempt to optimize them in
future passes over the block.  This will help to reduce the time this pass
spends re-optimizing instructions.

In one pathological test case, this change reduces the time spent in the
SILoadStoreOptimizer from 0.2s to 0.03s.

This restructuring will also make it possible to implement further solutions in
this pass, because we can now add less expensive checks to the pre-pass and
filter instructions out early which will avoid the need to do the expensive
scanning during the optimization pass. For example, checking for adjacent
offsets is an inexpensive test we can move to the pre-pass.

Reviewers: arsenm, pendingchaos, rampitec, nhaehnle, vpykhtin

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

Tags: #llvm

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

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

5 years ago[ModuloSchedule] removeBranch() *before* creating the trip count condition
James Molloy [Thu, 3 Oct 2019 17:10:32 +0000 (17:10 +0000)]
[ModuloSchedule] removeBranch() *before* creating the trip count condition

The Hexagon code assumes there's no existing terminator when inserting its
trip count condition check.

This causes swp-stages5.ll to break. The generated code looks good to me,
it is likely a permutation. I have disabled the new codegen path to keep
everything green and will investigate along with the other 3-4 tests
that have different codegen.

Fixes expensive-checks build.

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

5 years agogn build: (manually) merge r373622
Nico Weber [Thu, 3 Oct 2019 16:59:12 +0000 (16:59 +0000)]
gn build: (manually) merge r373622

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

5 years ago[dsymutil] Improve consistency by removing redundant namespaces (NFC)
Jonas Devlieghere [Thu, 3 Oct 2019 16:34:44 +0000 (16:34 +0000)]
[dsymutil] Improve consistency by removing redundant namespaces (NFC)

The dsymutil implementation file has a using-directive for the llvm
namespace. This patch just removes redundant namespace qualifiers.

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

5 years ago[dsymutil] Tablegenify option parsing
Jonas Devlieghere [Thu, 3 Oct 2019 16:34:41 +0000 (16:34 +0000)]
[dsymutil] Tablegenify option parsing

This patch reimplements command line option parsing in dsymutil with
Tablegen and libOption. The main motivation for this change is to
prevent clashes with other cl::opt options defined in llvm. Although
it's a bit more heavyweight, it has some nice advantages such as no
global static initializers and better separation between the code and
the option definitions.

I also used this opportunity to improve how dsymutil deals with
incompatible options. Instead of having checks spread across the code,
everything is now grouped together in verifyOptions. The fact that the
options are no longer global means that we need to pass them around a
bit more, but I think it's worth the trade-off.

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

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

5 years ago[BPF] Handle offset reloc endpoint ending in the middle of chain properly
Yonghong Song [Thu, 3 Oct 2019 16:30:29 +0000 (16:30 +0000)]
[BPF] Handle offset reloc endpoint ending in the middle of chain properly

During studying support for bitfield, I found an issue for
an example like the one in test offset-reloc-middle-chain.ll.
  struct t1 { int c; };
  struct s1 { struct t1 b; };
  struct r1 { struct s1 a; };
  #define _(x) __builtin_preserve_access_index(x)
  void test1(void *p1, void *p2, void *p3);
  void test(struct r1 *arg) {
    struct s1 *ps = _(&arg->a);
    struct t1 *pt = _(&arg->a.b);
    int *pi = _(&arg->a.b.c);
    test1(ps, pt, pi);
  }

The IR looks like:
  %0 = llvm.preserve.struct.access(base, ...)
  %1 = llvm.preserve.struct.access(%0, ...)
  %2 = llvm.preserve.struct.access(%1, ...)
  using %0, %1 and %2

In this case, we need to generate three relocatiions
corresponding to chains: (%0), (%0, %1) and (%0, %1, %2).
After collecting all the chains, the current implementation
process each chain (in a map) with code generation sequentially.
For example, after (%0) is processed, the code may look like:
  %0 = base + special_global_variable
  // llvm.preserve.struct.access(base, ...) is delisted
  // from the instruction stream.
  %1 = llvm.preserve.struct.access(%0, ...)
  %2 = llvm.preserve.struct.access(%1, ...)
  using %0, %1 and %2

When processing chain (%0, %1), the current implementation
tries to visit intrinsic llvm.preserve.struct.access(base, ...)
to get some of its properties and this caused segfault.

This patch fixed the issue by remembering all necessary
information (kind, metadata, access_index, base) during
analysis phase, so in code generation phase there is
no need to examine the intrinsic call instructions.
This also simplifies the code.

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

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

5 years agoRevert "[Alignment][NFC] Allow constexpr Align"
Guillaume Chatelet [Thu, 3 Oct 2019 15:53:50 +0000 (15:53 +0000)]
Revert "[Alignment][NFC] Allow constexpr Align"

This reverts commit b3af236fb5fc6e50fcc1b54d868f0bff557f3fb1.

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

5 years ago[RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)
Edward Jones [Thu, 3 Oct 2019 15:47:28 +0000 (15:47 +0000)]
[RISCV] Add obsolete aliases of fscsr, frcsr (fssr, frsr)

These old aliases were renamed, but are still used by some projects (eg newlib).

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

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

5 years ago[yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.
George Rimar [Thu, 3 Oct 2019 15:02:18 +0000 (15:02 +0000)]
[yaml2obj] - Add a Size tag support for SHT_LLVM_ADDRSIG sections.

It allows using "Size" with or without "Content" in YAML descriptions of
SHT_LLVM_ADDRSIG sections.

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

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

5 years agoTest commit.
Sumanth Gundapaneni [Thu, 3 Oct 2019 14:57:49 +0000 (14:57 +0000)]
Test commit.

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

5 years ago[MSP430] add tests for unwanted shift codegen; NFC (PR43542)
Sanjay Patel [Thu, 3 Oct 2019 14:54:03 +0000 (14:54 +0000)]
[MSP430] add tests for unwanted shift codegen; NFC (PR43542)

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

5 years agoRecommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
George Rimar [Thu, 3 Oct 2019 14:52:33 +0000 (14:52 +0000)]
Recommit r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

Fix: call `consumeError()` for a case missed.

Original commit message:

SHT_LLVM_ADDRSIG is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

This patch teaches tools to dump them and to parse the YAML declarations of such sections.

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

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

5 years ago[UpdateTestChecks] add basic support for parsing msp430 asm
Sanjay Patel [Thu, 3 Oct 2019 14:34:28 +0000 (14:34 +0000)]
[UpdateTestChecks] add basic support for parsing msp430 asm

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

5 years agogn build: Merge r373601
GN Sync Bot [Thu, 3 Oct 2019 14:28:27 +0000 (14:28 +0000)]
gn build: Merge r373601

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

5 years ago[PGO] Refactor Value Profiling into a plugin based oracle and create a well defined...
Bardia Mahjour [Thu, 3 Oct 2019 14:20:50 +0000 (14:20 +0000)]
[PGO] Refactor Value Profiling into a plugin based oracle and create a well defined API for the plugins.

Summary: This PR creates a utility class called ValueProfileCollector that tells PGOInstrumentationGen and PGOInstrumentationUse what to value-profile and where to attach the profile metadata. It then refactors logic scattered in PGOInstrumentation.cpp into two plugins that plug into the ValueProfileCollector.

Authored By: Wael Yehia <wyehia@ca.ibm.com>

Reviewer: davidxl, tejohnson, xur

Reviewed By: davidxl, tejohnson, xur

Subscribers: llvm-commits

Tag: #llvm

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

Patch By Wael Yehia <wyehia@ca.ibm.com>

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

5 years ago[AArch64][SVE] Adding patterns for floating point SVE add instructions.
Ehsan Amiri [Thu, 3 Oct 2019 14:19:55 +0000 (14:19 +0000)]
[AArch64][SVE] Adding patterns for floating point SVE add instructions.

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

5 years agoRevert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."
George Rimar [Thu, 3 Oct 2019 14:04:47 +0000 (14:04 +0000)]
Revert r373598 "[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections."

It broke BB:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/18655/steps/test/logs/stdio

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

5 years ago[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.
George Rimar [Thu, 3 Oct 2019 13:57:08 +0000 (13:57 +0000)]
[yaml2obj/obj2yaml] - Add support for SHT_LLVM_ADDRSIG sections.

SHT_LLVM_ADDRSIG is described here:
https://llvm.org/docs/Extensions.html#sht-llvm-addrsig-section-address-significance-table

This patch teaches tools to dump them and to parse the YAML declarations of such sections.

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

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

5 years ago[NFC][InstCombine] Some tests for sub-of-negatible pattern
Roman Lebedev [Thu, 3 Oct 2019 13:36:00 +0000 (13:36 +0000)]
[NFC][InstCombine] Some tests for sub-of-negatible pattern

As we have previously estabilished, `sub` is an outcast,
and should be considered non-canonical iff it can be converted to `add`.

It can be converted to `add` if it's second operand can be negated.
So far we mostly only do that for constants and negation itself,
but we should be more through.

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

5 years ago[llvm-locstats] Copy the script only when needed; NFC
Djordje Todorovic [Thu, 3 Oct 2019 13:18:14 +0000 (13:18 +0000)]
[llvm-locstats] Copy the script only when needed; NFC

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

5 years ago[Alignment][NFC] Remove StoreInst::setAlignment(unsigned)
Guillaume Chatelet [Thu, 3 Oct 2019 13:17:21 +0000 (13:17 +0000)]
[Alignment][NFC] Remove StoreInst::setAlignment(unsigned)

Summary:
This is patch is part of a series 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, bollu, jdoerfert

Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

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

5 years ago[llvm-readobj] - Stop using a precompiled binary in all.test
George Rimar [Thu, 3 Oct 2019 13:13:23 +0000 (13:13 +0000)]
[llvm-readobj] - Stop using a precompiled binary in all.test

Having a precompiled binary here is excessive.
I also added a few missing tags.

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

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

5 years ago[mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions
Simon Atanasyan [Thu, 3 Oct 2019 12:08:26 +0000 (12:08 +0000)]
[mips] Push `fixup_Mips_LO16` fixup for `jialc` and `jic` instructions

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

5 years ago[llvm-readobj][mips] Remove non-standard --misp-xxx flags
Simon Atanasyan [Thu, 3 Oct 2019 12:08:11 +0000 (12:08 +0000)]
[llvm-readobj][mips] Remove non-standard --misp-xxx flags

llvm-readobj "non-standard" flags `--mips-plt-got`, `--mips-abi-flags`,
`--mips-reginfo`, and `--mips-options` are superseded by the `--arch-specific`
flag and can be removed now.

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

5 years ago[mips] Use llvm-readobj `-A` flag in test cases. NFC
Simon Atanasyan [Thu, 3 Oct 2019 12:08:04 +0000 (12:08 +0000)]
[mips] Use llvm-readobj `-A` flag in test cases. NFC

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

5 years ago[llvm-readobj][mips] Display MIPS specific info under --arch-specific flag
Simon Atanasyan [Thu, 3 Oct 2019 12:07:07 +0000 (12:07 +0000)]
[llvm-readobj][mips] Display MIPS specific info under --arch-specific flag

Old options `--mips-plt-got`, `--mips-abi-flags`, '--mips-reginfo`,
and `--mips-options` wiil be deleted in a separate patch.

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

5 years ago[llvm-readobj][mips] Do not show an error if GOT is missed
Simon Atanasyan [Thu, 3 Oct 2019 12:06:56 +0000 (12:06 +0000)]
[llvm-readobj][mips] Do not show an error if GOT is missed

It is not an error if a file does not contain GOT.

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

5 years agogn build: Revert 373554 "gn build: (manually) merge r373551"
Nico Weber [Thu, 3 Oct 2019 11:57:39 +0000 (11:57 +0000)]
gn build: Revert 373554 "gn build: (manually) merge r373551"

r373551 was reverted in r373581.

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

5 years ago[AArch64] Static (de)allocation of SVE stack objects.
Sander de Smalen [Thu, 3 Oct 2019 11:33:50 +0000 (11:33 +0000)]
[AArch64] Static (de)allocation of SVE stack objects.

Adds support to AArch64FrameLowering to allocate fixed-stack SVE objects.

The focus of this patch is purely to allow the stack frame to
allocate/deallocate space for scalable SVE objects. More dynamic
allocation (at compile-time, i.e. determining placement of SVE objects
on the stack), or resolving frame-index references that include
scalable-sized offsets, are left for subsequent patches.

SVE objects are allocated in the stack frame as a separate region below
the callee-save area, and above the alignment gap. This is done so that
the SVE objects can be accessed directly from the FP at (runtime)
VL-based offsets to benefit from using the VL-scaled addressing modes.

The layout looks as follows:

     +-------------+
     | stack arg   |
     +-------------+
     | Callee Saves|
     |   X29, X30  |       (if available)
     |-------------| <- FP (if available)
     |     :       |
     |  SVE area   |
     |     :       |
     +-------------+
     |/////////////| alignment gap.
     |     :       |
     | Stack objs  |
     |     :       |
     +-------------+ <- SP after call and frame-setup

SVE and non-SVE stack objects are distinguished using different
StackIDs. The offsets for objects with TargetStackID::SVEVector should be
interpreted as purely scalable offsets within their respective SVE region.

Reviewers: thegameg, rovka, t.p.northover, efriedma, rengolin, greened

Reviewed By: efriedma

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

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

5 years agoFix uninitialized variable warning. NFCI
Simon Pilgrim [Thu, 3 Oct 2019 11:22:00 +0000 (11:22 +0000)]
Fix uninitialized variable warning. NFCI

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

5 years agoFix uninitialized variable warning. NFCI
Simon Pilgrim [Thu, 3 Oct 2019 11:21:46 +0000 (11:21 +0000)]
Fix uninitialized variable warning. NFCI

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

5 years agoRevert 373551 (CodeExpander.cpp CMake issue)
Kristina Brooks [Thu, 3 Oct 2019 11:04:48 +0000 (11:04 +0000)]
Revert 373551 (CodeExpander.cpp CMake issue)

Fix buildbots and revert the CodeExpander commit.

(See http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20190930/699857.html )

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

5 years ago[Alignment][NFC] Allow constexpr Align
Guillaume Chatelet [Thu, 3 Oct 2019 10:53:10 +0000 (10:53 +0000)]
[Alignment][NFC] Allow constexpr Align

Summary:
This is patch is part of a series 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

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoRevert 373555: libLLVM+modules failure with CMake 3.10.2
Kristina Brooks [Thu, 3 Oct 2019 10:48:37 +0000 (10:48 +0000)]
Revert 373555: libLLVM+modules failure with CMake 3.10.2

This reverts rL373555. I've sent an email out regarding the issue.

Commit on GitHub:
https://github.com/llvm/llvm-project/commit/45f682f47129c05414d4c5ae7be851772273978f

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

5 years agoUpdate the FAQ: remove stuff related to the previous license +
Sylvestre Ledru [Thu, 3 Oct 2019 09:43:54 +0000 (09:43 +0000)]
Update the FAQ: remove stuff related to the previous license +
update info about the portability of LLVM.

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

5 years ago[llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()
Clement Courbet [Thu, 3 Oct 2019 07:56:56 +0000 (07:56 +0000)]
[llvm-exegesis][NFC] Rename ExegesisTarget::decrementLoopCounterAndLoop()

Summary: To decrementLoopCounterAndJump, and explicitely take the jump target.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

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

5 years ago[X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width...
Craig Topper [Thu, 3 Oct 2019 06:18:45 +0000 (06:18 +0000)]
[X86] Add test case for v8i64->v8i8 truncate with avx512 and prefer-vector-width/min-legal-vector-width=256. NFC

With vpmovqb, we should be able to do better here until we get
AVX512VBMI on Cannonlake/Icelake.

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

5 years agoAMDGPU/GlobalISel: Don't re-get subtarget
Matt Arsenault [Thu, 3 Oct 2019 05:46:10 +0000 (05:46 +0000)]
AMDGPU/GlobalISel: Don't re-get subtarget

It's already available in the class.

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

5 years agoAMDGPU/GlobalISel: Expand G_BITCAST legality
Matt Arsenault [Thu, 3 Oct 2019 05:46:08 +0000 (05:46 +0000)]
AMDGPU/GlobalISel: Expand G_BITCAST legality

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

5 years ago[X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load...
Craig Topper [Thu, 3 Oct 2019 05:30:02 +0000 (05:30 +0000)]
[X86] Add DAG combine to turn (bitcast (vbroadcast_load)) into just a vbroadcast_load if the scalar size is the same.

This improves broadcast load folding of i64 elements on 32-bit
targets where i64 isn't legal.

Previously we had to represent these as vXf64 vbroadcast_loads and
a bitcast to vXi64. But we didn't have any isel patterns
looking for that.

This also allows us to remove or simplify some isel patterns that
were looking for bitcasted vbroadcast_loads.

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