Commit Graph

339739 Commits

Author SHA1 Message Date
Sam McCall d035c832c3 [lldb] Try to fix writing outside temp dir from 4bafceced6 2020-01-17 17:30:12 +01:00
David Spickett 398dc06ad0 [AArch64] Make AArch64 specific assembly directives case insensitive
Differential Revision: https://reviews.llvm.org/D72923
2020-01-17 16:16:18 +00:00
Dmitri Gribenko 0406b4fab9 Renamed traverseDecl to TraverseDecl in a test
RecursiveASTVisitor expects TraverseDecl to be implemented by
subclasses.
2020-01-17 17:12:23 +01:00
Gabor Horvath 05c7dc6648 [DataFlow] Factor two worklist implementations out
Right now every dataflow algorithm uses its own worklist implementation.
This is a first step to reduce this duplication. Some upcoming
algorithms such as the lifetime analysis is going to use the factored
out implementations.

Differential Revision: https://reviews.llvm.org/D72380
2020-01-17 08:11:15 -08:00
Matt Arsenault 886f9071c6 AMDGPU: Don't assert on a16 images on targets without FeatureR128A16
Currently the lowering for i16 image coordinates asserts on gfx10. I'm
somewhat confused by this though. The feature is missing from the
gfx10 feature lists, but the a16 bit appears to be present in the
manual for MIMG instructions.
2020-01-17 11:07:00 -05:00
Simon Pilgrim d1b32f328e Revert rGb6437b352db9 - "Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimizing-move warnings."
Fix buildbots
2020-01-17 16:04:10 +00:00
Simon Pilgrim 88cdeaa531 Revert rGff3fe145fe48 "Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimizing-move warning."
Fix buildbots
2020-01-17 16:03:21 +00:00
Simon Pilgrim ff3fe145fe Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimizing-move warning. 2020-01-17 15:51:08 +00:00
Simon Pilgrim b6437b352d Fix gcc9 "moving a local object in a return statement prevents copy elision" Wpessimizing-move warnings. 2020-01-17 15:51:08 +00:00
Sanjay Patel 43f60e614a [x86] try harder to form 256-bit unpck*
This is another part of a problem noted in PR42024:
https://bugs.llvm.org/show_bug.cgi?id=42024

The AVX2 code may use awkward 256-bit shuffles vs. the AVX code that gets split
into the expected 128-bit unpack instructions. We have to be selective in
matching the types where we try to do this though. Otherwise, we can end up
with more instructions (in the case of v8x32/v4x64).

Differential Revision: https://reviews.llvm.org/D72575
2020-01-17 10:42:39 -05:00
Krzysztof Parzyszek 2d5bfc6eb1 [Hexagon] Improve HVX version checks 2020-01-17 09:40:26 -06:00
Krzysztof Parzyszek 60aed6a4e5 [Hexagon] Add prev65 subtarget feature
There was a change to trap1 instruction between v62 and v65. This
feature will allow the assembler/disassembler to handle different
variants depending on the CPU version.
2020-01-17 09:27:27 -06:00
Aaron Ballman 7f4e744b90 Another speculative fix for the Windows bots.
Hopefully fixes: http://45.33.8.238/win/6040/step_4.txt
2020-01-17 10:23:45 -05:00
Aaron Ballman bcda877b43 Fix a compile error to get bots back to green.
Fixes http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13716
2020-01-17 09:56:04 -05:00
Nathan f9c46229e4 [clang-tidy] Disable Checks on If constexpr statements in template Instantiations for BugproneBranchClone and ReadabilityBracesAroundStatements
Summary: fixes [[ https://bugs.llvm.org/show_bug.cgi?id=32203 | readability-braces-around-statements broken for if constexpr]] and [[ https://bugs.llvm.org/show_bug.cgi?id=44229 | bugprone-branch-clone false positive with template functions and constexpr ]] by disabling the relevant checks on if constexpr statements while inside an instantiated template. This is due to how the else branch of an if constexpr statement is folded away to a null statement if the condition evaluates to false

Reviewers: alexfh, hokein, aaron.ballman, xazax.hun

Reviewed By: aaron.ballman, xazax.hun

Subscribers: rnkovacs, JonasToth, Jim, lebedev.ri, xazax.hun, cfe-commits

Tags: #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D71980
2020-01-17 14:21:38 +00:00
Simon Pilgrim 8eb4d25a09 [X86] Split X87/SSE compare classes into WriteFCom + WriteFComX
Most X87 compare instructions write to the X87 status word, while the SSE (U)COMI compares write to rFLAGS. These are often handled very differently on CPUs (e.g. rFLAGS outputs typically involve a fpu2gpr transfer), and we shouldn't be grouping all these instructions behind a single class - so this patch splits off the SSE compares into a new WriteFComX class (and currently keeps the same behaviours). If there's a need to distinguish between X87 instructions more closely we can investigate that in the future, but as we don't handle any of the X87 side effects at the moment its unlikely to have any notable effect.
2020-01-17 13:53:58 +00:00
Simon Pilgrim 1dc2f25790 [SelectionDAG] ComputeKnownBits - assert we're computing the 0'th (difference) result for the SUB/SUBC cases
Matches what we already do for the ADD/ADDC/ADDE case.
2020-01-17 13:53:57 +00:00
LLVM GN Syncbot 73db4f6f11 [gn build] Port 42a0355816 2020-01-17 13:44:44 +00:00
Logan Smith 42a0355816 Add `bugprone-reserved-identifier`
This patch adds bugprone-reserved-identifier, which flags uses of __names _Like
::_this, which are reserved for the implementation. The check can optionally be
inverted, i.e. configured to flag any names that are _not_ reserved, which may
be useful for e.g. standard library implementors.
2020-01-17 08:44:21 -05:00
Sanjay Patel c1e159ef6e [IR] fix Constant::isElementWiseEqual() to allow for all undef elements compare
We could argue that match() should be more flexible here,
but I'm not sure what impact that would have on existing code.
2020-01-17 08:31:16 -05:00
Sanjay Patel ffd3e1607d [IR] add unit test for Constant::isElementWiseEqual() for undef corner case; NFC 2020-01-17 08:26:00 -05:00
Sam Parker 42350cd893 [ARM][MVE] Tail Predicate IsSafeToRemove
Introduce a method to walk through use-def chains to decide whether
it's possible to remove a given instruction and its users. These
instructions are then stored in a set until the end of the transform
when they're erased. This is now used to perform checks on the
iteration count (LoopDec chain), element count (VCTP chain) and the
possibly redundant iteration count.

As well as being able to remove chains of instructions, we know also
check that the sub feeding the vctp is producing the expected value.

Differential Revision: https://reviews.llvm.org/D71837
2020-01-17 13:19:14 +00:00
Lei Zhang 267483ac70 [mlir][spirv] Support implied extensions and capabilities
In SPIR-V, when a new version is introduced, it is possible some
existing extensions will be incorporated into it so that it becomes
implicitly declared if targeting the new version. This affects
conversion target specification because we need to take this into
account when allowing what extensions to use.

For a capability, it may also implies some other capabilities,
for example, the `Shader` capability implies `Matrix` the capability.
This should also be taken into consideration when preparing the
conversion target: when we specify an capability is allowed, all
its recursively implied capabilities are also allowed.

This commit adds utility functions to query implied extensions for
a given version and implied capabilities for a given capability
and updated SPIRVConversionTarget to use them.

This commit also fixes a bug in availability spec. When a symbol
(op or enum case) can be enabled by an extension, we should drop
it's minimal version requirement. Being enabled by an extension
naturally means the symbol can be used by *any* SPIR-V version
as long as the extension is supported. The grammar still encodes
the 'version' field for such cases, but it should be interpreted
as a different way: rather than meaning a minimal version
requirement, it says the symbol becomes core at that specific
version.

Differential Revision: https://reviews.llvm.org/D72765
2020-01-17 08:01:57 -05:00
Lei Zhang 37dfc64687 Revert "[mlir][ods] Support dialect specific content emission via hooks"
This reverts commit 397215cc30 because
this feature needs more discussion.
2020-01-17 07:56:21 -05:00
Fedor Sergeev cc7cb05e9d [BasicBlock] fix looping in getPostdominatingDeoptimizeCall
Blindly following unique-successors chain appeared to be a bad idea.
In a degenerate case when block jumps to itself that goes into endless loop.

Discovered this problem when playing with additional changes,
managed to reproduce it on existing LoopPredication code.

Fix by checking a "visited" set while iterating through unique successors.

Reviewed By: skatkov

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72908
2020-01-17 15:40:02 +03:00
Martin Probst 9835cf1590 clang-format: [JS] pragmas for tslint, tsc.
Summary:
tslint and tsc (the TypeScript compiler itself) use comment pragmas of
the style:

  // tslint:disable-next-line:foo
  // @ts-ignore

These must not be wrapped and must stay on their own line, in isolation.
For tslint, this required adding it to the pragma regexp. The comments
starting with `@` are already left alone, but this change adds test
coverage for them.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72907
2020-01-17 13:39:05 +01:00
Krasimir Georgiev 33463cfba2 clang-format: fix spacing in `operator const char*()`
Summary:
Revision a75f8d98d7 fixed spacing for operators,
but caused the const and non-const versions to diverge:
```
// With Style.PointerAlignment = FormatStyle::PAS_Left:

struct A {
  operator char*() { return ""; }
  operator const char *() const { return ""; }
};

```
The code was checking if the type specifier was directly preceded by `operator`.
However there could be comments and `const/volatile` in between.

Reviewers: mprobst

Reviewed By: mprobst

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72911
2020-01-17 13:33:41 +01:00
Miloš Stojanović ea91758a3c [llvm-exegesis][mips] Add support for memory instructions
Implementing functions used to enable testing of memory instructions.

Differential Revision: https://reviews.llvm.org/D72858
2020-01-17 13:26:09 +01:00
Raphael Isemann 791f132132 [lldb] Remove out of order OperatingSystemPython::Terminate call in SystemInitializerFull
We already call it later in the method (which is in the right order as we Initialize it
at the of the constructor).
2020-01-17 13:02:15 +01:00
Raphael Isemann f2d41ad0e7 [lldb] Add missing terminate calls to Python/Lua subsystems 2020-01-17 12:49:57 +01:00
Cullen Rhodes 49edf9a509 [AArch64][SVE] Add break intrinsics
Summary:
Implements the following intrinsics:

    * @llvm.aarch64.sve.brka
    * @llvm.aarch64.sve.brka.z
    * @llvm.aarch64.sve.brkb
    * @llvm.aarch64.sve.brkb.z
    * @llvm.aarch64.sve.brkn.z
    * @llvm.aarch64.sve.brkpa.z
    * @llvm.aarch64.sve.brkpb.z

Reviewers: sdesmalen, efriedma, dancgr, mgudim, cameron.mcinally, rengolin

Reviewed By: sdesmalen

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72393
2020-01-17 11:47:08 +00:00
Simon Pilgrim f611158350 [SelectionDAG] Better ISD::ANY_EXTEND/ISD::ANY_EXTEND_VECTOR_INREG ComputeKnownBits support
Add DemandedElts handling to ISD::ANY_EXTEND and add missing ISD::ANY_EXTEND_VECTOR_INREG handling. Despite the lack of test changes this code IS being used - its just that the ANY_EXTEND ops are legalized later on (typically to ZERO_EXTEND equivalents) so we typically manage to combine later on.
2020-01-17 11:37:58 +00:00
Simon Pilgrim 25afe91fd1 Fix Wparentheses warning. NFCI. 2020-01-17 11:26:25 +00:00
David Spickett 37fb3b3363 [AsmParser] Make generic directives and aliases case insensitive.
GCC will accept any case for assembler directives.
For example ".abort" and ".ABORT" (even ".aBoRt")
are equivalent.

https://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops
"The names are case insensitive for most targets,
and usually written in lower case."

Change llvm-mc to accept any case for generic directives
or aliases of those directives.

This for Bugzilla #39527.

Differential Revision: https://reviews.llvm.org/D72686
2020-01-17 11:02:56 +00:00
Kerry McLaughlin fe3bb8ec96 [AArch64][SVE] Add ImmArg property to intrinsics with immediates
Summary:
Several SVE intrinsics with immediate arguments (including those
added by D70253 & D70437) do not use the ImmArg property.
This patch adds ImmArg<Op> where required and changes
the appropriate patterns which match the immediates.

Reviewers: efriedma, sdesmalen, andwar, rengolin

Reviewed By: efriedma

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

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72612
2020-01-17 10:47:55 +00:00
Peter Smith 01ad4c8384 [LLD][ELF][ARM][AArch64] Only round up ThunkSection Size when large OS.
In D71281 a fix was put in to round up the size of a ThunkSection to the
nearest 4KiB when performing errata patching. This fixed a problem with a
very large instrumented program that had thunks and patches mutually
trigger each other. Unfortunately it triggers an assertion failure in an
AArch64 allyesconfig build of the kernel. There is a specific assertion
preventing an InputSectionDescription being larger than 4KiB. This will
always trigger if there is at least one Thunk needed in that
InputSectionDescription, which is possible for an allyesconfig build.

Abstractly the problem case is:
.text : {
          *(.text) ;
          ...
          . = ALIGN(SZ_4K);
          __idmap_text_start = .;
          *(.idmap.text)
          __idmap_text_end = .;
          ...
        }
The assertion checks that __idmap_text_end - __idmap_start is < 4 KiB.
Note that there is more than one InputSectionDescription in the
OutputSection so we can't just restrict the fix to OutputSections smaller
than 4 KiB.

The fix presented here limits the D71281 to InputSectionDescriptions that
meet the following conditions:
1.) The OutputSection is bigger than the thunkSectionSpacing so adding
thunks will affect the addresses of following code.
2.) The InputSectionDescription is larger than 4 KiB. This will prevent
any assertion failures that an InputSectionDescription is < 4 KiB
in size.

We do this at ThunkSection creation time as at this point we know that
the addresses are stable and up to date prior to adding the thunks as
assignAddresses() will have been called immediately prior to thunk
generation.

The fix reverts the two tests affected by D71281 to their original state
as they no longer need the 4KiB size roundup. I've added simpler tests to
check for D71281 when the OutputSection size is larger than the ThunkSection
spacing.

Fixes https://github.com/ClangBuiltLinux/linux/issues/812

Differential Revision: https://reviews.llvm.org/D72344
2020-01-17 10:47:21 +00:00
Raphael Isemann c3ab790c8f [lldb][NFC] Resynchronize Init/Terminate calls in SystemInitializerFull/Test.cpp files.
These files should do the more or less the same initialize/terminate calls in the
same order. This just reverts all the differences that have piled up over time
in the SystemInitializerTest that people keep forgetting about.
2020-01-17 11:34:59 +01:00
Dmitri Gribenko 10b4aece52 Revert "Avoid creating an immutable map in the Automaton class."
This reverts commit 051d330314. It broke
buildbots, for example,
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/21908.
2020-01-17 10:20:36 +01:00
Martin Probst 0734fb21ed clang-format: [JS] Handle more keyword-named methods.
Summary:
Including `do`, `for`, and `while`, `if`, `else`, `try`, `catch`, in
addition to the previously handled fields. The unit test explicitly uses
methods, but this code path handles both fields and methods.

Reviewers: krasimir

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D72827
2020-01-17 10:10:16 +01:00
serge-sans-paille d293417931 Add __warn_memset_zero_len builtin as a workaround for glibc issue
Glibc issue: https://sourceware.org/bugzilla/show_bug.cgi?id=25399
The fix consist in considering the missing function as a builtin lowered to a nop.

Differential Revision: https://reviews.llvm.org/D72869
2020-01-17 09:58:32 +01:00
serge-sans-paille d437fba8ef Reapply Allow system header to provide their own implementation of some builtin
This reverts commit 3d210ed3d1.

See https://reviews.llvm.org/D71082 for the patch and discussion that make it
possible to reapply this patch.
2020-01-17 09:58:32 +01:00
Raphael Isemann 6b840834cd [lldb][NFC] Delete unused lldb/source/Plugins/LanguageRuntime/Go/CMakeLists.txt 2020-01-17 09:57:44 +01:00
Hans Wennborg 0ab035ae50 Remove old Suversion release scripts 2020-01-17 09:35:34 +01:00
Raphael Isemann 5ac610668a [lldb] Re-add NSDate formatter
This test had been overwritten by accident in ff75262f70.
This just readds the test with the correct content.
2020-01-17 08:56:05 +01:00
Kadir Cetinkaya 4df94d5b51
Revert "[clangd][test] Disable a particular testcase in FindExplicitReferencesTest when LLVM_ENABLE_EXPENSIVE_CHECKS"
This reverts commit 42b3c38903.

Should've been fixed by d54d71b67e
2020-01-17 08:51:13 +01:00
Alex Langford 9dbd395b9b [lldb] Remove ClangASTContext.h inclusion in Target.cpp
Target doesn't use ClangASTContext, it just needs
PersistentExpressionState. Replace ClangASTContext.h with
ExpressionVariable.h
2020-01-16 22:43:10 -08:00
Jonas Devlieghere e1f6b68d1f [lldb/Cmake] Add a CMakeLists.txt to the utils directory...
... and include it from the main CMakeLists.txt instead of including the
utility subdirectories directly. This is consistent with the other
subdirectories and limits the scope of future changes.
2020-01-16 22:31:01 -08:00
Jonas Devlieghere 911a4c4dda [lldb/Test] Fix API tests for mutli-config generators
The build configuration wasn't properly substituted for the
config.lldb_executable variable. This broke when the variable was
extracted from config.dotest_args_str which was properly substituted.
2020-01-16 22:25:55 -08:00
Lang Hames f6d6b98eec [docs][ORC] Try to fix 'title-level inconsistent' error in ORCv2.rst. 2020-01-16 21:46:35 -08:00
Lang Hames adef2f5324 [docs][ORC] Fix some RST errors in the ORCv2 doc. 2020-01-16 21:10:56 -08:00