OSDN Git Service
Simon Pilgrim [Mon, 14 Nov 2016 12:00:46 +0000 (12:00 +0000)]
Remove redundant condition (PR28352) NFCI.
We were already testing is the op was not a leaf, so need to then test if it was a leaf (added it to the assert instead).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286817
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Mon, 14 Nov 2016 11:14:41 +0000 (11:14 +0000)]
[InlineCost] Remove skew when calculating call costs
When calculating the cost of a call instruction we were applying a heuristic penalty as well as the cost of the instruction itself.
However, when calculating the benefit from inlining we weren't discounting the equivalent penalty for the call instruction that would be removed! This caused skew in the calculation and meant we wouldn't inline in the following, trivial case:
int g() {
h();
}
int f() {
g();
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286814
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 14 Nov 2016 10:40:23 +0000 (10:40 +0000)]
Remove redundant condition (PR28800) NFCI.
'A || (!A && B)' is equivalent to 'A || B':
(LoopCycle > DefCycle) || (LoopCycle <= DefCycle && LoopStage <= DefStage)
-->
(LoopCycle > DefCycle) || (LoopStage <= DefStage)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286811
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 14 Nov 2016 10:25:43 +0000 (10:25 +0000)]
GlobalISel: Fix indentation. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286808
91177308-0d34-0410-b5e6-
96231b3b80d8
Pablo Barrio [Mon, 14 Nov 2016 10:24:26 +0000 (10:24 +0000)]
[JumpThreading] Prevent non-deterministic use lists
Summary:
Unfolding selects was previously done with the help of a vector
of pointers that was then sorted to be able to remove duplicates.
As this sorting depends on the memory addresses, it was
non-deterministic. A SetVector is used now so that duplicates are
removed without the need of sorting first.
Reviewers: mgrang, efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26450
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286807
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 14 Nov 2016 10:22:18 +0000 (10:22 +0000)]
GlobalISel: Fix typos. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286806
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Mon, 14 Nov 2016 07:26:17 +0000 (07:26 +0000)]
Add explicit (void) cast to unused unique_ptr::release() results
Summary:
This patch adds explicit `(void)` casts to discarded `release()` calls to suppress -Wunused-result.
This patch fixes *all* warnings are generated as a result of [applying `[[nodiscard]]` within libc++](https://reviews.llvm.org/D26596).
Similar fixes were applied to Clang in r286796.
Reviewers: chandlerc, dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26598
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286797
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Mon, 14 Nov 2016 04:54:47 +0000 (04:54 +0000)]
Demangle: only demangle mangled symbols
Only attempt to demangle symbols which have the itanium C++ prefix of `_Z`.
This ensures that we do not treat any symbol name as a managled named. We would
previously treat a C function `f` as a mangled name and decode that to `float`
incorrectly.
While it is easy to add tests for this, Mehdi recommended against introducing
tests for the demangler as libc++abi should cover the testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286795
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 14 Nov 2016 02:46:58 +0000 (02:46 +0000)]
[AVX-512] Add suffixless aliases for EVEX encoded vcvtsi2ss/vcvtsi2sd/vcvtusi2ss/vcvtusi2sd. This matches the VEX behavior.
Fixes another problem from PR28850.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286790
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 14 Nov 2016 01:53:29 +0000 (01:53 +0000)]
[X86] Cleanup 'x' and 'y' mnemonic suffixes for vcvtpd2dq/vcvttpd2dq/vcvtpd2ps and similar instructions.
-Don't print the 'x' suffix for the 128-bit reg/mem VEX encoded instructions in Intel syntax. This is consistent with the EVEX versions.
-Don't print the 'y' suffix for the 256-bit reg/reg VEX encoded instructions in Intel or AT&T syntax. This is consistent with the EVEX versions.
-Allow the 'x' and 'y' suffixes to be used for the reg/mem forms when we're assembling using Intel syntax.
-Allow the 'x' and 'y' suffixes on the reg/reg EVEX encoded instructions in Intel or AT&T syntax. This is consistent with what VEX was already allowing.
This should fix at least some of PR28850.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286787
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 14 Nov 2016 01:53:22 +0000 (01:53 +0000)]
[AVX-512] Remove and autoupgrade masked dword/qword variable shift intrinsics to the new unmasked versions and selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286786
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sun, 13 Nov 2016 23:40:40 +0000 (23:40 +0000)]
[LangRef] Drop misleading anecdote
`shl nsw i8 1, i8 8` is poison, but `mul i8 1, i8 128` is not.
This was discussed previously here:
http://lists.llvm.org/pipermail/llvm-dev/2015-April/084195.html. From
the discussion, it was not clear which semantics we want for `shl`, but
for now at least make the language reference more accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286785
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 13 Nov 2016 20:43:41 +0000 (20:43 +0000)]
test: remove the archive before modifying it
The archive may already exist when not doing a clean test run. The dirty state
can cause a test failure. Remove the archive first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286778
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 13 Nov 2016 20:43:38 +0000 (20:43 +0000)]
llvm-cxxfilt: support reading from stdin
`c++filt` when given no arguments runs as a REPL, decoding each line as a
decorated name. Unify the test structure to be more uniform, with the tests for
llvm-cxxfilt living under test/tools/llvm-cxxfilt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286777
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 13 Nov 2016 20:04:52 +0000 (20:04 +0000)]
[ValueTracking] recognize even more variants of smin/smax
Similar to:
https://reviews.llvm.org/rL285499
https://reviews.llvm.org/rL286318
We can't minimally expose this in IR tests because we don't have min/max intrinsics,
but the difference is visible in codegen because SelectionDAGBuilder::visitSelect()
uses matchSelectPattern().
We're not canonicalizing these patterns in IR (yet), so I don't expect there to be any
regressions as noted here:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286776
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 19:58:18 +0000 (19:58 +0000)]
[AVX-512] Fix a disassembler failure for AVX-512 vcmpss/vcmpsd with an immediate larger than 32. Fix the same bug with VLX vcmpps/vcmppd.
Fixes PR24941.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286775
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 13 Nov 2016 19:37:00 +0000 (19:37 +0000)]
test: synchronise lit substitutions
llvm-strings was added to the test dependencies without updating the lit
substitutions. Synchronise the list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286773
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 13 Nov 2016 19:30:19 +0000 (19:30 +0000)]
[ValueTracking] move min/max matching to helper function; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286772
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 19:09:56 +0000 (19:09 +0000)]
[X86][IR] Reduce the number of full string comparisons in the code that autoupgrades masked shift intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286768
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sun, 13 Nov 2016 19:07:48 +0000 (19:07 +0000)]
llvm-strings: support printing the filename
This adds support for the `-f` or `--print-file-name` option for strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286767
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sun, 13 Nov 2016 18:20:54 +0000 (18:20 +0000)]
AMDGPU: Implement SGPR spilling with scalar stores
nThis avoids the nasty problems caused by using
memory instructions that read the exec mask while
spilling / restoring registers used for control flow
masking, but only for VI when these were added.
This always uses the scalar stores when enabled currently,
but it may be better to still try to spill to a VGPR
and use this on the fallback memory path.
The cache also needs to be flushed before wave termination
if a scalar store is used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286766
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 13 Nov 2016 15:48:11 +0000 (15:48 +0000)]
revert commit r286761, some builds failed on Win platforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286765
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 13 Nov 2016 15:32:11 +0000 (15:32 +0000)]
[X86][SSE] Add zero lower 32-bits test case for PR30845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286764
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 13 Nov 2016 15:16:43 +0000 (15:16 +0000)]
[X86][AVX512] Add masked VPMOZX test case for PR26762
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286763
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 13 Nov 2016 14:57:52 +0000 (14:57 +0000)]
[X86][SSE] Add additional test case for PR30845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286762
91177308-0d34-0410-b5e6-
96231b3b80d8
Ayman Musa [Sun, 13 Nov 2016 14:51:25 +0000 (14:51 +0000)]
[X86][AVX512] Removing llvm x86 intrinsics for _mm_mask_move_{ss|sd} intrinsics.
Differential Revision: https://reviews.llvm.org/D26128
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286761
91177308-0d34-0410-b5e6-
96231b3b80d8
Ayman Musa [Sun, 13 Nov 2016 14:29:32 +0000 (14:29 +0000)]
[X86][AVX512] Add patterns for all variants of VMOVSS/VMOVSD instructions.
Differential Revision: https://reviews.llvm.org/D26022
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286758
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 07:26:19 +0000 (07:26 +0000)]
[InstCombine][AVX-512] Teach InstCombineCalls to handle the new unmasked AVX-512 variable shift intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286755
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 07:26:15 +0000 (07:26 +0000)]
[AVX-512] Add unmasked intrinsics for variable shifts of dwords and qwords.
These will be used to replace the masked intrinsics so that InstCombineCalls can optimize the AVX-512 variable shifts the same way it does for AVX2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286754
91177308-0d34-0410-b5e6-
96231b3b80d8
Konstantin Zhuravlyov [Sun, 13 Nov 2016 07:01:11 +0000 (07:01 +0000)]
[AMDGPU] Add f16 support (VI+)
Differential Revision: https://reviews.llvm.org/D25975
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286753
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 13 Nov 2016 07:00:17 +0000 (07:00 +0000)]
Bitcode: Change module reader functions to return an llvm::Expected.
Differential Revision: https://reviews.llvm.org/D26562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286752
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 13 Nov 2016 06:59:50 +0000 (06:59 +0000)]
Analysis: Simplify the ScalarEvolution::getGEPExpr() interface. NFCI.
All existing callers were manually extracting information out of an existing
GEP instruction and passing it to getGEPExpr(). Simplify the interface by
changing it to take a GEPOperator instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286751
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 13 Nov 2016 06:59:28 +0000 (06:59 +0000)]
Bitcode: More precise casting. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286750
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Sun, 13 Nov 2016 06:58:45 +0000 (06:58 +0000)]
IR: Change the Type::get{Array,Vector,Pointer}ElementType() functions to perform the correct type assertion.
Previously we were only asserting that the type was a sequential type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286749
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 03:42:27 +0000 (03:42 +0000)]
[AVX-512] Move masked shift intrinsics tests to the autoupgrade test file. These missed being moved in r286725.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286746
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 13 Nov 2016 01:51:55 +0000 (01:51 +0000)]
[InstCombine][AVX-512] Expand vector shift handling to work on the AVX-512 shift by immediate and shift by single value.
This does not include support for the AVX-512 variable shifts. That will be coming in a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286739
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 13 Nov 2016 00:32:39 +0000 (00:32 +0000)]
[x86] add smin/smax with zero tests
These are vector tests corresponding to the discussion at:
http://lists.llvm.org/pipermail/llvm-dev/2016-November/106868.html
Apart from the lack of min/max matching, the and/andn difference
shows a lack of DAG-level canonicalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286737
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 12 Nov 2016 23:44:58 +0000 (23:44 +0000)]
[X86][SSE] Add test case for PR30845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286734
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 12 Nov 2016 23:12:41 +0000 (23:12 +0000)]
[ORC] Remove the 'const' qualifier from the member function wrapper, make the
lambda in wrapHandler mutable to allow it to pass the handler through as a
non-const value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286732
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 12 Nov 2016 19:03:08 +0000 (19:03 +0000)]
test: explicitly use gnu format
This should fix the Darwin buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286729
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 12 Nov 2016 18:37:04 +0000 (18:37 +0000)]
llvm-strings: trivialise logic until we support more options
Until we have handling for ignoring unloaded sections, simplify the logic to
the point of triviality. This fixes the scanning of archives, particularly when
embedded in archives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286727
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 12 Nov 2016 18:04:46 +0000 (18:04 +0000)]
[AVX-512] Remove the remaining masked shift by immediate or by single value. Autoupgrade them to recently introduced unmasked versions and a select.
After this I'll add the unmasked intrinsics to InstCombineCalls to finish making our handling of these types of shuffles consistent between AVX-512 and the legacy intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286725
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 12 Nov 2016 17:17:12 +0000 (17:17 +0000)]
[Support] Add StringRef::find_lower and contains_lower.
Differential Revision: https://reviews.llvm.org/D25299
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286724
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Sat, 12 Nov 2016 14:58:30 +0000 (14:58 +0000)]
[OCaml] Clear cross-target test deps when building out-of-tree
Clear cross-target test dependencies when using LLVM_OCAML_OUT_OF_TREE,
in order to make it possible to run check-llvm-bindings-ocaml without
rebuilding the whole LLVM.
Differential Revision: https://reviews.llvm.org/D26580
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286720
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Sat, 12 Nov 2016 10:39:09 +0000 (10:39 +0000)]
As we released 3.9, from the 4.0 release notes, points to version 3.9 instead of 3.8
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286719
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 12 Nov 2016 05:28:24 +0000 (05:28 +0000)]
[AVX-512] Add unmasked version of shift by immediate and shift by single element in XMM.
Summary:
This is the first step towards being able to add the avx512 shift by immediate intrinsics to InstCombineCalls where we aleady support the sse2 and avx2 intrinsics. We need to the unmasked versions so we can avoid having to teach InstCombineCalls that it would need to insert selects sometimes. Instead we'll just add the selects around the new instrinsics in the frontend.
This change should also enable the shift by i32 intrinsics to take a non-constant shift value just like the avx2 and sse intrinsics. This will enable us to fix PR30691 once we update clang.
Next I'll switch clang to use the new builtins. Then we'll come back to the backend and remove/autoupgrade the old intrinsics. Then I'll work on the same series for variable shifts.
Reviewers: RKSimon, zvi, delena
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26333
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286711
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 12 Nov 2016 05:16:06 +0000 (05:16 +0000)]
CODE_OWNERS: Take ownership of the X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286710
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 12 Nov 2016 05:05:27 +0000 (05:05 +0000)]
[AVX-512] Add support for lowering shuffles to VALIGND/VALIGNQ
Summary: VALIGND and VALIGNQ are similar to PALIGNR but instead of working on a 128-bit lane they work on the entire vector register. This change leverages the shuffle rotate detection code used for PALIGNR to detect these cases.
Reviewers: delena, RKSimon
Subscribers: Farhana, llvm-commits
Differential Revision: https://reviews.llvm.org/D26297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286709
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 12 Nov 2016 03:45:21 +0000 (03:45 +0000)]
build: add a dependency on llvm-strings
Since we now have tests for llvm-strings, add a dependency on the tool.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286707
91177308-0d34-0410-b5e6-
96231b3b80d8
Saleem Abdulrasool [Sat, 12 Nov 2016 03:39:21 +0000 (03:39 +0000)]
llvm-strings: ensure that the last string is correctly printed
We would ignore the last string that appeared if the file ended with a printable
character. Ensure that we get the last string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286706
91177308-0d34-0410-b5e6-
96231b3b80d8
whitequark [Sat, 12 Nov 2016 03:38:30 +0000 (03:38 +0000)]
[OCaml] Adapt to the new attribute C API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286705
91177308-0d34-0410-b5e6-
96231b3b80d8
whitequark [Sat, 12 Nov 2016 03:38:23 +0000 (03:38 +0000)]
[C API] Fix several null pointer dereferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286704
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 12 Nov 2016 02:55:45 +0000 (02:55 +0000)]
[libFuzzer] one more trophy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286703
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 12 Nov 2016 02:27:21 +0000 (02:27 +0000)]
[libFuzzer] use a valid ASCII string for a dummy seed corpus
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286702
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 12 Nov 2016 02:19:31 +0000 (02:19 +0000)]
[ORC] Add a WrappedHandlerReturn type to map handler return types onto error
return types.
This class allows user provided handlers to return either error-wrapped types
or plain types. In the latter case, the plain type is wrapped with a success
value of Error or Expected<T> type to fit it into the rest of the serialization
machinery.
This patch allows us to remove the RPC unit-test workaround added in r286646.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286701
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Sat, 12 Nov 2016 01:17:59 +0000 (01:17 +0000)]
Improve `git llvm push` to suggest `git pull` when applying patch fails
Differential Revision: https://reviews.llvm.org/D26565
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286695
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 12 Nov 2016 00:35:58 +0000 (00:35 +0000)]
One more set of changes to fix formatv() on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286692
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 12 Nov 2016 00:30:37 +0000 (00:30 +0000)]
Add missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286691
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 12 Nov 2016 00:28:10 +0000 (00:28 +0000)]
Fix another problem with formatv().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286690
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Sat, 12 Nov 2016 00:24:35 +0000 (00:24 +0000)]
[libFuzzer] use less stack
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286689
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Sat, 12 Nov 2016 00:23:32 +0000 (00:23 +0000)]
Remove extra semicolon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286688
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Sat, 12 Nov 2016 00:19:11 +0000 (00:19 +0000)]
AMDGPU/SI: Promote i16 = fp_[us]int f32 for VI
Summary: This fixes a regression caused by r286464.
Reviewers: arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, llvm-commits, tony-tye
Differential Revision: https://reviews.llvm.org/D26570
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286687
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sat, 12 Nov 2016 00:18:42 +0000 (00:18 +0000)]
Try to fix build after llvm::formatv() patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286686
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 11 Nov 2016 23:58:11 +0000 (23:58 +0000)]
Fix -Werror build with clang-cl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286683
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 11 Nov 2016 23:57:40 +0000 (23:57 +0000)]
[Support] Introduce llvm::formatv() function.
This introduces a new type-safe general purpose formatting
library. It provides compile-time type safety, does not require
a format specifier (since the type is deduced), and provides
mechanisms for extending the format capability to user defined
types, and overriding the formatting behavior for existing types.
This patch additionally adds documentation for the API to the
LLVM programmer's manual.
Mailing List Thread:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/105836.html
Differential Revision: https://reviews.llvm.org/D25587
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286682
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 11 Nov 2016 23:41:13 +0000 (23:41 +0000)]
Define DbiStreamBuilder::addSectionContribs.
This patch defines a new function to add a SectionContribs stream
to a PDB file. Unlike SectionMap, SectionContribs contains a list
of input sections as opposed to output sections.
Note that this patch needs improving because currently we do not
set Module field in SectionContribs entries. In a follow-up patch,
I'll add Modules and then fix it after that.
Differential Revision: https://reviews.llvm.org/D26210
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286677
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 11 Nov 2016 23:35:42 +0000 (23:35 +0000)]
AMDGPU/SI: Fix visit order assumption in SIFixSGPRCopies
Summary:
This pass was assuming that when a PHI instruction defined a register
used by another PHI instruction that the defining insstruction would
be legalized before the using instruction.
This assumption was causing the pass to not legalize some PHI nodes
within divergent flow-control.
This fixes a bug that was uncovered by r285762.
Reviewers: nhaehnle, arsenm
Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, tony-tye, llvm-commits
Differential Revision: https://reviews.llvm.org/D26303
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286676
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Fri, 11 Nov 2016 23:26:28 +0000 (23:26 +0000)]
Print correct directory in merge script.
When providing the project directory to the merge script, print it out in the
commit instructions instead of the default project directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286675
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 11 Nov 2016 23:20:01 +0000 (23:20 +0000)]
[InstCombine] use dyn_cast rather isa+cast; NFC
Follow-up to r286664 cleanup as suggested by Eli. Thanks!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286671
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 11 Nov 2016 23:12:46 +0000 (23:12 +0000)]
[InstCombine] update test to use FileCheck; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286668
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 11 Nov 2016 23:06:53 +0000 (23:06 +0000)]
[libFuzzer] do not initialize parts of TracePC -- let them be initialized by the linker. Add no-msan attribute to the memcmp hook.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286665
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 11 Nov 2016 23:01:20 +0000 (23:01 +0000)]
[InstCombine] clean up foldSelectOpOp(); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286664
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Fri, 11 Nov 2016 23:01:02 +0000 (23:01 +0000)]
[tsan][llvm] Implement the function attribute to disable TSan checking at run time
This implements a function annotation that disables TSan checking for the
function at run time. The benefit over attribute((no_sanitize("thread")))
is that the accesses within the callees will also be suppressed.
The motivation for this attribute is a guarantee given by the objective C
language that the calls to the reference count decrement and object
deallocation will be synchronized. To model this properly, we would need
to intercept all ref count decrement calls (which are very common in ObjC
due to use of ARC) and also every single message send. Instead, we propose
to just ignore all accesses made from within dealloc at run time. The main
downside is that this still does not introduce any synchronization, which
means we might still report false positives if the code that relies on this
synchronization is not executed from within dealloc. However, we have not seen
this in practice so far and think these cases will be very rare.
Differential Revision: https://reviews.llvm.org/D25858
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286663
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 11 Nov 2016 22:51:46 +0000 (22:51 +0000)]
[LV] Stop saying "use -Rpass-analysis=loop-vectorize"
This is PR28376.
Unfortunately given the current structure of optimization diagnostics we
lack the capability to tell whether the user has
passed -Rpass-analysis=loop-vectorize since this is local to the
front-end (BackendConsumer::OptimizationRemarkHandler).
So rather than printing this even if the user has already
passed -Rpass-analysis, this patch just punts and stops recommending
this option. I don't think that getting this right is worth the
complexity.
Differential Revision: https://reviews.llvm.org/D26563
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286662
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 22:50:16 +0000 (22:50 +0000)]
[RPC] Add const qualifier to MemberFnWrapper to make buildbots happy.
This is a temporary fix: The right solution is to make sure addHandler can
support mutable lambdas. I'll add that in a follow-up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286661
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 11 Nov 2016 22:41:47 +0000 (22:41 +0000)]
Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286657
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 11 Nov 2016 22:39:50 +0000 (22:39 +0000)]
Revert "(origin/master, origin/HEAD) MachineScheduler/ScheduleDAG: Add support to skipping a node."
Revert accidentally committed change.
This reverts commit r286655.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286656
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 11 Nov 2016 22:37:34 +0000 (22:37 +0000)]
MachineScheduler/ScheduleDAG: Add support to skipping a node.
The DAG mutators in the scheduler cannot really remove DAG nodes as
additional anlysis information such as ScheduleDAGToplogicalSort are
already computed at this point and rely on a fixed number of DAG nodes.
Alleviate the missing removal with a new flag: Setting the new skip
flag on a node ignores it during scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286655
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 11 Nov 2016 22:37:31 +0000 (22:37 +0000)]
ScheduleDAGInstrs: Move VRegUses to ScheduleDAGMILive; NFCI
Push VRegUses/collectVRegUses() down the class hierarchy towards its
only user ScheduleDAGMILive.
NFCI: The initialization of the map happens at a later point but that
should not matter.
This is in preparation to allow DAG mutators to merge nodes, which
relies on this map getting computed later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286654
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 11 Nov 2016 22:37:28 +0000 (22:37 +0000)]
MachineScheduler: Dump EntrySU/ExitSU if possible
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286653
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 11 Nov 2016 22:37:26 +0000 (22:37 +0000)]
ScheduleDAG: Identify EntrySU/ExitSU when dumping node ids
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286652
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 11 Nov 2016 22:21:39 +0000 (22:21 +0000)]
FunctionComparator: don't rely on argument evaluation order.
This is a follow-up on the recent refactoring of the FunctionMerge pass.
It should fix a fail of the new FunctionComparator unittest whe compiling with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286648
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Fri, 11 Nov 2016 22:18:42 +0000 (22:18 +0000)]
Fix static initialization order fiasco in MCTests
Reported by Kostya on llvm-dev, uncovered by an ASAN bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286647
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 22:16:10 +0000 (22:16 +0000)]
[ORC] Temporarily fix the RPCUtils unit test by explicitly specifying a handler
return type.
This should be fixed permanently by having the RPCUtils header recognize the
ErrorSuccess type. I'll commit that in a follow up patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286646
91177308-0d34-0410-b5e6-
96231b3b80d8
Piotr Padlewski [Fri, 11 Nov 2016 22:12:15 +0000 (22:12 +0000)]
NFC ProgrammersManual fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286645
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 11 Nov 2016 22:09:25 +0000 (22:09 +0000)]
Simplify code and address review comments (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286644
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 21:55:25 +0000 (21:55 +0000)]
[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286642
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Fri, 11 Nov 2016 21:48:09 +0000 (21:48 +0000)]
Fix a reference-to-temporary introduced in r286607.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286640
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 21:42:09 +0000 (21:42 +0000)]
[ORC] Re-apply 286620 with fixes for the ErrorSuccess class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286639
91177308-0d34-0410-b5e6-
96231b3b80d8
Nemanja Ivanovic [Fri, 11 Nov 2016 21:42:01 +0000 (21:42 +0000)]
[PowerPC] Add remaining vector permute builtins in altivec.h - LLVM portion
This patch corresponds to review:
https://reviews.llvm.org/D26480
Adds all the intrinsics used for various permute builtins that will
be added to altivec.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286638
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 11 Nov 2016 21:39:26 +0000 (21:39 +0000)]
[cfi] Fix weak functions handling.
When a function pointer is replaced with a jumptable pointer, special
case is needed to preserve the semantics of extern_weak functions.
Since a jumptable entry can not be extern_weak, we emulate that
behaviour by replacing all references to F (the extern_weak function)
with the following expression: F != nullptr ? JumpTablePtr : nullptr.
Extra special care is needed for global initializers, since most (or
probably all) backends can not lower an initializer that includes
this kind of constant expression. Initializers like that are replaced
with a global constructor (i.e. a runtime initializer).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286636
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Eckstein [Fri, 11 Nov 2016 21:15:13 +0000 (21:15 +0000)]
Make the FunctionComparator of the MergeFunctions pass a stand-alone utility.
This is pure refactoring. NFC.
This change moves the FunctionComparator (together with the GlobalNumberState
utility) in to a separate file so that it can be used by other passes.
For example, the SwiftMergeFunctions pass in the Swift compiler:
https://github.com/apple/swift/blob/master/lib/LLVMPasses/LLVMMergeFunctions.cpp
Details of the change:
*) The big part is just moving code out of MergeFunctions.cpp into FunctionComparator.h/cpp
*) Make FunctionComparator member functions protected (instead of private)
so that a derived comparator class can use them.
Following refactoring helps to share code between the base FunctionComparator
class and a derived class:
*) Add a beginCompare() function
*) Move some basic function property comparisons into a separate function compareSignature()
*) Do the GEP comparison inside cmpOperations() which now has a new
needToCmpOperands reference parameter
https://reviews.llvm.org/D25385
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286632
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 11 Nov 2016 20:39:02 +0000 (20:39 +0000)]
Fix -Wpessimizing-move warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286629
91177308-0d34-0410-b5e6-
96231b3b80d8
Vyacheslav Klochkov [Fri, 11 Nov 2016 19:55:29 +0000 (19:55 +0000)]
Fixed the lost FastMathFlags for FCmp operations in SLPVectorizer.
Reviewer: Michael Zolotukhin.
Differential Revision: https://reviews.llvm.org/D26543
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 11 Nov 2016 19:52:45 +0000 (19:52 +0000)]
[AArch64] Update a FIXME comment to reflect current state. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286625
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 11 Nov 2016 19:50:39 +0000 (19:50 +0000)]
Bitcode: Change getModuleSummaryIndex() to return an llvm::Expected.
Differential Revision: https://reviews.llvm.org/D26539
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286624
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 11 Nov 2016 19:50:24 +0000 (19:50 +0000)]
Bitcode: Clean up error handling for certain bitcode query functions.
The functions getBitcodeTargetTriple(), isBitcodeContainingObjCCategory(),
getBitcodeProducerString() and hasGlobalValueSummary() now return errors
via their return value rather than via the diagnostic handler.
To make this work, re-implement these functions using non-member functions
so that they can be used without the LLVMContext required by BitcodeReader.
Differential Revision: https://reviews.llvm.org/D26532
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286623
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 11 Nov 2016 19:50:10 +0000 (19:50 +0000)]
Bitcode: Prepare to move bitcode readers to free functions.
Make initStream() a free function, and change BitcodeReaderBase ctor to take
a BitstreamCursor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286622
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 19:46:46 +0000 (19:46 +0000)]
[ORC] Revert r286620 while I investigate a bot failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286621
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Fri, 11 Nov 2016 19:42:44 +0000 (19:42 +0000)]
[ORC] Refactor the ORC RPC utilities to add some new features.
(1) Add support for function key negotiation.
The previous version of the RPC required both sides to maintain the same
enumeration for functions in the API. This means that any version skew between
the client and server would result in communication failure.
With this version of the patch functions (and serializable types) are defined
with string names, and the derived function signature strings are used to
negotiate the actual function keys (which are used for efficient call
serialization). This allows clients to connect to any server that supports a
superset of the API (based on the function signatures it supports).
(2) Add a callAsync primitive.
The callAsync primitive can be used to install a return value handler that will
run as soon as the RPC function's return value is sent back from the remote.
(3) Launch policies for RPC function handlers.
The new addHandler method, which installs handlers for RPC functions, takes two
arguments: (1) the handler itself, and (2) an optional "launch policy". When the
RPC function is called, the launch policy (if present) is invoked to actually
launch the handler. This allows the handler to be spawned on a background
thread, or added to a work list. If no launch policy is used, the handler is run
on the server thread itself. This should only be used for short-running
handlers, or entirely synchronous RPC APIs.
(4) Zero cost cross type serialization.
You can now define serialization from any type to a different "wire" type. For
example, this allows you to call an RPC function that's defined to take a
std::string while passing a StringRef argument. If a serializer from StringRef
to std::string has been defined for the channel type this will be used to
serialize the argument without having to construct a std::string instance.
This allows buffer reference types to be used as arguments to RPC calls without
requiring a copy of the buffer to be made.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286620
91177308-0d34-0410-b5e6-
96231b3b80d8