Commit Graph

372507 Commits

Author SHA1 Message Date
Wolfgang Pieb 87369c6261 Revert "[tsan] Add pthread_cond_clockwait interceptor"
This reverts commit 16eb853ffd.

The test is failing on some Linux build bots. See the review for
an example.
2020-11-18 11:58:45 -08:00
Andrew Gallagher c6c8d4a13e [modules] Fix crash in call to `FunctionDecl::setPure()`
In some cases, when deserializing a `CXXMethodDecl` of a `CXXSpecializationTemplateDecl`,
the call to `FunctionDecl::setPure()` happens before the `DefinitionData` member has been
populated (which appears to happen lower down in a `mergeRedeclarable` call), causing a
crash (https://reviews.llvm.org/P8228).

This diff fixes this by deferring the `FunctionDecl::setPure()` till after the `DefinitionData` has
been filled in.

Reviewed By: lxfind

Differential Revision: https://reviews.llvm.org/D86853
2020-11-18 11:55:29 -08:00
Nikita Popov 23aeadb89d [Inline] Fix incorrect noalias metadata application (PR48209)
The VMap also contains a mapping from Argument => Instruction,
where the instruction is part of the original function, not the
inlined one. The code was assuming that all the instructions in
the VMap were inlined.

This was a pre-existing problem for the loop access metadata, but
was extended to the more common noalias metadata by
27f647d117, thus causing miscompiles.

There is a similar assumption inside CloneAliasScopeMetadata(), so
that one likely needs to be fixed as well.
2020-11-18 20:52:58 +01:00
Nikita Popov b51c290663 [Inline] Add test for PR48209 (NFC)
The test shows noalias metadata being incorrectly applied to the
instruction producing the argument for the call.
2020-11-18 20:52:58 +01:00
Siva Chandra Reddy d1b921e3bf [libc][NFC][Obvious] Remove few unnecessary pieces from ilogb tests. 2020-11-18 11:26:05 -08:00
Jamie Schmeiser d4ba28bddc Expand existing loopsink testing to also test loopsinking using new pass manager and fix LICM bug.
Summary:
Expand existing loopsink testing to also test loopsinking using new pass
manager.  Enable memoryssa for loopsink with new pass manager.  This
combination exposed a bug that was previously fixed for loopsink
without memoryssa.  When sinking an instruction into a loop, the source
block may not be part of the loop but still needs to be checked for
pointer invalidation.  This is the fix for bugzilla #39695 (PR 54659)
expanded to also work with memoryssa.

Respond to review comments.  Enable Memory SSA in legacy Loop Sink pass
under EnableMSSALoopDependency option control.  Update tests accordingly.

Respond to review comments.  Add options controlling whether memoryssa is
used for loop sink, defaulting to off.  Expand testing based on these
options.

Respond to review comments.  Properly indicated preserved analyses.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: asbirlea (Alina Sbirlea)
Differential Revision: https://reviews.llvm.org/D90249
2020-11-18 14:08:42 -05:00
Nikita Popov 85ccdcaa50 [BasicAA] Remove assert in AA evaluator
As reported in https://reviews.llvm.org/D91383#2401825, this
assert breaks external -aa-eval tests. We'll have to fix this
case before re-enabling it.
2020-11-18 20:04:38 +01:00
Roland McGrath 7810d83786 [GWP-ASan] Respect GWP_ASAN_DEFAULT_ENABLED compile-time macro
If the containing allocator build uses -DGWP_ASAN_DEFAULT_ENABLED=false
then the option will default to false.  For e.g. Scudo, this is simpler
and more efficient than using -DSCUDO_DEFAULT_OPTIONS=... to set gwp-asan
options that have to be parsed from the string at startup.

Reviewed By: hctim

Differential Revision: https://reviews.llvm.org/D91463
2020-11-18 10:34:42 -08:00
ergawy adf9f64a02 [MLIR][SPIRV] Rename `spv._reference_of` to `spv.mlir.referenceof`
This commit does the renaming mentioned in the title in order to bring
'spv' dialect closer to the MLIR naming conventions.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D91715
2020-11-18 13:27:29 -05:00
Yitzhak Mandelbaum 068da2c749 [clang-tidy] Allow `TransformerClangTidyCheck` clients to set the rule directly.
Adds support for setting the `Rule` field. In the process, refactors the code that accesses that field and adds a constructor that doesn't require a rule argument.

This feature is needed by checks that must set the rule *after* the check class
is constructed. For example, any check that maintains state to be accessed from
the rule needs this support. Since the object's fields are not initialized when
the superclass constructor is called, they can't be (safely) captured by a rule
passed to the existing constructor.  This patch allows constructing the check
superclass fully before setting the rule.

As a driveby fix, removed the "optional" from the rule, since rules are just a
set of cases, so empty rules are evident.

Differential Revision: https://reviews.llvm.org/D91544
2020-11-18 18:25:21 +00:00
serge-sans-paille 733f7b5084 Revert "[build] normalize components dependencies"
This reverts commit c6ef6e1690.

Basically, publicly linked libraries have a different semantic than components,
which link libraries privately.

Differential Revision: https://reviews.llvm.org/D91461
2020-11-18 19:23:11 +01:00
Roman Lebedev 8b9e6dc501
[NFC][LoopIdiom] Left-shift-until-bittest: revisit test coverage 2020-11-18 21:22:27 +03:00
Utkarsh Saxena 130da802ff Revert "Revert "[clangd] Implement textDocument/implementation (Xref layer)""
This reverts commit 0016ab6f36.

Fix: Consume error from Expected<T>.
2020-11-18 19:09:16 +01:00
Simon Moll 9b99927618 [VP] Non-signalling llvm.vp.* intrinsics are speculatable
This is specifically required by the upcoming ExpandVectorPredication
pass (D78203) to recognize llvm.vp.* intrinsics that may ignore their
predicates.
2020-11-18 18:46:09 +01:00
Nico Weber c519bc7e16 lld/MachO: Move MachOOptTable to DriverUtils.cpp, remove DriverUtils.h
This makes lld/MachO look more like lld/COFF and lld/ELF, as discussed
in D91640.
2020-11-18 12:33:15 -05:00
Sebastian Neubauer 72ccec1bbc [AMDGPU] Fix v3f16 interaction with image store workaround
In some cases, the wrong amount of registers was reserved.

Also enable more v3f16 tests.

Differential Revision: https://reviews.llvm.org/D90847
2020-11-18 18:21:04 +01:00
Mark de Wever 3abaf6cde7 [libc++] Implements multiline regex support.
This resolves LWG2503.
2020-11-18 18:17:36 +01:00
Utkarsh Saxena 0016ab6f36 Revert "[clangd] Implement textDocument/implementation (Xref layer)"
This reverts commit 43243208fa.
2020-11-18 18:05:16 +01:00
Simon Pilgrim 480ad4afc2 HazardRecognizer - Fix definition/declaration argument name mismatches. NFCI.
Consistently use SUnit *SU (or drop the argname entirely if not used like the other HazardRecognizer methods).

Silences cppcheck warnings.
2020-11-18 16:50:52 +00:00
Simon Pilgrim 0415cf470b Fix unused variable warning. NFCI.
We're just performing a null pointer check, we don't need the actual variable.
2020-11-18 16:50:51 +00:00
Abhina Sreeskantharajan 057e6bb554 [SystemZ][NFC] Group SystemZ tests in SystemZ folder
This patch creates a SystemZ folder in clang/test/CodeGen to contain systemz-related lit tests.

Reviewed By: muiez

Differential Revision: https://reviews.llvm.org/D91628
2020-11-18 11:49:15 -05:00
dreachem 7046be1730 [OpenMP] [DOCS] Update OMP5.1 feature status table [NFC]
Adding features in OpenMP 5.1 specification, as documented in feature change history, to the 5.1 table. I alphabetized the rows of the table according to the category. For deprecating master construct, I just used 'other' as the category.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D90802
2020-11-18 10:46:42 -06:00
Nico Weber 27e73816d6 lld: Make tests depend on llvm-symbolizer after bc98034040
Fixes test failures when building just `check-lld` in a clean build dir.
2020-11-18 11:43:44 -05:00
Mikhail Goncharov 8c1e3cbebf [llvm] fix global_downgraded_to_static test
after 9aa7898200 https://reviews.llvm.org/D90930
2020-11-18 17:22:02 +01:00
Gaurav Jain 06fcc4f06f [NFC] Use [MC]Register for Hexagon target
Differential Revision: https://reviews.llvm.org/D91160
2020-11-18 08:17:07 -08:00
Utkarsh Saxena 43243208fa
[clangd] Implement textDocument/implementation (Xref layer)
Xref layer changes for textdocument/implementation (https://microsoft.github.io/language-server-protocol/specification#textDocument_implementation)

This currently shows all functions (implementations) that overrides a virtual function.

Differential Revision: https://reviews.llvm.org/D91702
2020-11-18 17:06:47 +01:00
Piotr Sobczak b3b9be4ae7 SpeculativeExecution: Allow speculating more instruction types
Support more instructions in SpeculativeExecution pass:
- ExtractValue
- InsertValue
- Trunc
- Freeze

Differential Revision: https://reviews.llvm.org/D91688
2020-11-18 17:00:19 +01:00
Simon Pilgrim 7a8b2f692e [DAGCombiner] Precommit Sext Tests for D91589
Patch by: @laytonio (Layton Kifer)

Differential Revision: https://reviews.llvm.org/D91671
2020-11-18 15:56:16 +00:00
Alexey Bataev 5ba324ccad [OPENMP]Fix PR48174: compile-time crash with target enter data on a global struct.
The compiler should treat array subscript with base pointer as a first
pointer in complex data, it is used only for member expression with base
pointer.

Differential Revision: https://reviews.llvm.org/D91660
2020-11-18 07:48:58 -08:00
Siva Chandra Reddy ad0e764ead [libc][obvious] Fix fdim[f|l] signatures in stdc spec. 2020-11-18 07:39:11 -08:00
Jay Foad 7ecf19697e [AMDGPU] Fix and extend vccz workarounds
We have workarounds for two different cases where vccz can get out of
sync with the value in vcc. This fixes them in two ways:

1. Fix the case where the def of vcc was in a previous basic block, by
pessimistically assuming that vccz might be incorrect at a basic block
boundary.

2. Fix the handling of pre-existing waitcnt instructions by calling
generateWaitcntInstBefore before examining ScoreBrackets to determine
whether there's an outstanding smem read operation.

Differential Revision: https://reviews.llvm.org/D91636
2020-11-18 15:26:06 +00:00
Roman Lebedev 34ff90ad5d
[Reassociate] Don't convert add-like-or's into add's if they appear to be part of load-combining idiom
As Wei Mi is reporting in post-commit review
  https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20201116/853479.html
teaching -reassociate about add-like-or's (70472f3) results in breaking apart
load widening patterns, and reassociating them.

For now, simply exclude any such `or` that appears to be a root of
load widening idiom from the or->add transformation.

Note that the heuristic is greedy, it doesn't ensure that loads
can *actually* be widened into a single load.
2020-11-18 17:55:02 +03:00
Roman Lebedev 1a3428163d
[NFC][Reassociate] Add patterns where `or` is part of load reduction idiom
As Wei Mi is reporting in post-commit review:
  https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20201116/853479.html
teaching -reassociate about add-like-or's (70472f3) results in breaking apart
load widening patterns, and reassociating them.

While that's great, it prevents the actual load widening in backend,
and that is not good. We should have load widening in middle-end,
but for now we should at least not regress the naive patterns..
2020-11-18 17:55:01 +03:00
Haojian Wu bd4662cd3f [AST] Enhance the const expression evaluator to support error-dependent exprs.
Fix a crash when evaluating a constexpr function which contains
recovery-exprs. https://bugs.llvm.org/show_bug.cgi?id=46837

Would be nice to have constant expression evaluator support general template
value-dependent expressions, but it requires more work.

This patch is a good start I think, to handle the error-only
value-dependent expressions.

Differential Revision: https://reviews.llvm.org/D84637
2020-11-18 15:48:06 +01:00
Simon Pilgrim 8270f8c252 [X86] Add broadcast merge test case for PR48215 2020-11-18 14:20:02 +00:00
Mikhail Goncharov f45c052c9e Fix unused variables in release build
Differential Revision: https://reviews.llvm.org/D91705
2020-11-18 15:18:31 +01:00
Jay Foad 9f69c1bc54 [AMDGPU] Rename pseudo S_WAITCNT_IDLE to S_WAIT_IDLE. NFC. 2020-11-18 14:03:43 +00:00
Florian Hahn a8a79c9069
[ConstraintElimination] Refactor constraint extraction (NFC).
This patch generalizes the extraction of a constraint for a given
condition. It allows decompose to return a vector of c * X pairs, which
allows de-composing multiple instructions in the future.

It also adds more clarifying comments.
2020-11-18 13:59:18 +00:00
Haojian Wu aad3ea8983 [clangd] Remove the trailing "." in add-using message.
to be consistent witih other code actions.

Reviewed By: adamcz

Differential Revision: https://reviews.llvm.org/D91694
2020-11-18 14:46:26 +01:00
Jonas Paulsson 45b8e37afc [SystemZ] Use ISD::ABS opcode during isel.
The SystemZISD::IABS node is no longer needed since ISD::ABS can be used
instead.

Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D91697
2020-11-18 14:43:55 +01:00
Raphael Isemann ccd9091d4a [lldb][NFC] Don't let Process inherit from UserID
I noticed that Process is inheriting from UserID to store its PID value. This patch
replaces this with a dedicated field in the Process class. This is NFC, but has some
small effects on the code using Process:
* `GetID()` now returns a `lldb::pid_t` like all other process code instead of `lldb::user_id_t`. Both are typedefs for `uint64_t`, so no change in behaviour.
* The equality operators defined for UserID no longer accept Process instances.
* Removes the inherited method `Process::Clear()` which didn't actually clear anything beside the PID value.

We maybe should also remove the getters/setters to `S/GetPID` or something like that. I can update all the code for that
in a follow-up NFC commit.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D91699
2020-11-18 14:33:48 +01:00
Sam Tebbs da2e4728c7 [ARM][LowOverheadLoops] Merge VCMP and VPST across VPT blocks
This patch adds support for combining a VPST with a dangling VCMP from a
previous VPT block.

Differential Revision: https://reviews.llvm.org/D90935
2020-11-18 12:54:16 +00:00
Keishi Hattori 871fe71f29 Fix typo for hasAnyOverloadedOperatorName; NFC 2020-11-18 07:48:59 -05:00
Stephen Kelly bcaa198949 Remove unportable test
The default content of translation unit varies too much between
platforms.
2020-11-18 12:42:07 +00:00
Hafiz Abid Qadeer 8cdc538873 Add sysroot/lib to library search path of baremetal toolchain.
Baremetal toolchain is not adding sysroot/lib to the library
search path. This is forcing the user to do it manually. This commit
fixes this shortcoming by adding the sysroot/lib to library search path
if sysroot is not empty.

Reviewed By: jroelofs

Differential Revision: https://reviews.llvm.org/D91559
2020-11-18 12:38:52 +00:00
Benjamin Kramer 4dbe12e866 [SLP] Use the minimum alignment of the load bundle when forming a masked.gather
Instead of the first load. That works when vectorizing contiguous loads,
but not for gathers.

Fixes a miscompile introduced in fcad8d3635.
2020-11-18 12:53:39 +01:00
Florian Hahn 680931af27
[Matrix] Adjust matrix pointer type for inline asm arguments.
Matrix types in memory are represented as arrays, but accessed through
vector pointers, with the alignment specified on the access operation.

For inline assembly, update pointer arguments to use vector pointers.
Otherwise there will be a mis-match if the matrix is also an
input-argument which is represented as vector.

Reviewed By: nickdesaulniers

Differential Revision: https://reviews.llvm.org/D91631
2020-11-18 11:44:11 +00:00
Seonghyun Park 096bd9b293 [sanitizer] Fix typo in log messages
Fix typo in log messages

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D91492
2020-11-18 03:42:38 -08:00
David Spickett 50f12ade2d [lldb] Fix a couple of remote llgs tests
init_llgs_test no longer takes an argument
but these two were not updated.

Also fix some mistakes in TestAutoInstallMainExecutable
to get it passing again.

Reviewed By: JDevlieghere, labath

Differential Revision: https://reviews.llvm.org/D91612
2020-11-18 11:36:45 +00:00
Max Kazantsev f33118c61c [IndVars] Support different types of ExitCount when optimizing exit conds
In some cases we can handle IV and iter count of different types. It's a typical situation
after IV have been widened. This patch adds support for such cases, when legal.

Differential Revision: https://reviews.llvm.org/D88528
Reviewed By: skatkov
2020-11-18 18:20:05 +07:00