Matthias Braun [Tue, 28 Nov 2017 03:54:19 +0000 (03:54 +0000)]
MachineVerifier: Improve PHI operand checking
Additional checks for phi operands:
- first operand should be a virtual register def. It should not be
tied, implicit, internalread, earlyclobber or a read.
- The other operands should be register/mbb operands next to each other
- The register operands should not be implicit, internalread,
earlyclobber, debug or tied.
- We can perform most of the PHI checks even for unreachable blocks.
llvm-svn: 319140
Matthias Braun [Tue, 28 Nov 2017 03:23:07 +0000 (03:23 +0000)]
lit: Bring back -Dtool=xxx feature lost in r313928
llvm-svn: 319139
Rui Ueyama [Tue, 28 Nov 2017 02:15:26 +0000 (02:15 +0000)]
Factor out common code to Common/Strings.cpp.
Differential Revision: https://reviews.llvm.org/D40530
llvm-svn: 319138
Rafael Espindola [Tue, 28 Nov 2017 01:41:22 +0000 (01:41 +0000)]
Use FILE_FLAG_DELETE_ON_CLOSE for TempFile on windows.
We won't see the temp file no more.
llvm-svn: 319137
Craig Topper [Tue, 28 Nov 2017 01:36:33 +0000 (01:36 +0000)]
[X86] Make zero extend from v16i1/v8i1 to v16i8/v8i16/v16i16 not scalarize under AVX512.
llvm-svn: 319136
Craig Topper [Tue, 28 Nov 2017 01:36:31 +0000 (01:36 +0000)]
[X86] Add command line without AVX512BW/AVX512VL to bitcast-int-to-vector-bool-zext.ll.
llvm-svn: 319135
Rafael Espindola [Tue, 28 Nov 2017 01:34:20 +0000 (01:34 +0000)]
Move code. NFC.
This moves the TempFile implementation so that it can use system
specific code.
llvm-svn: 319134
Peter Collingbourne [Tue, 28 Nov 2017 01:30:07 +0000 (01:30 +0000)]
Reland r319090, "COFF: Do not create SectionChunks for discarded comdat sections." with a fix for debug sections.
If /debug was not specified, readSection will return a null
pointer for debug sections. If the debug section is associative with
another section, we need to make sure that the section returned from
readSection is not a null pointer before adding it as an associative
section.
Differential Revision: https://reviews.llvm.org/D40533
llvm-svn: 319133
Stephane Sezer [Tue, 28 Nov 2017 01:26:07 +0000 (01:26 +0000)]
Remove some duplicated code in UUID.cpp
Summary: Formatting needs to be done only once. Ran check-lldb and nothing changes.
Reviewers: clayborg, davide
Reviewed By: clayborg, davide
Subscribers: zturner, davide, lldb-commits
Differential Revision: https://reviews.llvm.org/D40519
llvm-svn: 319132
Rafael Espindola [Tue, 28 Nov 2017 01:25:38 +0000 (01:25 +0000)]
This reverts commit r319096 and r319097.
Revert "[SROA] Propagate !range metadata when moving loads."
Revert "[Mem2Reg] Clang-format unformatted parts of this file. NFCI."
Davide says they broke a bot.
llvm-svn: 319131
Matthias Braun [Tue, 28 Nov 2017 01:17:52 +0000 (01:17 +0000)]
ARM: Fix PR32578
https://llvm.org/PR32578
I simplified and converted the reproducer into a lit test.
Patch by Vedant Kumar!
llvm-svn: 319130
Dan Gohman [Tue, 28 Nov 2017 01:13:45 +0000 (01:13 +0000)]
[WebAssembly] Add options for using the nontrapping-fptoint feature.
This adds ways to control use of WebAssembly's new nontrapping-fptoint
feature.
llvm-svn: 319129
Dan Gohman [Tue, 28 Nov 2017 01:13:40 +0000 (01:13 +0000)]
[WebAssembly] Fix trapping behavior in fptosi/fptoui.
This adds code to protect WebAssembly's `trunc_s` family of opcodes
from values outside their domain. Even though such conversions have
full undefined behavior in C/C++, LLVM IR's `fptosi` and `fptoui` do
not, and only return undef.
This also implements the proposed non-trapping float-to-int conversion
feature and uses that instead when available.
llvm-svn: 319128
Rafael Espindola [Tue, 28 Nov 2017 01:04:51 +0000 (01:04 +0000)]
Store the real binding of shared symbols.
Currently we mark every shared symbol as STB_WEAK.
That is a hack to make it easy to decide when a .so is needed or not
because of a reference to a given symbol.
That hack leaks when we create copy relocations as shown by the update
to relocation-copy-alias.s.
This patch stores the original binding when we first read a shared
symbol. We still have to update the binding to weak if we see a weak
undef, but I find the logic easier to read where it is now.
llvm-svn: 319127
Adrian Prantl [Tue, 28 Nov 2017 00:57:53 +0000 (00:57 +0000)]
SROA: Avoid creating a fragment expression that covers the entire variable.
Fixes PR35416.
https://bugs.llvm.org/show_bug.cgi?id=35416
llvm-svn: 319126
Adrian Prantl [Tue, 28 Nov 2017 00:57:51 +0000 (00:57 +0000)]
Move getVariableSize from Verifier.cpp into DIVariable::getSize() (NFC)
llvm-svn: 319125
Craig Topper [Tue, 28 Nov 2017 00:41:12 +0000 (00:41 +0000)]
[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.
llvm-svn: 319124
Akira Hatanaka [Tue, 28 Nov 2017 00:36:29 +0000 (00:36 +0000)]
Insert padding before the __cxa_exception header to ensure the thrown
object is sufficiently aligned.
r303175 annotated field unwindHeader of __cxa_exception with attribute
'aligned' to ensure the thrown object following the __cxa_exception
header was sufficiently aligned. This caused changes in the field
offsets of __cxa_exception relative to the start of the thrown object,
which was an ABI breaking change for some clients.
Instead of annotating field unwindHeader, this commit inserts extra
space before the header. This ensures the thrown object following the
header is sufficiently aligned without changing the field offsets, thus
avoiding any ABI breakages.
rdar://problem/
25364625
rdar://problem/
35556163
llvm-svn: 319123
Craig Topper [Tue, 28 Nov 2017 00:16:42 +0000 (00:16 +0000)]
[X86] Remove duplicate calls to setOperationAction. NFCI
These same calls exist a few lines down.
llvm-svn: 319122
Rafael Espindola [Tue, 28 Nov 2017 00:12:44 +0000 (00:12 +0000)]
Add an F_Delete flag.
For now this only changes the handle Access.
llvm-svn: 319121
Craig Topper [Mon, 27 Nov 2017 23:51:40 +0000 (23:51 +0000)]
[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.
llvm-svn: 319120
Craig Topper [Mon, 27 Nov 2017 23:51:31 +0000 (23:51 +0000)]
[DAGCombiner] Use EVT::changeVectorElementTypeToInteger() instead of implementing manually.
llvm-svn: 319119
Rafael Espindola [Mon, 27 Nov 2017 23:44:11 +0000 (23:44 +0000)]
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.
llvm-svn: 319117
Reid Kleckner [Mon, 27 Nov 2017 23:42:20 +0000 (23:42 +0000)]
[clang-cl] Alias /Wall to -Weverything
cl interprets this option to mean enable every supported warning, which
is what Clang's -Weverything flag does.
llvm-svn: 319116
Evgeniy Stepanov [Mon, 27 Nov 2017 23:25:38 +0000 (23:25 +0000)]
[msan] Avoid shadowing a variable in common interceptors.
"offset" declared in a macro may shadow a variable with the same name
in the caller which is used in a macro argument. We are quite lucky
that it does not actually happen, but rename the variable anyway to
be on the safe side.
llvm-svn: 319115
Matt Morehouse [Mon, 27 Nov 2017 23:20:47 +0000 (23:20 +0000)]
[TSan] Do not run cond_cancel.c test on ppc64.
After r319004, the expected failure on ppc64 manifests as an infinite
loop.
llvm-svn: 319114
Sam Clegg [Mon, 27 Nov 2017 23:16:06 +0000 (23:16 +0000)]
Rename `Symtab` private memory to avoid confusion with global `Symtab`
This is also consistent with SymVector that exists in COFF port
and soon to be added to the wasm port.
Split off as part of https://reviews.llvm.org/D40371
Differential Revision: https://reviews.llvm.org/D40525
llvm-svn: 319113
Sam Clegg [Mon, 27 Nov 2017 23:09:19 +0000 (23:09 +0000)]
Fix typo in test name
llvm-svn: 319112
Aaron Ballman [Mon, 27 Nov 2017 22:59:33 +0000 (22:59 +0000)]
Add an option to misc-move-const-arg to not diagnose on trivially copyable types.
Patch by Oleg Smolsky
llvm-svn: 319111
Craig Topper [Mon, 27 Nov 2017 22:56:10 +0000 (22:56 +0000)]
[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.
llvm-svn: 319110
Petr Hosek [Mon, 27 Nov 2017 22:50:48 +0000 (22:50 +0000)]
[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
llvm-svn: 319109
Sam Clegg [Mon, 27 Nov 2017 22:49:16 +0000 (22:49 +0000)]
Consistent use of <internal> when displaying internal symbol names
Differential Revision: https://reviews.llvm.org/D40510
llvm-svn: 319108
Petr Hosek [Mon, 27 Nov 2017 22:31:11 +0000 (22:31 +0000)]
[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
llvm-svn: 319107
Marshall Clow [Mon, 27 Nov 2017 22:27:22 +0000 (22:27 +0000)]
Fix problems with r'890 when building on machines where sizeof(size_t) != sizeof(unsigned long long) and C++03
llvm-svn: 319106
Michal Gorny [Mon, 27 Nov 2017 22:23:09 +0000 (22:23 +0000)]
[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
llvm-svn: 319105
Greg Clayton [Mon, 27 Nov 2017 22:12:44 +0000 (22:12 +0000)]
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
llvm-svn: 319104
Craig Topper [Mon, 27 Nov 2017 22:01:17 +0000 (22:01 +0000)]
[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.
llvm-svn: 319103
Dan Gohman [Mon, 27 Nov 2017 21:39:16 +0000 (21:39 +0000)]
[WebAssemby] Enable "-mthread-model single" by default, for now.
The WebAssembly standard does not yet have threads, and while it's in the
process of being standardized, it'll take some time for it to make it
through and be available in all popular implementations. With increasing
numbers of people using the LLVM wasm backend through LLVM directly rather
than through Emscripten, it's increasingly important to have friendly
defaults.
See also https://bugs.llvm.org/show_bug.cgi?id=35411
llvm-svn: 319101
Peter Collingbourne [Mon, 27 Nov 2017 21:37:51 +0000 (21:37 +0000)]
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
llvm-svn: 319100
Kostya Kortchinsky [Mon, 27 Nov 2017 21:34:43 +0000 (21:34 +0000)]
[scudo] Workaround for uninitialized Bionic globals
Summary:
Bionic doesn't initialize its globals early enough. This causes issues when
trying to access them from a preinit_array (b/
25751302) or from another
constructor called before the libc one (b/
68046352). __progname is initialized
after the other globals, so we can check its value to know if calling
`getauxval` is safe.
Reviewers: alekseyshl
Reviewed By: alekseyshl
Subscribers: srhines, llvm-commits
Differential Revision: https://reviews.llvm.org/D40504
llvm-svn: 319099
Yan Zhang [Mon, 27 Nov 2017 21:30:10 +0000 (21:30 +0000)]
add new check to find OSSpinlock usage
Summary:
This check finds the use of methods related to OSSpinlock in Objective-C code, which should be deprecated due to livelock issues.
The following method call will be detected:
- OSSpinlockLock()
- OSSpinlockTry()
- OSSpinlockUnlcok()
Reviewers: hokein, benhamilton
Reviewed By: benhamilton
Subscribers: klimek, cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D40325
llvm-svn: 319098
Davide Italiano [Mon, 27 Nov 2017 21:25:52 +0000 (21:25 +0000)]
[Mem2Reg] Clang-format unformatted parts of this file. NFCI.
llvm-svn: 319097
Davide Italiano [Mon, 27 Nov 2017 21:25:13 +0000 (21:25 +0000)]
[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
llvm-svn: 319096
Stephane Sezer [Mon, 27 Nov 2017 21:16:37 +0000 (21:16 +0000)]
Mark UUID::GetByteSize() const
Summary:
This method doesn't modify anything in the object it's called on so we
can mark it const to make it usable in a const context.
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D40517
llvm-svn: 319095
Sanjay Patel [Mon, 27 Nov 2017 21:15:43 +0000 (21:15 +0000)]
[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
llvm-svn: 319094
Daniel Sanders [Mon, 27 Nov 2017 21:12:55 +0000 (21:12 +0000)]
Add release note about TargetRegistry change from r318352
llvm-svn: 319093
Yaxun Liu [Mon, 27 Nov 2017 20:48:21 +0000 (20:48 +0000)]
[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
llvm-svn: 319092
Marshall Clow [Mon, 27 Nov 2017 20:47:54 +0000 (20:47 +0000)]
Revert commit removing allocator support from packaged_task. Will investigate further
llvm-svn: 319091
Peter Collingbourne [Mon, 27 Nov 2017 20:42:34 +0000 (20:42 +0000)]
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
llvm-svn: 319090
Petr Hosek [Mon, 27 Nov 2017 20:41:53 +0000 (20:41 +0000)]
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
llvm-svn: 319089
Petr Hosek [Mon, 27 Nov 2017 20:29:13 +0000 (20:29 +0000)]
[CMake][Fuchsia] Disable terminfo database in Fuchsia toolchain
It's used to determine whether terminal supports colors, but within LLVM
it's only used in handful of places and in Clang it's only used in AST
dumper, otherwise Clang relies on the -fcolor-diagnostics flag which we
pass explicitly from our build system anyway. This eliminates one of the
shared libraries dependencies making the toolchain less reliant on the
host environment.
Differential Revision: https://reviews.llvm.org/D40329
llvm-svn: 319088
Zaara Syeda [Mon, 27 Nov 2017 20:26:36 +0000 (20:26 +0000)]
[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
llvm-svn: 319087
David Blaikie [Mon, 27 Nov 2017 19:55:16 +0000 (19:55 +0000)]
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
llvm-svn: 319086
Craig Topper [Mon, 27 Nov 2017 19:54:57 +0000 (19:54 +0000)]
[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.
llvm-svn: 319085
David Blaikie [Mon, 27 Nov 2017 19:54:06 +0000 (19:54 +0000)]
Fix for file renaming in LLVM (CommandFlags.h -> CommandFlags.def)
llvm-svn: 319084
Kostya Kortchinsky [Mon, 27 Nov 2017 19:53:53 +0000 (19:53 +0000)]
[fuchsia] Update Fuchsia with a new mmap implementation.
Summary:
Now that the sanitizer_common interface for MmapNoAccess / MmapFixed
have been refactored to allow a more OO-esque access pattern, update the
Fuchsia mmap implementation to take advantage of this.
Previously MmapNoAccess / MmapFixed relied on a global allocator_vmar,
since the sanitizer_allocator only called MmapNoAccess once. Now, we
create a new VMAR per ReservedAddressRange object.
This allows the sanitizer allocator to work in tandem with the Scudo
secondary allocator.
This is part 4 of a 4 part changeset:
* part 1 https://reviews.llvm.org/D38593
* part 2 https://reviews.llvm.org/D38592
* part 3 https://reviews.llvm.org/D38593
Reviewers: mcgrathr, cryptoad
Reviewed By: cryptoad
Subscribers: alekseyshl, mcgrathr, kubamracek, mehdi_amini
Differential Revision: https://reviews.llvm.org/D38595
llvm-svn: 319083
David Blaikie [Mon, 27 Nov 2017 19:43:58 +0000 (19:43 +0000)]
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.
llvm-svn: 319082
David Blaikie [Mon, 27 Nov 2017 19:43:57 +0000 (19:43 +0000)]
Fix -Werror build for signed/unsigned comparison with use of explicit unsigned literals
llvm-svn: 319081
Marshall Clow [Mon, 27 Nov 2017 19:43:28 +0000 (19:43 +0000)]
Implement LWG#2921 and LWG#2976 - removing allocator support from packaged_task.
llvm-svn: 319080
Alexey Bataev [Mon, 27 Nov 2017 19:38:58 +0000 (19:38 +0000)]
[OPENMP] Codegen for `distribute parallel for simd` directive.
Initial codegen for `#pragma omp distribute parallel for simd` directive
and its clauses.
llvm-svn: 319079
Alexey Bataev [Mon, 27 Nov 2017 19:38:52 +0000 (19:38 +0000)]
[OPENMP] Codegen for `distribute parallel for simd` directive.
Added proper codegen for `distribute parallel for simd` directive.
llvm-svn: 319078
Pirama Arumuga Nainar [Mon, 27 Nov 2017 19:18:39 +0000 (19:18 +0000)]
Switch CPU names not recognized by GNU assembler
Summary:
Switch CPU names not recognized by GNU assembler to a close CPU that it
does recognize. In this patch, kryo, falkor and saphira all get
replaced by cortex-a57 when invoking the assembler. In addition, krait
was already being replaced by cortex-a15.
Reviewers: weimingz
Subscribers: srhines, cfe-commits
Differential Revision: https://reviews.llvm.org/D40476
llvm-svn: 319077
Michal Gorny [Mon, 27 Nov 2017 19:18:36 +0000 (19:18 +0000)]
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.
llvm-svn: 319076
Arnold Schwaighofer [Mon, 27 Nov 2017 19:03:40 +0000 (19:03 +0000)]
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
llvm-svn: 319075
Marshall Clow [Mon, 27 Nov 2017 19:03:30 +0000 (19:03 +0000)]
Fix PR#35438 - bitset constructor does not zero unused bits
llvm-svn: 319074
Adam Nemet [Mon, 27 Nov 2017 19:00:29 +0000 (19:00 +0000)]
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
llvm-svn: 319073
Adam Nemet [Mon, 27 Nov 2017 19:00:22 +0000 (19:00 +0000)]
[opt-viewer] Fix option name
llvm-svn: 319072
Jake Ehrlich [Mon, 27 Nov 2017 18:56:01 +0000 (18:56 +0000)]
[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.
llvm-svn: 319071
Zachary Turner [Mon, 27 Nov 2017 18:48:37 +0000 (18:48 +0000)]
[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.
llvm-svn: 319070
Michal Gorny [Mon, 27 Nov 2017 18:34:52 +0000 (18:34 +0000)]
[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
llvm-svn: 319069
Craig Topper [Mon, 27 Nov 2017 18:25:54 +0000 (18:25 +0000)]
[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.
llvm-svn: 319068
Sanjay Patel [Mon, 27 Nov 2017 18:19:32 +0000 (18:19 +0000)]
[InstCombine] use 'auto' with 'dyn_cast'; NFC
llvm-svn: 319067
Craig Topper [Mon, 27 Nov 2017 18:15:14 +0000 (18:15 +0000)]
[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.
llvm-svn: 319066
Simon Pilgrim [Mon, 27 Nov 2017 18:14:18 +0000 (18:14 +0000)]
[X86][AVX512] Tag AVX512 PACKSS/PACKUS/PMADDWD/PMADDUBSW instructions with SSE_PACK/SSE_PMADD schedule classes
llvm-svn: 319065
Krzysztof Parzyszek [Mon, 27 Nov 2017 18:12:16 +0000 (18:12 +0000)]
[Hexagon] Implement HexagonSubtarget::isHVXVectorType
llvm-svn: 319064
Craig Topper [Mon, 27 Nov 2017 18:00:49 +0000 (18:00 +0000)]
[X86] Add avx512bw command lines to vselect-packss.ll
This shows several places where we fail to use masked move or blendm.
llvm-svn: 319063
Alexander Kornienko [Mon, 27 Nov 2017 17:59:26 +0000 (17:59 +0000)]
[clang-tidy] Rename qualified references to check class + support inconsistent names
llvm-svn: 319062
Jonas Hahnfeld [Mon, 27 Nov 2017 17:55:47 +0000 (17:55 +0000)]
Delete obsolete function mergeUseListsImpl
mergeUseLists is implemented iteratively since r243590.
Differential Revision: https://reviews.llvm.org/D40491
llvm-svn: 319061
Kamil Rytarowski [Mon, 27 Nov 2017 17:54:26 +0000 (17:54 +0000)]
Build more sanitizers for NetBSD
Summary:
Enable for NetBSD:
- MSan,
- TSan,
- LSan.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, dvyukov, vitalybuka
Reviewed By: eugenis
Subscribers: srhines, mgorny, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D40464
llvm-svn: 319060
Craig Topper [Mon, 27 Nov 2017 17:51:55 +0000 (17:51 +0000)]
[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.
llvm-svn: 319059
Artem Dergachev [Mon, 27 Nov 2017 17:37:09 +0000 (17:37 +0000)]
[analyzer] pr34766: Fix a crash on explicit std::initializer_list constructor.
We didn't support the following syntax:
(std::initializer_list<int>){12}
which suddenly produces CompoundLiteralExpr that contains
CXXStdInitializerListExpr.
Lift the assertion and instead pass the value through CompoundLiteralExpr
transparently, as it doesn't add much.
Differential Revision: https://reviews.llvm.org/D39803
llvm-svn: 319058
Ben Hamilton [Mon, 27 Nov 2017 17:34:03 +0000 (17:34 +0000)]
[polly] Set up .arcconfig to point to new Diffusion PLO repository
Summary: We want to automatically copy the appropriate mailing list
for review requests to the polly repository.
For context, see the proposal and discussion here:
http://lists.llvm.org/pipermail/cfe-dev/2017-November/056032.html
Similar to D40179, I set up a new Diffusion repository with callsign
"PLO" for polly:
https://reviews.llvm.org/source/polly/
This explicitly updates polly's .arcconfig to point to the new C
repository in Diffusion, which will let us use Herald rule H270.
llvm-svn: 319056
Artem Dergachev [Mon, 27 Nov 2017 17:31:16 +0000 (17:31 +0000)]
[analyzer] pr34404: Fix a crash on modeling pointers to indirect members.
We were crashing whenever a C++ pointer-to-member was taken, that was pointing
to a member of an anonymous structure field within a class, eg.
struct A {
struct {
int x;
};
};
// ...
&A::x;
Differential Revision: https://reviews.llvm.org/D39800
llvm-svn: 319055
Simon Pilgrim [Mon, 27 Nov 2017 17:29:49 +0000 (17:29 +0000)]
[X86][SSE] Fix roundpd instructions to correctly use IIC_SSE_ROUNDPD_* itineraries
llvm-svn: 319054
Ben Hamilton [Mon, 27 Nov 2017 17:21:24 +0000 (17:21 +0000)]
[clang] Set up .arcconfig to point to new Diffusion C repository
Summary:
We want to automatically copy cfe-commits@ on review requests
to the clang repository.
Similar to D40179, I set up a new Diffusion repository with callsign
"C" for clang:
https://reviews.llvm.org/source/clang/
This explicitly updates clang's .arcconfig to point to the new C
repository in Diffusion, which will let us use Herald rule H268.
Reviewers: klimek, sammccall
Reviewed By: klimek
Subscribers: dlj, bkramer
Differential Revision: https://reviews.llvm.org/D40494
llvm-svn: 319052
Rafael Espindola [Mon, 27 Nov 2017 17:18:09 +0000 (17:18 +0000)]
Add a missing test.
We were not testing that we correctly handled a .o with a weak symbol
after a .so.
llvm-svn: 319051
Dmitry Preobrazhensky [Mon, 27 Nov 2017 17:14:35 +0000 (17:14 +0000)]
[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
llvm-svn: 319050
Zaara Syeda [Mon, 27 Nov 2017 17:11:03 +0000 (17:11 +0000)]
[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
llvm-svn: 319049
Pavel Labath [Mon, 27 Nov 2017 17:06:42 +0000 (17:06 +0000)]
Remove custom TimePoint-formatting code
This was a temporary thing, until llvm has proper support for formatting
time. That time has come, so we can remove the relevant code. There
should be no change in the format of the time.
llvm-svn: 319048
Fangrui Song [Mon, 27 Nov 2017 16:59:26 +0000 (16:59 +0000)]
[XRay] Fix typo in docs. NFC
Reviewers: dberris
Differential Revision: https://reviews.llvm.org/D40461
llvm-svn: 319047
Alexey Bataev [Mon, 27 Nov 2017 16:54:08 +0000 (16:54 +0000)]
[OPENMP] Improve handling of cancel directives in target-based
constructs, NFC.
Improved handling of cancel|cancellation point directives inside
target-based for directives.
llvm-svn: 319046
Simon Pilgrim [Mon, 27 Nov 2017 16:43:18 +0000 (16:43 +0000)]
[X86][AVX512] Tag AVX512 sqrt instructions with SSE_SQRT schedule classes
llvm-svn: 319045
Jonas Devlieghere [Mon, 27 Nov 2017 16:40:46 +0000 (16:40 +0000)]
[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
llvm-svn: 319044
Sanjay Patel [Mon, 27 Nov 2017 16:37:09 +0000 (16:37 +0000)]
[InstSimplify] use m_APFloat to simplify fcmp folds; NFCI
llvm-svn: 319043
Marshall Clow [Mon, 27 Nov 2017 16:17:19 +0000 (16:17 +0000)]
Fix failure on C++03 bots
llvm-svn: 319042
Sanjay Patel [Mon, 27 Nov 2017 16:08:34 +0000 (16:08 +0000)]
[InstSimplify] add fcmp with negative constant tests; NFC
This is a superset of the tests proposed with D40012 to show another potential improvement.
llvm-svn: 319041
Ben Hamilton [Mon, 27 Nov 2017 15:58:26 +0000 (15:58 +0000)]
[clang-tools-extra] Fix small typo in docs/ReleaseNotes.rst
Summary:
This is mainly a test diff to check the new Herald rule I
added in LLVM Phabricator to automatically Cc: cfe-commits on all
clang-tools-extra diffs.
Reviewers: Wizard, hokein, klimek
Reviewed By: Wizard
Subscribers: dlj, bkramer, sammccall
Differential Revision: https://reviews.llvm.org/D40180
llvm-svn: 319040
Ben Hamilton [Mon, 27 Nov 2017 15:58:25 +0000 (15:58 +0000)]
[clang-tools-extra] Set up .arcconfig to point to new Diffusion CTE repository
Summary:
I'm testing out a new Diffusion repository `CTE`:
https://reviews.llvm.org/source/clang-tools-extra/
This explicitly updates clang-tools-extra's `.arcconfig` to point to
the new `CTE` repository in Diffusion, which will let us set up Herald
rules, etc.
Reviewers: klimek, sammccall
Reviewed By: sammccall
Subscribers: bkramer, dlj
Differential Revision: https://reviews.llvm.org/D40179
llvm-svn: 319039
Marshall Clow [Mon, 27 Nov 2017 15:51:36 +0000 (15:51 +0000)]
Implement LWG#2948: unique_ptr does not define operator<< for stream output
llvm-svn: 319038
Vassil Vassilev [Mon, 27 Nov 2017 15:32:00 +0000 (15:32 +0000)]
Constify. NFC.
llvm-svn: 319037