Commit Graph

330433 Commits

Author SHA1 Message Date
Jinsong Ji a233e7d7cb [AArch64] Fix unannotated fall-through between switch labels
This is breaking buildbot with -Werror,-Wimplicit-fallthrough on.
eg:
http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/6881
2019-10-28 15:18:50 +00:00
Sanne Wouda 265ddc5757 Precommit AArch64 test for -consider-local-interval-cost
Summary:
Precommitting this test makes it more obvious what the delta is of enabling
-consider-local-interval-cost in D69437.

Reviewers: dmgreen

Subscribers: kristof.beyls, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69512
2019-10-28 15:00:22 +00:00
Alexey Bataev d7941a6ab9 [LIBOMPTARGET]Fix build, NFC.
Need to include nvptx_interface.h in target_impl.h, otherwise the build
is failed because of missing __kmpc_impl_lanemask_t type.
2019-10-28 10:43:00 -04:00
Nico Weber b911d2db5d lld/COFF: Simplify getOutputPath() using sys::path functions.
Also mention "basename" and "dirname" in Path.h since I tried
to find these functions by looking for these strings. It might
help others find them faster if the comments contain these strings.

No behavior change.

Differential Revision: https://reviews.llvm.org/D69458
2019-10-28 10:38:32 -04:00
Jeremy Morse f5e1b718a6 [DebugInfo] MachineSink: find more DBG_VALUEs to sink
In the Pre-RA machine sinker, previously we were relying on all DBG_VALUEs
being immediately after the instruction that defined their operands. This
isn't a valid assumption, as a variable location change doesn't
necessarily correspond to where the value is computed. In this patch, we
collect DBG_VALUEs that might need sinking as we walk through a block,
and sink all of them if their defining instruction is sunk.

This patch adds some copy propagation too, so that if we sink a copy inst,
the now non-dominated paths can use the copy source for the variable
location.

Differential Revision: https://reviews.llvm.org/D58386
2019-10-28 14:32:50 +00:00
Sanjay Patel 1ebd4a2e3a [DAGCombiner] widen any_ext of popcount based on target support
This enhances D69127 (rGe6c145e0548e3b3de6eab27e44e1504387cf6b53)
to handle the looser "any_extend" cast in addition to zext.

This is a prerequisite step for canonicalizing in the other direction
(narrow the popcount) in IR - PR43688:
https://bugs.llvm.org/show_bug.cgi?id=43688
2019-10-28 10:07:12 -04:00
Bryan Chan 35cb3ee4ca [AArch64][Builtins] Avoid unnecessary cache cleaning
Use new control bits CTR_EL0.DIC and CTR_EL0.IDC to discover the d-cache
cleaning and i-cache invalidation requirements for instruction-to-data
coherence. This matches the behavior in the latest libgcc.

Author: Shaokun Zhang <zhangshaokun@hisilicon.com>

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D69247
2019-10-28 09:56:39 -04:00
David Green d2ec416c7b [InstCombine][NFC] Tests for uadd.sat and sadd.sat canonicalisation. 2019-10-28 13:47:09 +00:00
Ilya Biryukov 4c430a7c6f [clangd] Do not report anonymous entities in findExplicitReferences
Summary:
Otherwise every client dealing with name location should handle
anonymous names in a special manner.

This seems too error-prone, clients can probably handle anonymous
entities they care about differently.

Reviewers: hokein

Reviewed By: hokein

Subscribers: MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69511
2019-10-28 14:41:34 +01:00
Sanjay Patel f2e93d10fe [CVP] prevent propagating poison when substituting edge values into a phi (PR43802)
This phi simplification transform was added with:
D45448

However as shown in PR43802:
https://bugs.llvm.org/show_bug.cgi?id=43802

...we must be careful not to propagate poison when we do the substitution.
There might be some more complicated analysis possible to retain the overflow flag,
but it should always be safe and easy to drop flags (we have similar behavior in
instcombine and other passes).

Differential Revision: https://reviews.llvm.org/D69442
2019-10-28 08:58:28 -04:00
Jeremy Morse ee50590e16 [DebugInfo] MachineSink: Insert undef DBG_VALUEs when sinking instructions
When we sink DBG_VALUEs between blocks, we simply move the DBG_VALUE
instruction to below the sunk instruction. However, we should also mark
the variable as being undef at the original location, to terminate any
earlier variable location. This patch does that -- plus, if the
instruction being sunk is a copy, it attempts to propagate the copy
through the DBG_VALUE, replacing the destination with the source.

Differential Revision: https://reviews.llvm.org/D58238
2019-10-28 12:17:56 +00:00
Dmitry Preobrazhensky b8042dbe2b [AMDGPU][MC][GFX10] Added v_interp_[p1/p2/mov]_f32_e64
See https://bugs.llvm.org/show_bug.cgi?id=43747

Reviewers: arsenm, rampitec

Differential Revision: https://reviews.llvm.org/D69348
2019-10-28 15:03:43 +03:00
David Green ba2c625531 [Codegen][ARM] Add float softening for cbrt
We would previously have no soft-float softening for cbrt, so could hit
a crash failing to select. This fills in what appears to be missing.

Differential Revision: https://reviews.llvm.org/D69345
2019-10-28 11:08:55 +00:00
Rafael Stahl a483302fbe minor doc typo fix / testing github commit 2019-10-28 12:08:40 +01:00
vhscampos f6e11a36c4 [ARM][AArch64] Implement __cls, __clsl and __clsll intrinsics from ACLE
Summary:
Writing support for three ACLE functions:
  unsigned int __cls(uint32_t x)
  unsigned int __clsl(unsigned long x)
  unsigned int __clsll(uint64_t x)

CLS stands for "Count number of leading sign bits".

In AArch64, these two intrinsics can be translated into the 'cls'
instruction directly. In AArch32, on the other hand, this functionality
is achieved by implementing it in terms of clz (count number of leading
zeros).

Reviewers: compnerd

Reviewed By: compnerd

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

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D69250
2019-10-28 11:06:58 +00:00
Kadir Cetinkaya 3cb5764f90
[clangd] Flush streams when printing HoverInfo Name and Definition
Summary: Fixes some windows breakages when compiled via msvc.
2019-10-28 12:05:03 +01:00
Ilya Biryukov c814f4c459 [clangd] Do not highlight keywords in semantic highlighting
Summary:
Editors are good at highlightings the keywords themselves.
Note that this only affects highlightings of builtin types spelled out
as keywords in the source code. Highlightings of typedefs to builtin
types are unchanged.

Reviewers: hokein

Reviewed By: hokein

Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69431
2019-10-28 12:03:09 +01:00
vhscampos 5d35b7d9e1 [ARM][AArch64] Implement __arm_rsrf, __arm_rsrf64, __arm_wsrf & __arm_wsrf64
Summary:
Adding support for ACLE intrinsics.

Patch by Michael Platings.

Reviewers: chill, t.p.northover, efriedma

Reviewed By: chill

Subscribers: kristof.beyls, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69297
2019-10-28 10:59:18 +00:00
Kerry McLaughlin da720a38b9 [AArch64][SVE] Implement masked load intrinsics
Summary:
Adds support for codegen of masked loads, with non-extending,
zero-extending and sign-extending variants.

Reviewers: huntergr, rovka, greened, dmgreen

Reviewed By: dmgreen

Subscribers: dmgreen, samparker, tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68877
2019-10-28 10:06:14 +00:00
Sam Elliott 7214f7a79f [RISCV] Lower llvm.trap and llvm.debugtrap
Summary:
Until this commit, these have lowered to a call to abort().

`llvm.trap()` now lowers to `unimp`, which should trap on all systems.

`llvm.debugtrap()` now lowers to `ebreak`, which is exactly what this
instruction is for.

Reviewers: asb, luismarques

Reviewed By: asb

Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69390
2019-10-28 09:54:33 +00:00
Guillaume Chatelet da68fd8f81 Fix https://bugs.llvm.org/show_bug.cgi?id=43791 2019-10-28 10:40:35 +01:00
Ilya Biryukov d9971d0b2e [clangd] Do not insert parentheses when completing a using declaration
Summary:
Would be nice to also fix this in clang, but that looks like more work
if we want to preserve signatures in informative chunks.

Fixes https://github.com/clangd/clangd/issues/118

Reviewers: kadircet

Reviewed By: kadircet

Subscribers: merge_guards_bot, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69382
2019-10-28 09:45:10 +01:00
Seiya Nuta 7f19dd1ebf
[llvm-objcopy][MachO] Implement --only-section
Reviewers: alexshap, rupprecht, jdoerfert, jhenderson

Reviewed By: alexshap, rupprecht, jhenderson

Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65541
2019-10-28 16:00:20 +09:00
Kadir Cetinkaya f4d7caf6df
[clangd] Reland Store Index in Tweak::Selection
Summary:
Incoming define out-of-line tweak requires access to index.

This patch simply propogates the index in ClangdServer to Tweak::Selection while
passing the AST. Also updates TweakTest to accommodate this change.

Reviewers: ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D69165
2019-10-28 07:55:58 +01:00
Kadir Cetinkaya 3d65def1fd
[clangd] Reland DefineInline action apply logic with fully qualified names
Summary:
Initial version of DefineInline action that will fully qualify every
name inside function body.

Reviewers: sammccall, ilya-biryukov, hokein

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66647
2019-10-28 07:45:38 +01:00
David Zarzycki 657e4240b1 [X86] Fix 48/96 byte memcmp code gen
Detect scalar ISD::ZERO_EXTEND generated by memcmp lowering and convert
it to ISD::INSERT_SUBVECTOR.

https://reviews.llvm.org/D69464
2019-10-28 08:41:45 +02:00
LLVM GN Syncbot 2aa955411a gn build: Merge 5ab9a850f6 2019-10-28 06:32:06 +00:00
Kadir Cetinkaya 5ab9a850f6
[clangd] Reland DefineInline action availability checks
Summary:
Introduces DefineInline action and initial version of availability
checks.

Reviewers: sammccall, ilya-biryukov, hokein

Reviewed By: hokein

Subscribers: thakis, usaxena95, mgorny, ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65433
2019-10-28 07:28:21 +01:00
Richard Smith a4facd355d [c++20] Enforce rule that a union-like class or class with reference
members cannot have defaulted comparisons.
2019-10-27 23:26:44 -07:00
Kadir Cetinkaya 1a9c01c7f6
[clangd] Pass ExtraArgs to TestTU in TweakIsAvailable matcher 2019-10-28 07:18:26 +01:00
Richard Smith 39eef2cbb6 PR43775: don't produce a bogus 'auto' -Wc++98-compat warning for CTAD 2019-10-27 21:42:58 -07:00
Matt Arsenault 525169efd1 TableGen: Use enum names in composeSubRegIndices table
I'm not sure why this is using the raw enum value. This makes reading
the generated table comprehensible.
2019-10-27 21:26:56 -07:00
Matt Arsenault 56a503bdba OpenMP: Add convergent to more runtime functions
Several of these other functions are probably also convergent, but
these two seem obviously convergent.
2019-10-27 21:26:55 -07:00
Matt Arsenault 40ab8ae9fb OpenMP: Add helper function for convergent runtime calls
Most of the functions emitted here should probably be convergent, but
only barriers are currently marked. Introduce this helper before
adding convergent to more functions.
2019-10-27 21:26:55 -07:00
Craig Topper 7af8d5267b [X86] Use 64-bit version of source register in LowerPATCHABLE_EVENT_CALL and LowerPATCHABLE_TYPED_EVENT_CALL
Summary:
The PATCHABLE_EVENT_CALL uses i32 in the intrinsic. This
results in the register allocator picking a 32-bit register. We
need to use the 64-bit register when forming the MOV64rr
instructions. Otherwise we print illegal assembly in the text
output.

I think prior to this it was impossible for SrcReg to be equal
to DstReg so the NOP code was not reachable.

While there use Register instead of unsigned.

Also add a FIXME for what looks like a bug.

Reviewers: dberris

Reviewed By: dberris

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69365
2019-10-27 20:44:41 -07:00
Matt Arsenault 9b0b626d2c Use isConvergent helper instead of directly checking attribute 2019-10-27 19:39:14 -07:00
Lawrence D'Anna 40b0fa7ef2 [LLDB][formatters] ArgInfo::count -> ArgInfo::max_positional_args
Summary:
Move breakpoints from the old, bad ArgInfo::count to the new, better
ArgInfo::max_positional_args.   Soon ArgInfo::count will be no more.

This functionality is tested in `TestFormatters.py`, `TestDataFormatterSynthVal.py`,
`TestDataFormatterSynthType.py`.

You may notice that the old code was passing 0 arguments when count was 1, and passing
1 argument when count is 2.

This is no longer necessary because max_positional_args counts the self pointer
correctly.

Reviewers: labath, jingham, JDevlieghere

Reviewed By: labath

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D69469
2019-10-27 16:01:46 -07:00
Saleem Abdulrasool 418d1ea555 PM: silence `-Wpessimizing-move` from GCC 9.2.1 (NFC)
Remove the explicit move enabling NVRO.
2019-10-27 18:33:09 -04:00
Alex Lorenz 32837a60ac [lit] Drop the user-site packages directory from search paths when running tests
Do not add user-site packages directory to the python search path.
This avoids test failures if there's an incompatible lit module installed
inside the user-site packages directory, as it gets prioritized over the lit
from the PYTHONPATH.
2019-10-27 13:31:02 -07:00
Richard Smith 06d3fce01d PR43400: Add test that we can instantiate a friend function that is
defined as deleted.

The actual bug was fixed in commit d052a578.
2019-10-27 12:41:53 -07:00
Richard Smith faee39baa8 PR43762: when implicitly changing the active union member for an
assignment during constant evaluation, only start the lifetime of
trivially-default-constructible union members.
2019-10-27 12:31:16 -07:00
Sanjay Patel 85a2146c15 [SDAG] fold insert_vector_elt with undef index
Similar to:
rG4c47617627fb

This makes the DAG behavior consistent with IR's insertelement.

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

I've tried to maintain test intent for AArch64 and WebAssembly
by replacing undef index operands with something else.
2019-10-27 15:28:43 -04:00
Craig Topper f067dd839e [LegalizeTypes] When promoting BITREVERSE/BSWAP don't take the shift amount into account when determining the shift amount VT.
If the target's preferred shift amount VT can't hold any shift
amount for the promoted VT, we should use i32. The specific shift
amount shouldn't matter. The type will be adjusted later when the
shift itself is type legalized. This avoids an assert in getNode.

Fixes PR43820.
2019-10-27 12:20:35 -07:00
Craig Topper 73f255b83a [TargetLowering] Add getBooleanContents contents check to "SETCC (SETCC), [0|1], [EQ|NE] -> SETCC" combine.
This combine is only valid if the inner setcc produces a 0/1 result
or the inner type is MVT::i1.

I haven't seen this cause any issues, just happened to notice it
while reviewing combines in this function.

While there also fix another call to use the value type from the
SDValue for the operand instead of calling SDNode::getValueType(0).
Though its likely the use is result 0, its not guaranteed.
2019-10-27 10:07:15 -07:00
Jon Chesterfield 174967f153 [nfc][libomptarget] Decrease coupling between files
Summary:
[nfc][libomptarget] Decrease coupling between files

debug.h used the symbol omptarget_device_environment so implicitly required
an include of omptarget-nvptx.h to compile. Similarly interface.h uses size_t.

Moving this declaration to a new header means cancel, critical can now build
without omptarget-nvptx.h. After this change, debug.h, cancel.cu, critical.cu
could move under a common source directory.

Reviewers: ABataev, jdoerfert, grokos

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D69473
2019-10-27 14:27:54 +00:00
Jon Chesterfield ad4c42666d [nfc][libomptarget] Inline option into target_impl
Summary:
[nfc][libomptarget] Inline option into target_impl

Subset of D69423. The macros that were in option.h are all target dependent.
Inlining the header simplifies the dependency graph when looking to move code
into a common subdir.

Reviewers: ABataev, jdoerfert, grokos

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D69472
2019-10-27 14:26:55 +00:00
Greg Bedwell 4640223ebd [MCA] Fix a spelling mistake in a comment. NFC 2019-10-27 10:06:22 +00:00
Greg Bedwell d4758d4a8d Fix a spelling mistake in a couple of intrinsic description comments. NFC 2019-10-27 09:42:14 +00:00
Jon Chesterfield f7c3c640af [NFC][libomptarget]Remove TRUE,FALSE macros from option.h
Summary:
[NFC][libomptarget]Remove TRUE,FALSE macros from option.h
Subset of D69423. Patch series ends with removing option.h.

Reviewers: ABataev, jdoerfert, grokos

Subscribers: openmp-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D69463
2019-10-27 01:31:12 +01:00
Craig Topper 1ce8a5b385 [X86] Only look up boolean reduction cost tables if the reduction is not pairwise.
Summary:
We don't pattern match pairwise shuffles in SelectionDAG. So we
should only return the optimized costs if its not a pairwise
shuffle.

I think SLP vectorizer gives priority to non pairwise shuffle if
the cost is the same. And the look up for reduction intrinsics
passes false for the pairwise flag. So this probably has no real
effect today.

Reviewers: RKSimon

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69083
2019-10-26 16:41:19 -07:00