Hans Wennborg [Mon, 18 Jul 2016 18:05:19 +0000 (18:05 +0000)]
Trunk release notes are now for 4.0.0
The 3.9 release are on the 3.9 branch.
llvm-svn: 275844
Vedant Kumar [Mon, 18 Jul 2016 18:02:54 +0000 (18:02 +0000)]
[llvm-cov] Re-write a very opaque comment (NFC)
llvm-svn: 275843
Hans Wennborg [Mon, 18 Jul 2016 18:02:23 +0000 (18:02 +0000)]
Trunk release notes now refer to 4.0.0
llvm-svn: 275842
Vedant Kumar [Mon, 18 Jul 2016 17:53:16 +0000 (17:53 +0000)]
[llvm-cov] Place anchors around line numbers in html reports
Based on a suggestion by Harlan Haskins!
llvm-svn: 275840
Vedant Kumar [Mon, 18 Jul 2016 17:53:12 +0000 (17:53 +0000)]
[llvm-cov] Clean up error reporting (NFC)
Use CodeCoverageTool::{error,warning} everywhere.
llvm-svn: 275837
Hans Wennborg [Mon, 18 Jul 2016 17:51:04 +0000 (17:51 +0000)]
Bump the trunk version to 4.0.0svn.
Differential Revision: https://reviews.llvm.org/D21821
llvm-svn: 275827
Reid Kleckner [Mon, 18 Jul 2016 17:49:40 +0000 (17:49 +0000)]
[clang-cl] Reinstate -gline-tables-only as a CoreOption while we sort out the fate of /Zd
llvm-svn: 275826
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:36:46 +0000 (17:36 +0000)]
[Hexagon] Handle returning small structures by value
This is not compliant with the official ABI, but allows experimentation
with calling conventions.
llvm-svn: 275825
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:34:49 +0000 (17:34 +0000)]
[Hexagon] Revert r275822: mistake in commit message
llvm-svn: 275824
Simon Pilgrim [Mon, 18 Jul 2016 17:32:59 +0000 (17:32 +0000)]
[X86][AVX] Add target shuffle decode support for VBROADCAST
Currently we only decode broadcasts from a vector of the same size.
llvm-svn: 275823
Krzysztof Parzyszek [Mon, 18 Jul 2016 17:30:41 +0000 (17:30 +0000)]
[Hexagon] Handle returning small structures by value
This is compliant with the official ABI, but allows experimentation with
calling conventions.
llvm-svn: 275822
Jason Henline [Mon, 18 Jul 2016 17:26:26 +0000 (17:26 +0000)]
Set up arcconfig for parallel-libs project
llvm-svn: 275821
Devin Coughlin [Mon, 18 Jul 2016 17:23:30 +0000 (17:23 +0000)]
[analyzer] Add checker modeling potential C++ self-assignment
This checker checks copy and move assignment operators whether they are
protected against self-assignment. Since C++ core guidelines discourages
explicit checking for `&rhs==this` in general we take a different approach: in
top-frame analysis we branch the exploded graph for two cases, where &rhs==this
and &rhs!=this and let existing checkers (e.g. unix.Malloc) do the rest of the
work. It is important that we check all copy and move assignment operator in top
frame even if we checked them already since self-assignments may happen
undetected even in the same translation unit (e.g. using random indices for an
array what may or may not be the same).
A patch by Ádám Balogh!
Differential Revision: https://reviews.llvm.org/D19311
llvm-svn: 275820
Marshall Clow [Mon, 18 Jul 2016 17:23:06 +0000 (17:23 +0000)]
Don't use pthread initializers in constexpr constructors. Patch by elram. Reviewed at https://reviews.llvm.org/D21637.
llvm-svn: 275819
Chih-Hung Hsieh [Mon, 18 Jul 2016 17:20:09 +0000 (17:20 +0000)]
[X86] Accept SELECT op code for x86-64 fp128 type
DAGTypeLegalizer::CanSkipSoftenFloatOperand should allow
SELECT op code for x86_64 fp128 type for MME targets,
so SoftenFloatOperand does not abort on SELECT op code.
Differential Revision: http://reviews.llvm.org/D21758
llvm-svn: 275818
Paul Robinson [Mon, 18 Jul 2016 17:19:12 +0000 (17:19 +0000)]
Release note for 'nodebug' on variables
llvm-svn: 275817
Etienne Bergeron [Mon, 18 Jul 2016 17:15:22 +0000 (17:15 +0000)]
revert https://reviews.llvm.org/D22393
It is breaking build 32-bit build bots.
llvm-svn: 275816
David Majnemer [Mon, 18 Jul 2016 17:03:09 +0000 (17:03 +0000)]
[MathExtras] Fix UB in minIntN
We negated a value with a signed type which invited problems when that
value was the most negative signed number. Use an unsigned type
for the value instead. It will compute the same twos complement
result without the UB.
llvm-svn: 275815
Jason Henline [Mon, 18 Jul 2016 16:44:25 +0000 (16:44 +0000)]
Add streamexecutor directory
llvm-svn: 275814
Matt Arsenault [Mon, 18 Jul 2016 16:42:50 +0000 (16:42 +0000)]
Replace llvm.AMDGPU.ldexp with llvm.amdgcn.ldexp
It didn't really work on r600 to begin with, which should
get its own intrinsic.
llvm-svn: 275813
Adam Nemet [Mon, 18 Jul 2016 16:37:32 +0000 (16:37 +0000)]
[LoopDist] This test does not require ASSERTS
Only its counterpart, diagnostics-with-hotness-lazy-BFI.ll, which
invokes opt with -debug-only=.
llvm-svn: 275812
Adam Nemet [Mon, 18 Jul 2016 16:29:27 +0000 (16:29 +0000)]
[LoopDist] Port to new PM
Summary:
The direct motivation for the port is to ensure that the OptRemarkEmitter
tests work with the new PM.
This remains a function pass because we not only create multiple loops
but could also version the original loop.
In the test I need to invoke opt
with -passes='require<aa>,loop-distribute'. LoopDistribute does not
directly depend on AA however LAA does. LAA uses getCachedResult so
I *think* we need manually pull in 'aa'.
Reviewers: davidxl, silvas
Subscribers: sanjoy, llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22437
llvm-svn: 275811
Adam Nemet [Mon, 18 Jul 2016 16:29:21 +0000 (16:29 +0000)]
[OptRemarkEmitter] Port to new PM
Summary:
The main goal is to able to start using the new OptRemarkEmitter
analysis from the LoopVectorizer. Since the vectorizer was recently
converted to the new PM, it makes sense to convert this analysis as
well.
This pass is currently tested through the LoopDistribution pass, so I am
also porting LoopDistribution to get coverage for this analysis with the
new PM.
Reviewers: davidxl, silvas
Subscribers: llvm-commits, mzolotukhin
Differential Revision: https://reviews.llvm.org/D22436
llvm-svn: 275810
Adam Nemet [Mon, 18 Jul 2016 16:29:17 +0000 (16:29 +0000)]
Sort include headers
llvm-svn: 275809
Simon Pilgrim [Mon, 18 Jul 2016 16:17:34 +0000 (16:17 +0000)]
[X86][AVX2] Added tests that demonstrate duplicate broadcasts
We don't yet decode broadcasts as a target shuffle
llvm-svn: 275808
Xinliang David Li [Mon, 18 Jul 2016 16:16:12 +0000 (16:16 +0000)]
Code refactoring: extract path prefix handling code
.. into reusable interfaces. No functional change is expected.
llvm-svn: 275807
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:15:15 +0000 (16:15 +0000)]
[Hexagon] Misc changes to HexagonMachineScheduler, NFC
- Remove duplicated code.
- Convert loop to range-for.
llvm-svn: 275806
Kelvin Li [Mon, 18 Jul 2016 16:09:53 +0000 (16:09 +0000)]
[OpenMP] update test cases for -std=c++11 compile
target_parallel_for_simd_collapse_messages.cpp and target_parallel_for_simd_ordered_messages.cpp give different diagnostic messages in compiling with -std=c++11. The test cases are updated to make it compatible.
Differential Revision: https://reviews.llvm.org/D22417
llvm-svn: 275805
Krzysztof Parzyszek [Mon, 18 Jul 2016 16:05:27 +0000 (16:05 +0000)]
[Hexagon] Enable .cur formation in MISched for Hexagon V60
Schedule a load and its use in the same packet in MISched. Previously,
isResourceAvailable was returning false for dependences in the same
packet, which prevented MISched from packetizing a load and its use in
the same packet for v60.
Patch by Ikhlas Ajbar.
llvm-svn: 275804
Rafael Espindola [Mon, 18 Jul 2016 16:05:09 +0000 (16:05 +0000)]
Pass section by reference. NFC.
llvm-svn: 275803
Alexander Kornienko [Mon, 18 Jul 2016 15:51:31 +0000 (15:51 +0000)]
Revert "r275571 [DSE]Enhance shorthening MemIntrinsic based on OverlapIntervals"
Causes https://llvm.org/bugs/show_bug.cgi?id=28588
llvm-svn: 275801
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:47:25 +0000 (15:47 +0000)]
[Hexagon] Add verbose debugging mode to Hexagon MI Scheduler
Patch by Sergei Larin.
llvm-svn: 275799
Tobias Grosser [Mon, 18 Jul 2016 15:44:32 +0000 (15:44 +0000)]
GPGPU: collect array references
Initialize the list of references to a GPU array to ensure that the arrays that
need to be passed to kernel calls are computed correctly. Furthermore, the very
same information is also necessary to compute synchronization correctly. As the
functionality to compute these references is already available, what is left for
us to do is only to connect the necessary functionality to compute array
reference information.
llvm-svn: 275798
Tobias Grosser [Mon, 18 Jul 2016 15:44:25 +0000 (15:44 +0000)]
GPGPU: Pull implementation out of class definition
This will allow us to see the full class definition even after we add
non-trivial implementations of the different member functions.
llvm-svn: 275797
Nemanja Ivanovic [Mon, 18 Jul 2016 15:30:00 +0000 (15:30 +0000)]
[PowerPC] Remove redundant direct moves when extracting integers and converting to FP
This patch corresponds to review:
https://reviews.llvm.org/D21354
We use direct moves for extracting integer elements from vectors. We also use
direct moves when converting integers to FP. When these operations are chained,
we get a direct move out of a VSR followed by a direct move back into a VSR.
These are redundant - all we need to do is line up the element and convert.
llvm-svn: 275796
Nirav Dave [Mon, 18 Jul 2016 15:24:03 +0000 (15:24 +0000)]
[MC] Cleanup Error Handling in AsmParser
Add parseToken and compatriot functions to stitch error checks in
straight linear code. As part of this fix some erronous handling of
directives where the EndOfStatement token either was not checked or
Lexed on termination.
Reviewers: rnk, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D22312
llvm-svn: 275795
Krzysztof Parzyszek [Mon, 18 Jul 2016 15:17:10 +0000 (15:17 +0000)]
[Hexagon] Use timing class info as tie-breaker in machine scheduler
Patch by Sirish Pande.
llvm-svn: 275794
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:52:13 +0000 (14:52 +0000)]
[Hexagon] HexagonMachineScheduler should account for resources
The machine scheduler needs to account for available resources
more accurately in order to avoid scheduling an instruction that
forces a new packet to be created.
This occurs in two ways: First, an instruction without an available
resource may have a large priority due to other metrics and be
scheduled when there are other instructions with available resources.
Second, an instruction with a non-zero latency may become available
prematurely. In both these cases, we attempt change the priority
in order to allow a better instruction to be scheduled.
Patch by Brendon Cahoon.
llvm-svn: 275793
Adhemerval Zanella [Mon, 18 Jul 2016 14:47:18 +0000 (14:47 +0000)]
[asan] Enable 48-bit VMA support on aarch64
This patch adds 48-bits VMA support for asan on aarch64. The current
47-bit mask is not suffice since on aarch64 kernel with 48-bit vma
(default on ubuntu 16.04) the process may use full VMA range as:
[...]
ffffa39a7000-
ffffa39a8000 r--p
00000000 00:00 0 [vvar]
ffffa39a8000-
ffffa39a9000 r-xp
00000000 00:00 0 [vdso]
ffffa39a9000-
ffffa39aa000 r--p
0001c000 08:02
13631554 /lib/aarch64-linux-gnu/ld-2.23.so
ffffa39aa000-
ffffa39ac000 rw-p
0001d000 08:02
13631554 /lib/aarch64-linux-gnu/ld-2.23.so
ffffc2227000-
ffffc2248000 rw-p
00000000 00:00 0 [stack]
llvm-svn: 275792
Pavel Labath [Mon, 18 Jul 2016 14:42:01 +0000 (14:42 +0000)]
Revert "[test] Report error when inferior test processes exit with a non-zero code"
This reverts r275782.
The problem with the commit is that it reports an additional "exit (1)" error for every file
containing a failing test, which is far more than I had intended to do. I'll need to come up with
a more fine-grained way of achieving the result.
llvm-svn: 275791
Krzysztof Parzyszek [Mon, 18 Jul 2016 14:23:10 +0000 (14:23 +0000)]
[Hexagon] Fix zero latency instructions with multiple predecessors
An instruction may have multiple predecessors that are candidates
for using .cur. However, only one of them can use .cur in the
packet. When this case occurs, we need to make sure that only
one of the dependences gets a 0 latency value.
Patch by Brendon Cahoon.
llvm-svn: 275790
Alexander Kornienko [Mon, 18 Jul 2016 14:13:18 +0000 (14:13 +0000)]
Fixed errors in docs.
llvm-svn: 275789
Simon Pilgrim [Mon, 18 Jul 2016 13:20:54 +0000 (13:20 +0000)]
[SLPVectorizer][X86] Added sqrt vectorization tests
llvm-svn: 275788
Marshall Clow [Mon, 18 Jul 2016 13:19:00 +0000 (13:19 +0000)]
Change a couple ifdefs from '#if __cplusplus >= 2011xxx' to '#ifndef _LIBCPP_CXX03_LANG'. No functionality change.
llvm-svn: 275787
Simon Dardis [Mon, 18 Jul 2016 13:17:31 +0000 (13:17 +0000)]
[inlineasm] Propagate operand constraints to the backend
When SelectionDAGISel transforms a node representing an inline asm
block, memory constraint information is not preserved. This can cause
constraints to be broken when a memory offset is of the form:
offset + frame index
when the frame is resolved.
By propagating the constraints all the way to the backend, targets can
enforce memory operands of inline assembly to conform to their constraints.
For MIPSR6, some instructions had their offsets reduced to 9 bits from
16 bits such as ll/sc. This becomes problematic when using inline assembly
to perform atomic operations, as an offset can generated that is too big to
encode in the instruction.
Reviewers: dsanders, vkalintris
Differential Review: https://reviews.llvm.org/D21615
llvm-svn: 275786
Nitesh Jain [Mon, 18 Jul 2016 12:37:44 +0000 (12:37 +0000)]
[LLVM][MIPS] Revert support for FRE.
Reviewers: jaydeep
Subscribers: bhushan, mohit.bhakkad, slthakur, llvm-commits
llvm-svn: 275785
Tobias Grosser [Mon, 18 Jul 2016 12:02:44 +0000 (12:02 +0000)]
test: Add missing 'REQUIRES' line
llvm-svn: 275784
Tobias Grosser [Mon, 18 Jul 2016 11:56:39 +0000 (11:56 +0000)]
GPGPU: Create host control flow
Create LLVM-IR for all host-side control flow of a given GPU AST. We implement
this by introducing a new GPUNodeBuilder class derived from IslNodeBuilder. The
IslNodeBuilder will take care of generating all general-purpose ast nodes, but
we provide our own createUser implementation to handle the different GPU
specific user statements. For now, we just skip any user statement and only
generate a host-code sceleton, but in subsequent commits we will add handling of
normal ScopStmt's performing computations, kernel calls, as well as host-device
data transfers. We will also introduce run-time check generation and LICM in
subsequent commits.
llvm-svn: 275783
Pavel Labath [Mon, 18 Jul 2016 11:27:19 +0000 (11:27 +0000)]
[test] Report error when inferior test processes exit with a non-zero code
Summary:
We've run into this problem when the test errored out so early (because it could not connect to
the remote device), that the code in D20193 did not catch the error. This resulted in the test
suite reporting success with 0 tests being run.
This patch makes sure that any non-zero exit code from the inferior process gets reported as an
error. Basically I expand the concept of "exceptional exits", which was previously being used for
signals to cover these cases as well.
Reviewers: tfiala, zturner
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D22404
llvm-svn: 275782
Haojian Wu [Mon, 18 Jul 2016 10:04:45 +0000 (10:04 +0000)]
[include-fixer] Add an options allow moving the cursor to #include line in vim
after inserting a missing header.
Summary:
A small improvement: Don't print newline character at the end of message, so
that users don't have to type ENTER manually after running the python script.
Reviewers: bkramer
Subscribers: djasper, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D22351
llvm-svn: 275781
Mohit K. Bhakkad [Mon, 18 Jul 2016 09:23:23 +0000 (09:23 +0000)]
[Compiler-rt][MIPS] Fix simple test failure when using gcc
Reviewers: dsanders
Subscribers: slthakur, jaydeep, llvm-commits, Sanitizers
Differential Revision: https://reviews.llvm.org/D22453
llvm-svn: 275780
Nicolai Haehnle [Mon, 18 Jul 2016 09:02:47 +0000 (09:02 +0000)]
AMDGPU: Disable AMDGPUPromoteAlloca pass for shader calling conventions.
Summary:
The work item intrinsics are not available for the shader
calling conventions. And even if we did hook them up most
shader stages haves some extra restrictions on the amount
of available LDS.
Reviewers: tstellarAMD, arsenm
Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl
Differential Revision: https://reviews.llvm.org/D20728
llvm-svn: 275779
Howard Hellyer [Mon, 18 Jul 2016 08:25:59 +0000 (08:25 +0000)]
Implement GetMemoryRegions() for Windows Minidumps and live processes.
Summary:
This patch fills in the implementation of GetMemoryRegions() on the Windows live process and minidump implementations of lldb_private::Process (ProcessWindowsLive::GetMemoryRegionInfo and ProcessWinMiniDump::Impl::GetMemoryRegionInfo.) The GetMemoryRegions API was added under: http://reviews.llvm.org/D20565
The existing Windows implementations didn’t fill in the start and end addresses within MemoryRegionInfo. This patch fixes that and adds support for the new mapped flag on MemoryRegionInfo that says whether a memory range is mapped into the process address space or not.
The behaviour of both live and core implementations should match the behaviour documented on Process::GetMemoryRegionInfo (in Process.h) which in turn should match the behaviour of the qMemoryRegionInfo query documented in lldb-gdb-remote.txt.
Reviewers: clayborg, amccarth
Subscribers: amccarth, lldb-commits
Differential Revision: https://reviews.llvm.org/D22352
llvm-svn: 275778
Diana Picus [Mon, 18 Jul 2016 07:48:42 +0000 (07:48 +0000)]
[ARM] Update test to use CHECK-LABEL. NFCI.
llvm-svn: 275777
Diana Picus [Mon, 18 Jul 2016 07:35:14 +0000 (07:35 +0000)]
[ARM] Skip inline asm memory operands in DAGToDAGISel
The current logic for handling inline asm operands in DAGToDAGISel interprets
the operands by looking for constants, which should represent the flags
describing the kind of operand we're dealing with (immediate, memory, register
def etc). The operands representing actual data are skipped only if they are
non-const, with the exception of immediate operands which are skipped explicitly
when a flag describing an immediate is found.
The oversight is that memory operands may be const too (e.g. for device drivers
reading a fixed address), so we should explicitly skip the operand following a
flag describing a memory operand. If we don't, we risk interpreting that
constant as a flag, which is definitely not intended.
Fixes PR26038
Differential Revision: https://reviews.llvm.org/D22103
llvm-svn: 275776
Craig Topper [Mon, 18 Jul 2016 06:49:32 +0000 (06:49 +0000)]
[AVX512] Add EVEX versions of scalar ADD/SUB/MUL/DIV to load folding tables.
llvm-svn: 275775
Craig Topper [Mon, 18 Jul 2016 06:49:29 +0000 (06:49 +0000)]
[X86] Fix test checks to include leading 'v' on avx mnemonic names.
llvm-svn: 275774
Diana Picus [Mon, 18 Jul 2016 06:48:25 +0000 (06:48 +0000)]
[ARM] Honour ABI for rem under -O0 for EABI, GNUEABI, Android and Musl
At higher optimization levels, we generate the libcall for DIVREM_Ix, which is
fine: aeabi_{u|i}divmod. At -O0 we generate the one for REM_Ix, which is the
default {u}mod{q|h|s|d}i3.
This commit makes sure that we don't generate REM_Ix calls for ABIs that
don't support them (i.e. where we need to use DIVREM_Ix instead). This is
achieved by bailing out of FastISel, which can't handle non-double multi-reg
returns, and letting the legalization infrastructure expand the REM_Ix calls.
It also updates the divmod-eabi.ll test to run under -O0 as well, and adds some
Windows checks to it to make sure we don't break things for it.
Fixes PR27068
Differential Revision: https://reviews.llvm.org/D21926
llvm-svn: 275773
Eric Fiselier [Mon, 18 Jul 2016 06:15:55 +0000 (06:15 +0000)]
Remove locale tests that depend on enviroment variables.
Constructing a std::locale object from an empty string selects the language
from the current environment variables. If the environment variables name
a locale that doesn't exist, or isn't installed, then the construction of
facets using that locale may throw.
This patch removes tests that use 'std::locale l("")'.
The optimal solution would be to manually set the environment variables
in the test. Unfortunately there is no portable way to do this.
llvm-svn: 275772
Craig Topper [Mon, 18 Jul 2016 06:14:59 +0000 (06:14 +0000)]
[AVX512] Add KADD/KAND/KOR/KXOR to X86InstrInfo::isAssociativeAndCommutative.
llvm-svn: 275771
Craig Topper [Mon, 18 Jul 2016 06:14:57 +0000 (06:14 +0000)]
[X86] Add VPMULLW/D/Q instructions to X86InstrInfo::isAssociativeAndCommutative.
llvm-svn: 275770
Craig Topper [Mon, 18 Jul 2016 06:14:54 +0000 (06:14 +0000)]
[X86] Add VPADD instructions to X86InstrInfo::isAssociativeAndCommutative.
llvm-svn: 275769
Craig Topper [Mon, 18 Jul 2016 06:14:50 +0000 (06:14 +0000)]
[X86] Add floating point packed logical ops to X86InstrInfo::isAssociativeAndCommutative.
llvm-svn: 275768
Craig Topper [Mon, 18 Jul 2016 06:14:47 +0000 (06:14 +0000)]
[X86] Add AVX512 instructions to X86InstrInfo::isAssociativeAndCommutative.
llvm-svn: 275767
Craig Topper [Mon, 18 Jul 2016 06:14:45 +0000 (06:14 +0000)]
[X86] Add more AVX512 instructions to X86InstrInfo::isHighLatencyDef. Also add all packed fp division instructions.
llvm-svn: 275766
Craig Topper [Mon, 18 Jul 2016 06:14:43 +0000 (06:14 +0000)]
[X86] Add AVX512 load opcodes and a couple AVX load opcodes to X86InstrInfo::areLoadsFromSameBasePtr.
llvm-svn: 275765
Craig Topper [Mon, 18 Jul 2016 06:14:39 +0000 (06:14 +0000)]
[X86] Add more opcodes to isFrameLoadOpcode/isFrameStoreOpcode. Mainly AVX-512 related.
llvm-svn: 275764
Craig Topper [Mon, 18 Jul 2016 06:14:34 +0000 (06:14 +0000)]
[AVX512] Use VMOVAPSZ128rr/VMOVAPS256rr for VR128X/VR256X physreg moves when VLX is supported.
Ideally we would use VEX encoded moves instead of EVEX if the high 16 registers aren't referenced, but this a good first step.
llvm-svn: 275763
Craig Topper [Mon, 18 Jul 2016 06:14:26 +0000 (06:14 +0000)]
[X86] Fix 80-column violations. NFC
llvm-svn: 275762
David Majnemer [Mon, 18 Jul 2016 06:11:37 +0000 (06:11 +0000)]
[GVNHoist] Change the key for VNtoInsns to a pair
While debugging GVNHoist, I found it confusing that the entries in a
VNtoInsns were not always value numbers. They _usually_ were except for
StoreInst in which case they were a hash of two different value numbers.
This leads to two observations:
- It is more difficult to debug things when the semantic contents of
VNtoInsns changes over time.
- Using a single value number is not much cheaper, the value of
VNtoInsns is a SmallVector.
- It is not immediately clear what the algorithm would do if there were
hash collisions in the StoreInst case.
Using a DenseMap of std::pair sidesteps all of this.
N.B. The changes in the test were due their sensitivity to the
iteration order of VNtoInsns which has changed.
llvm-svn: 275761
Jonas Hahnfeld [Mon, 18 Jul 2016 06:06:50 +0000 (06:06 +0000)]
[libcxx][filesystem] Remove setgid from parent before testing permissions
man page for mkdir says: "If the parent directory has the set-group-ID bit set,
then so will the newly created directory."
Differential Revision: https://reviews.llvm.org/D22265
llvm-svn: 275760
Eric Fiselier [Mon, 18 Jul 2016 06:01:50 +0000 (06:01 +0000)]
Rework libatomic handling in CMake and LIT.
This patch updates the way libc++ handles checking for libatomic, in part
to prepare for https://reviews.llvm.org/D22073.
Changes:
* 'LIBCXX_HAS_ATOMIC_LIB' is now set whenever libatomic is available even libc++
doesn't need to manually link it.
* 'LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB' is now used to detect when libatomic
needs to be manually linked.
* 'LIBCXX_HAS_ATOMIC_LIB' now adds 'libatomic' as a available feature in the
test suite.
llvm-svn: 275759
Vedant Kumar [Mon, 18 Jul 2016 04:49:42 +0000 (04:49 +0000)]
[llvm-cov] Attempt to fix a test failure on Windows
Don't make the test/tools/llvm-cov/demangle.test depend on the order in
which symbols are seen, or on the exact formatting llvm-cov emits after
a symbol is printed. This is an attempt to fix a Windows bot failure:
http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/9141
I don't know what the root cause of the failure is, or why the
showTemplateInstantiations test doesn't fail in the same way on the
Windows bots. However, this measure can't hurt, and it'll at least get
me on the blamelists again.
llvm-svn: 275758
Eric Fiselier [Mon, 18 Jul 2016 04:48:37 +0000 (04:48 +0000)]
Improve ABI tests for std::pair.
llvm-svn: 275757
NAKAMURA Takumi [Mon, 18 Jul 2016 03:23:25 +0000 (03:23 +0000)]
Revert r275678, "Revert "Revert r275027 - Let FuncAttrs infer the 'returned' argument attribute""
This reverts also r275029, "Update Clang tests after adding inference for the returned argument attribute"
It broke LTO build. Seems miscompilation.
llvm-svn: 275756
Eric Fiselier [Mon, 18 Jul 2016 03:00:09 +0000 (03:00 +0000)]
Add checkpoint diagnostics to help diagnose buildbot failures.
llvm-svn: 275754
Eric Fiselier [Mon, 18 Jul 2016 02:29:33 +0000 (02:29 +0000)]
Prevent failures by marking Clock::is_steady tests as UNSUPPORTED: asan.
llvm-svn: 275753
Eric Fiselier [Mon, 18 Jul 2016 02:05:52 +0000 (02:05 +0000)]
Fix arc config to use https
llvm-svn: 275752
Eric Fiselier [Mon, 18 Jul 2016 02:05:31 +0000 (02:05 +0000)]
Add includes in test. Patch from STL@microsoft.com
llvm-svn: 275751
Eric Fiselier [Mon, 18 Jul 2016 02:02:49 +0000 (02:02 +0000)]
Upgrade arcconfig to use https
llvm-svn: 275750
Eric Fiselier [Mon, 18 Jul 2016 01:58:37 +0000 (01:58 +0000)]
Rename and rework `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR`. Move FreeBSD configuration in-tree.
This patch does the following:
* It renames `_LIBCPP_TRIVIAL_PAIR_COPY_CTOR` to `_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR`.
* It automatically enables this option on FreeBSD in ABI V1, since that's the current ABI FreeBSD ships.
* It cleans up the handling of this option in `std::pair`.
I would like the sign off from the FreeBSD maintainers. They will no longer need to keep their `__config` changes downstream.
I'm still hoping to come up with a better way to maintain the ABI without needing these constructors.
Reviewed in https://reviews.llvm.org/D21329
llvm-svn: 275749
Eric Fiselier [Mon, 18 Jul 2016 01:52:46 +0000 (01:52 +0000)]
Suppress warning in make_from_tuple tests.
llvm-svn: 275748
Rui Ueyama [Mon, 18 Jul 2016 01:35:00 +0000 (01:35 +0000)]
Remove SymbolBody::PlaceholderKind.
In the last patch for --trace-symbol, I introduced a new symbol type
PlaceholderKind and store it to SymVector storage. It made all code
that iterates over SymVector to recognize and skip PlaceholderKind
symbols. I found that that's annoying.
In this patch, I removed PlaceholderKind and stop storing them to SymVector.
Now the information whether a symbol is being watched by --trace-symbol
is stored to the Symtab hash table.
llvm-svn: 275747
Rui Ueyama [Mon, 18 Jul 2016 01:34:57 +0000 (01:34 +0000)]
Iterate over SymVector instead of Symtab hash table.
SymVector contains all symbols, so we can iterate either Symtab or SymVector
to visit all symbols. Iterating over SymVector makes the next change for
--trace-symbol possible.
llvm-svn: 275746
Eric Fiselier [Mon, 18 Jul 2016 00:35:56 +0000 (00:35 +0000)]
Implement C++17 tuple bits. Including apply and make_from_tuple.
This patch upgrades <tuple> to be C++17 compliant by implementing:
* tuple_size_v: This was forgotten when implementing the other _v traits.
* std::apply: This was added via LFTS v1 in p0220r1.
* std::make_from_tuple: This was added in p0209r2.
llvm-svn: 275745
David Majnemer [Mon, 18 Jul 2016 00:35:01 +0000 (00:35 +0000)]
[GVNHoist] Sink HoistedCtr into GVNHoist
HoistedCtr cannot be a mutated global variable, that will open us up to
races between threads compiling code in parallel.
llvm-svn: 275744
David Majnemer [Mon, 18 Jul 2016 00:34:58 +0000 (00:34 +0000)]
[GVNHoist] Some small cleanups
No functional change is intended, just trying to clean things up a
little.
llvm-svn: 275743
Davide Italiano [Sun, 17 Jul 2016 23:55:20 +0000 (23:55 +0000)]
[GVN] Move other PRE tests to a subdirectory.
llvm-svn: 275742
Davide Italiano [Sun, 17 Jul 2016 23:48:18 +0000 (23:48 +0000)]
[GVN] Move the PRE/LOADPRE test in a subdirectory.
llvm-svn: 275741
Alina Sbirlea [Sun, 17 Jul 2016 23:45:55 +0000 (23:45 +0000)]
[compiler-rt] Change all asm directives to __asm__ in cpu_model.
Summary:
Aiming to resolve failure in sanitizer bot by changning all asm directives to __asm__.
Also, consistency.
Reviewers: llvm-commits, echristo, vitalybuka
Subscribers: mehdi_amini
Differential Revision: https://reviews.llvm.org/D22446
llvm-svn: 275740
Davide Italiano [Sun, 17 Jul 2016 23:21:26 +0000 (23:21 +0000)]
[GVN] Use FileCheck instead of grep for tests.
llvm-svn: 275739
Saleem Abdulrasool [Sun, 17 Jul 2016 22:54:42 +0000 (22:54 +0000)]
test: add missing triple to test
The test was relying on the default triple which may not be correct. Explicitly
provide it a triple. Should repair the windows on Linux builder.
llvm-svn: 275738
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:44 +0000 (22:27 +0000)]
CodeGen: honour dllstorage on ObjC types
Add support for ObjC types to respect the DLLImport/DLLExport storage
annotations. This only effects COFF output. This would allow usage with
clang/C2, but not with clang/LLVM due to hard coded section names.
llvm-svn: 275737
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:41 +0000 (22:27 +0000)]
CodeGen: whitespace, formatting cleanups, NFC
Format some code which was oddly formatted. Use a bit of auto to make the code
more legible. NFC.
llvm-svn: 275736
Saleem Abdulrasool [Sun, 17 Jul 2016 22:27:38 +0000 (22:27 +0000)]
CodeGen: whitespace cleanup, StringRef usage in ObjC EH type construction
Clean up some formatting issues and use a bit more StringRef based operations
instead of SmallStrings. NFC.
llvm-svn: 275735
Eric Fiselier [Sun, 17 Jul 2016 22:04:57 +0000 (22:04 +0000)]
Check for unconstrained hash equality before constrained hash equality.
This patch implements a simple optimization in __hash_table::find. When iterating
the found bucket we only constrain the bucket elements hash if it doesn't
already match the unconstrained hash of the specified key. This prevent
the performance of an expensive modulo operation.
Since the bucket element almost always matches the key, especially when the
load factor is low, this optimization has large performance impacts. For
a unordered_set<int> of random integers this patch improves the performance of
'find(...)' by 40%.
llvm-svn: 275734
Jason Molenda [Sun, 17 Jul 2016 21:27:32 +0000 (21:27 +0000)]
Refactor (with some rewriting) the DynamicLoaderMacOSX plugin into
a base class and a derived class, with the derived class containing
the methods specific to reading dyld's all_image_infos, dyld's
method of specifying images that have been loaded or unloaded, the
place where we put a breakpoint in dyld to get notified about newly
loaded or unloaded images.
This is in preparation for a second derived class which will use
some alternate methods for getting this information; that will be
a separate commit in the next few days.
There's a couple of ivars that should probably be in the derived
DyanmicLoaderMacOSX class instead of the base DynamicLoaderDarwin
class (m_dyld_image_infos, m_dyld_image_infos_stop_id). I don't
think I'll need to use these in the new derived class - I'll
move them down to DynamicLoaderMacOSX if it works out that way;
it'll simplify locking if I can do that.
<rdar://problem/
25251243>
llvm-svn: 275733
Eric Fiselier [Sun, 17 Jul 2016 20:32:30 +0000 (20:32 +0000)]
Fix std::experimental::optional tests. Patch from Casey Carter.
llvm-svn: 275732
Jason Molenda [Sun, 17 Jul 2016 20:01:54 +0000 (20:01 +0000)]
Initialize the "is_loaded" local in LoadModuleAtAddress in
case Process::GetFileLoadAddress fails to set it to a real
value. (fixing "conditional use of garbage value" clang warning)
llvm-svn: 275731
Richard Smith [Sun, 17 Jul 2016 20:00:59 +0000 (20:00 +0000)]
Attempt to work around MSVC rejects-valid, round 2.
llvm-svn: 275730