Commit Graph

370270 Commits

Author SHA1 Message Date
Yashaswini Hegde 3fa20baf00 [Flang][OpenMP 4.5] Add semantic check for OpenMP default clause 2020-10-27 12:38:47 -04:00
Louis Dionne 87d3a5365e [libc++] Remove references to CONDUIT_TOKEN
It's not required anymore, since we rely on another job to report
the results back to Phabricator.
2020-10-27 12:26:44 -04:00
Jonas Devlieghere 00bb397b0d [lldb] Support Python imports relative the to the current file being sourced
Make it possible to use a relative path in command script import to the
location of the file being sourced. This allows the user to put Python
scripts next to LLDB command files and importing them without having to
specify an absolute path.

To enable this behavior pass `-c` to `command script import`. The
argument can only be used when sourcing the command from a file.

rdar://68310384

Differential revision: https://reviews.llvm.org/D89334
2020-10-27 09:20:45 -07:00
Jay Foad d028d2b376 [AMDGPU] Add llvm.amdgcn.div.scale with fneg tests 2020-10-27 16:05:51 +00:00
Kirill Bobyrev 5ad6bbacf0
[clangd] Start using SyntaxTrees for folding ranges feature
This is an initial attempt to start using Syntax Trees in clangd while improving state of folding ranges feature and experimenting with Syntax Tree capabilities.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D88553
2020-10-27 16:47:35 +01:00
Tony 5984097823 [AMDGPU] Add missing support for targets
- Add missing tests.

Differential Revision: https://reviews.llvm.org/D90212
2020-10-27 15:36:31 +00:00
Arthur Eubanks 213f6dd715 Revert "Updating llvm.mlir test to match recent IR change"
This reverts commit 0fc1aa22ee.
2020-10-27 08:35:18 -07:00
Raphael Isemann 45c3fc97a2 [lldb][NFC] Make GetResumeCountForLaunchInfo return an unsigned.
The number of resumes should always be positive to let's make this an
unsigned everywhere. Also remove the unused 'localhost' parameter from
ConvertArgumentsForLaunchingInShell.
2020-10-27 16:25:01 +01:00
Louis Dionne 2479b3d7c6 [libc++] Fix filesystem test in C++11/14
Before C++17, std::string::data() was marked as const, so we can't use
it to write to the contents of the string.
2020-10-27 11:21:33 -04:00
Florian Hahn 548772fe69 [AArch64] Add additional tests for vector inserts with common element. 2020-10-27 14:58:56 +00:00
Raphael Isemann d43c70a202 [lldb] Add llvm-pdbutil to lldb test dependencies
Since D89812 we use llvm-pdbutil in the LLDB tests but we didn't add it to
the test dependencies.
2020-10-27 15:46:25 +01:00
Michał Górny 4ba8ea4cb0 [lldb] [Process/FreeBSD] Fix missing namespace qualifier
Fixes e4cc6e9bcd
2020-10-27 15:38:00 +01:00
Michał Górny 8e7ea99c38 [lldb] [Process/FreeBSDRemote] Enable watchpoint support
Replace the inline x86 watchpoint handling code with the reusable
NativeRegisterContextWatchpoint_x86.  Implement watchpoint support
in NativeThreadFreeBSD and SIGTRAP handling for watchpoints.

Un-skip all concurrent_events tests as they pass with the new plugin.

Differential Revision: https://reviews.llvm.org/D90102
2020-10-27 15:38:00 +01:00
Raphael Isemann e038b60d91 Revert "[IndVars] Remove monotonic checks with unknown exit count"
This reverts commit c6ca26c0bf.
This breaks stage2 builds due to hitting this assert:
```
   Assertion failed: (WeightSum <= UINT32_MAX && "Expected weights to scale down to 32 bits"), function calcMetadataWeights
```
when compiling AArch64RegisterBankInfo.cpp in LLVM.
2020-10-27 15:31:37 +01:00
Raphael Isemann a0d84d8031 Revert "[NFC] Factor away lambda's redundant parameter"
This reverts commit fdc845b361.
It seems to be a follow-up to c6372b3fb495 which will be reverted.
2020-10-27 15:30:52 +01:00
Alex Richardson 75a1790f4b Fix use-after-scope introduced in 850325348a 2020-10-27 14:26:23 +00:00
Michael Liao 0d092303b4 [amdgpu] Enable use of AA during codegen.
- Add an internal option `-amdgpu-use-aa-in-codegen` to enable or
  disable this feature. By Default, it's enabled.

Differential Revision: https://reviews.llvm.org/D89320
2020-10-27 09:46:23 -04:00
Simon Pilgrim bce770ffa6 Revert rG0905bd5c2fa42bd4c "[InstCombine] collectBitParts - add trunc support."
This reverts commit 0905bd5c2f.

Causing failures in multistage buildbots that I need to investigate
2020-10-27 13:43:54 +00:00
Benjamin Kramer 35f7cbf9df [X86] Don't crash on CVTPS2PH with wide vector inputs. 2020-10-27 14:42:02 +01:00
Simon Pilgrim 3bc5824181 [X86] Regenerate all-ones vector tests with common prefixes. 2020-10-27 13:41:27 +00:00
Nico Weber 2a4e704c92 Revert "Use uint64_t for branch weights instead of uint32_t"
This reverts commit e5766f25c6.
Makes clang assert when building Chromium, see https://crbug.com/1142813
for a repro.
2020-10-27 09:26:21 -04:00
Simon Pilgrim b19473cf59 [clang] RewriteObjCClassMetaData - remove superfluous null pointer check. NFCI.
We've already dereferenced the pointer and no other getClassInterface() calls appear to bother with such a check.

Reported as "Snippet 6" in https://www.viva64.com/en/b/0771/
2020-10-27 13:14:55 +00:00
Simon Pilgrim 2bc2e2e9fe [MallocChecker] Remove duplicate QCoreApplication::postEvent check. NFCI.
This appears to have been in the original patch in D14170.

Reported as "Snippet 11" in https://www.viva64.com/en/b/0771/
2020-10-27 13:14:54 +00:00
Simon Pilgrim 5a855551cb [X86] Regenerate vector shift tests. NFCI.
Merge prefixes where possible, use 'X86' instead of 'X32' (which we try to only use for gnux32 triple tests).
2020-10-27 13:14:54 +00:00
Simon Pilgrim 0905bd5c2f [InstCombine] collectBitParts - add trunc support.
This should allow us to remove the rather limited matchOrConcat fold and just use recognizeBSwapOrBitReverseIdiom.
2020-10-27 13:14:54 +00:00
Zahira Ammarguellat e562a40871 Fix for PR47544. Clang is crashing after generating the right
diagnostic for a re-declaration of a friend method.d
https://reviews.llvm.org/D88112
2020-10-27 05:57:39 -07:00
Djordje Todorovic cca049ad2b [NFC][IntrRefLDV] Some code clean up
As reading the source code, I've found some minor nits:
  -Use using instead of typedef
  -Fix a comment
  -Refactor

Differential Revision: https://reviews.llvm.org/D90155
2020-10-27 05:31:24 -07:00
Sven van Haastregt 5d03080092 [TargetLowering] Add i1 condition for bit comparison fold
For i1 types, boolean false is represented identically regardless of
the boolean content, so we can allow optimizations that otherwise
would not be correct for booleans with false represented as a negative
one.

Patch by Erik Hogeman.

Differential Revision: https://reviews.llvm.org/D90145
2020-10-27 12:22:20 +00:00
LLVM GN Syncbot 2107e4b10e [gn build] Port 850325348a 2020-10-27 12:17:41 +00:00
Alex Richardson 89031cffd1 Fix sancov.py when objdump is llvm-objdump
The sanitizer-coverage.cpp test case was always failing for me. It turns
out the reason for this is that I was building with
-DLLVM_INSTALL_BINUTILS_SYMLINKS=ON and sancov.py's grep regex does not
handle llvm-objdump's disassembly format (hex immediates have a leading "0x").
While touching those lines also change them to use raw string literals since
invalid escape sequnces will become an error in future python versions.
Also simplify the code by using subprocess.check_output() instead of Popen().
This also works with python2.

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

Reviewed By: #sanitizers, vitalybuka

Differential Revision: https://reviews.llvm.org/D89648
2020-10-27 12:16:46 +00:00
Alex Richardson 850325348a [clang-format] Fix misformatted macro definitions after D86959
After D86959 the code `#define lambda [](const decltype(x) &ptr) {}`
was formatted as `#define lambda [](const decltype(x) & ptr) {}` due to
now parsing the '&' token as a BinaryOperator. The problem was caused by
the condition `Line.InPPDirective && (!Left->Previous || !Left->Previous->is(tok::identifier))) {`
being matched and therefore not performing the checks for "previous token
is one of decltype/_Atomic/etc.". This patch moves those checks after the
existing if/else chain to ensure the left-parent token classification is
always run after checking whether the contents of the parens is an
expression or not.

This change also introduces a new TokenAnnotatorTest that checks the
token kind and Role of Tokens after analyzing them. This is used to check
for TT_PointerOrReference, in addition to indirectly testing this based
on the resulting formatting.

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D88956
2020-10-27 12:16:46 +00:00
Alex Richardson d323c8f791 [ValueTracking][NFC] Use Log2(Align) instead of countTrailingZeroes
The latter can probably be optimized to the same final code, but this might
help -O0 builds.
2020-10-27 12:16:45 +00:00
Alex Richardson 565f4e72da [ValueTracking] Add more tests for alignment assume bundles
I noticed that alignment was no longer inferred as well after I last merged
our CHERI fork from upstream. I opened this review before seeing that D88669
already fixes the same problem, so this commit simply adds the new test that
I added as part of this change.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89830
2020-10-27 12:16:45 +00:00
Shimin Cui 22e4346e05 [ValueTracking] Add tracking of the alignment assume bundle
This patch is to add the support of the value tracking of the alignment assume bundle.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88669
2020-10-27 12:16:45 +00:00
Sebastian Neubauer 673f2f702b msgpack: Improve error for empty node 2020-10-27 12:57:00 +01:00
David Spickett f8a3b9b06c [lldb] Correct vFile:pread/pwrite packet docs
The statement that lldb-server can handle
decimal and hex numbers is misleading.
(it can only handle hex with 0x prefix)

Mentioning non decimal numbers at all
is just creating more confusion for anyone
who tries to use them with lldb-server.

Differential Revision: https://reviews.llvm.org/D89383
2020-10-27 11:47:35 +00:00
Roman Lebedev 0ac56e8eaa
[InstCombine] Fold `(X >>? C1) << C2` patterns to shift+bitmask (PR37872)
This is essentially finalizes a revert of rL155136,
because nowadays the situation has improved, SCEV can model
all these patterns well, and we canonicalize rotate-like patterns
into a funnel shift intrinsics in InstCombine.
So this should not cause any pessimization.

I've verified the canonicalize-{a,l}shr-shl-to-masking.ll transforms
with alive, which confirms that we can freely preserve exact-ness,
and no-wrap flags.

Profs:
* base: https://rise4fun.com/Alive/gPQ
* exact-ness preservation: https://rise4fun.com/Alive/izi
* nuw preservation: https://rise4fun.com/Alive/DmD
* nsw preservation: https://rise4fun.com/Alive/SLN6N
* nuw nsw preservation: https://rise4fun.com/Alive/Qp7

Refs. https://reviews.llvm.org/D46760
2020-10-27 14:42:53 +03:00
Roman Lebedev 5e3a8953ac
[NFC][PhaseOrdering] Autogenerate basic.ll test 2020-10-27 14:42:53 +03:00
Roman Lebedev 90152a602c
[NFC][InstCombine] Autogenerate cast.ll test 2020-10-27 14:42:52 +03:00
Roman Lebedev 6482f3239a
[NFC][InstCombine] Add more exhaustive test coverage for `(x >>? X1) << C2` pattern (PR37872) 2020-10-27 14:42:52 +03:00
Kazushi (Jam) Marukawa c5fa6bae12 [VE] Add vector float instructions
Add VFAD/VFSB/VFMP/VFDV/VFSQRT/VFCP/VFCM/VFMAD/VFMSB/VFNMAD/VFNMSB/
VRCP/VRSQRT/VRSQRTNEX/VFIX/VFIXX/VFLT/VFLTX/VCVS/VCVD instructions.
Add regression tests too.  Also add additional AsmParser for VFIX
and VFIXX instructions to parse their mnemonic.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D90166
2020-10-27 20:42:24 +09:00
Kazushi (Jam) Marukawa ccb6191f04 [VE] Add missing regression test
In the previous "Add vector shift instructions", I forgot to add
regression tests for VSRL and VSRD instructions.  This patch is
adding them.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D90167
2020-10-27 20:40:30 +09:00
Kirill Bobyrev d26dd74308 [clangd] Separate final_result into a different message
This is a breaking change in remote index protocol.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D89851
2020-10-27 11:46:16 +01:00
Mikhail Maltsev 443ab4d2e0 [clang][Basic] Integrate SourceLocation with FoldingSet, NFCI
This patch removes the necessity to access the SourceLocation internal
representation in several places that use FoldingSet objects.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D69844
2020-10-27 10:43:39 +00:00
Georgii Rymar f855a55333 [llvm-readelf] - Implement --section-details option.
--section-details/-t is a GNU readelf option that produce
an output that is an alternative to --sections.

Differential revision: https://reviews.llvm.org/D89304
2020-10-27 13:29:39 +03:00
Med Ismail Bennani a3aea0193d [llvm/DebugInfo] Simplify DW_OP_implicit_value condition (NFC)
Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2020-10-27 11:25:19 +01:00
Jay Foad 6539ebe97d [AMDGPU] Use DPP instead of Ext in a couple of class names. NFC. 2020-10-27 10:22:30 +00:00
Raphael Isemann 1f933ff999 [lldb][NFC] Rewrite TestQuoting
TestQuoting's different test methods all build their own test binaries but
we can just reuse the same test binary by merging all asserts into one method.
This reduces the test runtime from 8 seconds to 4 seconds on my machine.
This also removes the ability to have partial failures in this test, but given
how rarely this code is touched this seems like a fair tradeoff (and we will be
able to re-add this feature once we updated our test framework).

Some other small changes:
  * Fixed that we cleanup "stdout.txt" instead of "output.txt" in the cleanup.
  * Fixed some formatting issues.
  * Call `build` instead of directly calling `buildDefault`.
2020-10-27 11:12:17 +01:00
Georgii Rymar 2d59ed4e62 [yaml2obj] - Add a way to override the sh_addralign field of a section.
Imagine the following declaration of a section:
```
Sections:
  - Name:         .dynsym
    Type:         SHT_DYNSYM
    AddressAlign: 0x1111111111111111
```

The aligment is large and yaml2obj reports an error currently:
"the desired output size is greater than permitted. Use the --max-size option to change the limit"

This patch implements the "ShAddrAlign" key, which is similar to other "Sh*" keys we have.
With it it is possible to override the `sh_addralign` field, ignoring the writing of alignment bytes.

Differential revision: https://reviews.llvm.org/D90019
2020-10-27 13:03:38 +03:00
Florian Hahn f067bc3c0a [LoopRotation] Allow loop header duplication if vectorization is forced.
-Oz normally does not allow loop header duplication so this loop wouldn't be
vectorized.  However the vectorization pragma should override this and allow
for loop rotation.

rdar://problem/49281061

Original patch by Adam Nemet.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D59832
2020-10-27 09:28:01 +00:00