Commit Graph

157293 Commits

Author SHA1 Message Date
Adrian Prantl
e707c0c522 Move getVariableSize from Verifier.cpp into DIVariable::getSize() (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319125 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-28 00:57:51 +00:00
Craig Topper
d53bca96e3 [X86] Remove unnecessary fp<->int setOperationAction lines from a hasVLX block. NFCI
These lines all exist identically either under SSE2, AVX2 or AVX512. Given that VLX implies all of those, these aren't providing anything new.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319124 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-28 00:41:12 +00:00
Craig Topper
46ff4a6f49 [X86] Remove duplicate calls to setOperationAction. NFCI
These same calls exist a few lines down.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-28 00:16:42 +00:00
Rafael Espindola
816b1dbae0 Add an F_Delete flag.
For now this only changes the handle Access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319121 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-28 00:12:44 +00:00
Craig Topper
a8862041d4 [DAGCombiner] Don't combine aext(setcc) if the setcc is already using the target's preferred result type.
With AVX512 vXi1 types are legal so we shouldn't be extending them.

This change is similar to existing code in the zext(setcc) combine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319120 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 23:51:40 +00:00
Craig Topper
b7bbf042a3 [DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 23:51:31 +00:00
Rafael Espindola
fc69100d8e Add OpenFlags to the create(Unique|Temporary)File interfaces.
This will allow a future F_Delete flag to be specified when we want
the file to be automatically deleted on close.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319117 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 23:44:11 +00:00
Craig Topper
9ee906e259 [X86] Teach getSetCCResultType to handle more than just SimpleVTs when looking at larger than 512-bit vectors.
Which VTs are considered simple is determined by the superset of the legal types of all targets in LLVM. If we're looking at VTs that are going to be split down to 512-bits we should allow any VT not just simple ones since the simple list changes over time as new targets are added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319110 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:56:10 +00:00
Petr Hosek
ad30d137b8 [CMake] Pass LLVM_HOST_TRIPLE to external projects
LLVM runtimes rely on LLVM_HOST_TRIPLE being set in their builds
and tests so make sure it's being passed down.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319109 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:50:48 +00:00
Petr Hosek
567f85d531 [CMake][runtimes] Support monorepo layout with runtimes build
We introduce a new variable LLVM_ENABLE_RUNTIMES which works
similarly to LLVM_ENABLE_PROJECTS and allows specifying runtimes
that will be enabled in the runtimes build.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319107 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:31:11 +00:00
Michal Gorny
937b23b5ff [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading
Prevent unloading shared libraries on Linux when dlclose() is called.
This is necessary since command-line option parsing API relies on
registering the global option instances in the option parser instance
which can be loaded in a different shared library.

Given that we can't reliably remove those options when a library is
unloaded, the parser ends up containing dangling references. Since glibc
has relatively complex library unloading rules, some of the LLVM
libraries can be unloaded while others (including the Support library)
stay loaded causing quite a mayhem. To reliably prevent that, just
forbid unloading all libraries -- it's a very bad idea anyway.

While the issue arguably happens only with BUILD_SHARED_LIBS, it may
affect any library reusing llvm::cl interface.

Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154.
Previously hit by Fedora back in Feb 2016:
https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:23:09 +00:00
Greg Clayton
7e4d36c554 Fixed the ability to recursively get an attribute value from a DWARFDie.
The previous implementation would only look 1 DW_AT_specification or DW_AT_abstract_origin deep. This means DWARFDie::getName() would fail in certain cases. I ran into such a case while creating a tool that used the LLVM DWARF parser to generate a symbolication format so I have seen this in the wild.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:12:44 +00:00
Craig Topper
488f2df24c [X86] Remove lines that set v8f32 FP_ROUND/FP_EXTEND to Legal under AVX512. NFCI
We don't do this for narrow vectors under AVX or SSE features. We also don't set them to Expand like we do for many vectors op. Nor does TargetLoweringBase.cpp. This leads me to believe these default to Legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319103 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 22:01:17 +00:00
Peter Collingbourne
a94d5cd611 Revert r319090, "COFF: Do not create SectionChunks for discarded comdat sections."
Caused test failures in check-cfi on Windows.
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/20284

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 21:37:51 +00:00
Davide Italiano
568c078eb1 [Mem2Reg] Clang-format unformatted parts of this file. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319097 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 21:25:52 +00:00
Davide Italiano
7657920ec4 [SROA] Propagate !range metadata when moving loads.
This tries to propagate !range metadata to a pre-existing load
when a load is optimized out. This is done instead of adding an
assume because converting loads to and from assumes creates a
lot of IR.

Patch by Ariel Ben-Yehuda.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319096 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 21:25:13 +00:00
Sanjay Patel
8a189ea7bf [PartiallyInlineLibCalls][x86] add TTI hook to allow sqrt inlining to depend on arg rather than result
This should fix PR31455:
https://bugs.llvm.org/show_bug.cgi?id=31455

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319094 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 21:15:43 +00:00
Daniel Sanders
6d9a2314a0 Add release note about TargetRegistry change from r318352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319093 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 21:12:55 +00:00
Yaxun Liu
10796648d0 [AMDGPU] Update test nullptr.ll to use amdgiz environment
This test needs to be manually updated since it is difficult to do it with script.

Addr space 6 to 23 are only used by r600, therefore only check them for r600.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319092 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 20:48:21 +00:00
Peter Collingbourne
3e70082a17 COFF: Do not create SectionChunks for discarded comdat sections.
With this change, instead of creating a SectionChunk for each section
in the object file, we only create them when we encounter a prevailing
comdat section.

Also change how symbol resolution occurs between comdat symbols. Now
only the comdat leader participates in comdat resolution, and not any
other external associated symbols. This is more in line with how COFF
semantics are defined, and should allow for a more straightforward
implementation of non-ANY comdat types.

On my machine, this change reduces our runtime linking a release
build of chrome_child.dll with /nopdb from 5.65s to 4.54s (median of
50 runs).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319090 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 20:42:34 +00:00
Petr Hosek
aa56864bc3 Use LIST_SEPARATOR rather than escaping in ExternalProject_Add
Escaping ; in list arguments passed to ExternalProject_Add doesn't seem
to be working in newer versions of CMake (see
https://public.kitware.com/Bug/view.php?id=16137 for more details). Use
a custom LIST_SEPARATOR instead which is the officially supported way.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319089 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 20:41:53 +00:00
Zaara Syeda
63c8163add [PowerPC] Remove redundant TOC saves
This patch adds a peep hole optimization to remove any redundant toc save
instructions added as part of the call sequence for indirect calls. It removes
any toc saves within a function that are dominated by another toc save.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319087 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 20:26:36 +00:00
David Blaikie
55bf3758f5 Rename MCTargetOptionsCommandFlags.h to .def as it is not a normal/modular header as much as it is for stamping out some global/static variables
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319086 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:55:16 +00:00
Craig Topper
f8061938e0 [SelectionDAG] Add a debug message when vector_shuffle nodes are created.
We print a debug message when most nodes are created, but getVectorShuffle was missing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:54:57 +00:00
David Blaikie
d7eaf516d4 Rename CommandFlags.h -> CommandFlags.def
Since this isn't a real header - it includes static functions and had
external linkage variables (though this change makes them static, since
that's what they should be) so can't be included more than once in a
program.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319082 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:43:58 +00:00
David Blaikie
e01551e49e Fix -Werror build for signed/unsigned comparison with use of explicit unsigned literals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319081 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:43:57 +00:00
Michal Gorny
8eec0f94b4 Revert r319069 - [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading
This breaks one of the unit tests. Need to find a good solution.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319076 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:18:36 +00:00
Arnold Schwaighofer
ec3e964882 Inliner: Don't mark notail calls with the 'tail' attribute
enum TailCallKind { TCK_None = 0, TCK_Tail = 1, TCK_MustTail = 2,
                    TCK_NoTail = 3 };

TCK_NoTail is greater than TCK_Tail so taking the min does not do the
correct thing.

rdar://35639547

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319075 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:03:40 +00:00
Adam Nemet
1e5f63d692 Add opt-viewer testing
Detects whether we have the Python modules (pygments, yaml) required by
opt-viewer and hooks this up to REQUIRES.

This fixes https://bugs.llvm.org/show_bug.cgi?id=34129 (the lack of opt-viewer
testing).

It's also related to https://github.com/apple/swift/pull/12938 and the idea is
to expose LLVM_HAVE_OPT_VIEWER_MODULES to the Swift cmake.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319073 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:00:29 +00:00
Adam Nemet
aa1bb20e60 [opt-viewer] Fix option name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319072 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 19:00:22 +00:00
Jake Ehrlich
237a48e816 [llvm-objcopy] Add --strip-all-gnu and change --strip-all
GNU's --strip-all doesn't strip as aggressively as it could in general.
Currently llvm-objcopy copies the exact behavoir of GNU's --strip-all.
eu-strip is used as a drop in replacement for GNU strip/objcopy in many many
places without issue. eu-strip removes non-allocated sections and keeps
.gnu.warning* sections. Because --strip-all will likely be the most widely
used stripping option we should make --strip-all as aggressive as it can safely
be. Since we have evidence from eu-strip that this is a safe option we should
allow it. For those that might still have an issue afterwards I've added
--strip-all-gnu as an exact drop in replacement for GNU's --strip-all as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:56:01 +00:00
Zachary Turner
81a153c99a [BinaryStream] Support growable streams.
The existing library assumed that a stream's length would never
change.  This makes some things simpler, but it's not flexible
enough for what we need, especially for writable streams where
what you really want is for each call to write to actually append.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319070 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:48:37 +00:00
Michal Gorny
5f26e59f29 [cmake] Pass -Wl,-z,nodelete on Linux to prevent unloading
Prevent unloading shared libraries on Linux when dlclose() is called.
This is necessary since command-line option parsing API relies on
registering the global option instances in the option parser instance
which can be loaded in a different shared library.

Given that we can't reliably remove those options when a library is
unloaded, the parser ends up containing dangling references. Since glibc
has relatively complex library unloading rules, some of the LLVM
libraries can be unloaded while others (including the Support library)
stay loaded causing quite a mayhem. To reliably prevent that, just
forbid unloading all libraries -- it's a very bad idea anyway.

While the issue arguably happens only with BUILD_SHARED_LIBS, it may
affect any library reusing llvm::cl interface.

Based on patch provided Ross Hayward on https://bugs.gentoo.org/617154.
Previously hit by Fedora back in Feb 2016:
https://lists.freedesktop.org/archives/mesa-dev/2016-February/107242.html

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319069 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:34:52 +00:00
Craig Topper
359627ff70 [X86] Remove an unused isel pattern that looked for pshufd with v4f32 type.
I don't believe our current lowering/combining would ever produce such a node. We only produce integer typed pshufds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319068 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:25:54 +00:00
Sanjay Patel
c7c532a9fd [InstCombine] use 'auto' with 'dyn_cast'; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319067 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:19:32 +00:00
Craig Topper
8b3bfa3cd5 [X86] Teach combineX86ShuffleChain that AllowIntDomain requires at least SSE2.
I don't have a good test case for this at the moment. I was playing around with a change in legalizing and triggered this code to produce a PSHUFD with sse1 only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319066 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:15:14 +00:00
Simon Pilgrim
89f274998d [X86][AVX512] Tag AVX512 PACKSS/PACKUS/PMADDWD/PMADDUBSW instructions with SSE_PACK/SSE_PMADD schedule classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:14:18 +00:00
Krzysztof Parzyszek
ee0ba22d45 [Hexagon] Implement HexagonSubtarget::isHVXVectorType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:12:16 +00:00
Craig Topper
538fe17c99 [X86] Add avx512bw command lines to vselect-packss.ll
This shows several places where we fail to use masked move or blendm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319063 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 18:00:49 +00:00
Jonas Hahnfeld
a43196c145 Delete obsolete function mergeUseListsImpl
mergeUseLists is implemented iteratively since r243590.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 17:55:47 +00:00
Craig Topper
be0b1c9108 [X86] Make getSetCCResultType return vXi1 for any vXi32/vXi64 vector over 512 bits long when AVX512 is enabled.
Similar for vXi16/vXi8 with BWI.

Any vector larger than 512 bits will be split to 512 bits during legalization. But without this we will fold sexts with them before that making it difficult to recover leading to scalarization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319059 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 17:51:55 +00:00
Simon Pilgrim
7090837bc7 [X86][SSE] Fix roundpd instructions to correctly use IIC_SSE_ROUNDPD_* itineraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319054 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 17:29:49 +00:00
Dmitry Preobrazhensky
6f67bb8d45 [AMDGPU][MC][DISASSEMBLER][GFX9] Corrected decoding of GLOBAL/SCRATCH opcodes
See bug 35433: https://bugs.llvm.org/show_bug.cgi?id=35433

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

Reviewers: artem.tamazov, SamWot, arsenm

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319050 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 17:14:35 +00:00
Zaara Syeda
d89f47709a [Power9] Improvements to vector extract with variable index exploitation
This patch extends on to rL307174 to not use the power9 vector extract with
variable index instructions when extracting word element 1. For such cases,
the existing selection of MFVSRWZ provides a better sequence.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319049 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 17:11:03 +00:00
Fangrui Song
c66b9564b9 [XRay] Fix typo in docs. NFC
Reviewers: dberris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319047 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:59:26 +00:00
Simon Pilgrim
c17b615603 [X86][AVX512] Tag AVX512 sqrt instructions with SSE_SQRT schedule classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319045 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:43:18 +00:00
Jonas Devlieghere
8856af92ca [llvm-dwarfdump] Display DW_AT_high_pc as absolute value
DWARF4 relative DW_AT_high_pc values are now displayed as absolute
addresses. The relative value is only shown when explicitly dumping the
forms, i.e. in show-form or verbose mode.

```
DW_AT_low_pc	(0x0000000000000049)
DW_AT_high_pc	(0x00000019)
```

becomes

```
DW_AT_low_pc	(0x0000000000000049)
DW_AT_high_pc	(0x0000000000000062)
```

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

rdar://35416943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319044 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:40:46 +00:00
Sanjay Patel
52a381f749 [InstSimplify] use m_APFloat to simplify fcmp folds; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319043 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:37:09 +00:00
Sanjay Patel
b34814e683 [InstSimplify] add fcmp with negative constant tests; NFC
This is a superset of the tests proposed with D40012 to show another potential improvement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319041 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 16:08:34 +00:00
Nirav Dave
dbbb6c5fc3 [DAG] Do MergeConsecutiveStores again before Instruction Selection
Summary:

Now that store-merge is only generates type-safe stores, do a second
pass just before instruction selection to allow lowered intrinsics to
be merged as well.

Reviewers: jyknight, hfinkel, RKSimon, efriedma, rnk, jmolloy

Subscribers: javed.absar, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-27 15:28:15 +00:00