Commit Graph

423179 Commits

Author SHA1 Message Date
Philip Reames c7c3f58544 [riscv] Use early return to reduce nesting for InsertVSETVLI [nfc] 2022-05-06 13:10:05 -07:00
Philip Reames 99a41005fe [riscv] Add early return to InsertVSETLI fixed point step [nfc]
If the income state hasn't changed, and the step function is fixed by assumption, then the output state can't have changed.

In the current algorithm, this is a very minor win and mostly allows adding tracing output without being horrible verbose.
2022-05-06 13:08:11 -07:00
Philip Reames dee9b01d83 [riscv] Add some minimal tracing output to InsertVSETVLI
Only available with -debug.  Main purpose is simplifying an upcoming change, and providing tools for debugging problems.
2022-05-06 13:08:11 -07:00
David Green 5930691ee1 Revert "[DAGCombine] Make combineShuffleOfBitcast LittleEndian specific"
This reverts commit 891c3cf99e as it turns
out that the error was not caused by this commit, the error caming
from D124526 instead.
2022-05-06 21:03:22 +01:00
Nico Weber 68609d4641 [gn build] (semi-manually) port 7e63a0d479 2022-05-06 15:56:30 -04:00
Shivam bbd031943a
Update ReleaseNotes.rst 2022-05-07 01:20:45 +05:30
Shivam b390173408
update the doc for the static analyzer checker 2022-05-07 01:19:46 +05:30
Shivam 24e9d90e65
Added the brief discription about the new CSA checker. 2022-05-07 01:16:22 +05:30
Louis Dionne 7b04bf9d6f [runtimes] Always configure libc++abi before libc++
That makes it possible to reuse libc++abi targets from the libc++
configuration, which is necessary to allow major CMake simplifications.
As a fly-by fix, we also unify how compiler-rt ordering is handled so
it matches how libc++ and libc++abi are handled (compiler-rt always
ends up first).

Differential Revision: https://reviews.llvm.org/D120719
2022-05-06 15:44:25 -04:00
Mehdi Amini 072e0aabbc Enable the use of ThreadPoolTaskGroup in MLIR threading helper to enable nested parallelism
The LLVM ThreadPool recently got the addition of the concept of
ThreadPoolTaskGroup: this is a way to "partition" the threadpool
into a group of tasks and enable nested parallelism through this
grouping at every level of nesting.
We make use of this feature in MLIR threading abstraction to fix a long
lasting TODO and enable nested parallelism.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124902
2022-05-06 19:40:22 +00:00
Mehdi Amini c5ea8d509c Apply clang-tidy fixes for llvm-else-after-return in Merger.cpp (NFC) 2022-05-06 19:38:03 +00:00
Mehdi Amini 061f253e13 Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpenMPDialect.cpp (NFC) 2022-05-06 19:38:02 +00:00
Yitzhak Mandelbaum ec34de1bfe [clang-tidy][NFC] Fix doc typo for bugprone-unchecked-optional-access 2022-05-06 19:23:43 +00:00
Michael Jones 945fa672c6 [libc][NFC] add index mode to printf parser
This patch is a followup to the previous patch which implemented the
main printf parsing logic as well as sequential mode. This patch adds
index mode.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D123424
2022-05-06 12:06:08 -07:00
Yitzhak Mandelbaum 7e63a0d479 [clang-tidy] New check for safe usage of `std::optional` and like types.
This check verifies the safety of access to `std::optional` and related
types (including `absl::optional`). It is based on a corresponding Clang
Dataflow Analysis, which does most of the work. This check merely runs it and
converts its findings into diagnostics.

Differential Revision: https://reviews.llvm.org/D121120
2022-05-06 18:50:36 +00:00
python3kgae 3fa5eb4cfc [HLSL] add -fcgl option flag.
fcgl option will make compilation stop after clang codeGen and output the llvm ir.
It is added to check clang codeGen output for HLSL.

It will be translated into -S -emit-llvm and -disable-llvm-passes.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D124983
2022-05-06 11:42:15 -07:00
Michael Jones 270ca878d9 [libc] Update windows entrypoint list
The entrypoint list for windows hasn't been updated in a while, this
adds all of the entrypoints that are working for windows now.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D125058
2022-05-06 11:30:50 -07:00
Sam McCall c468635b7d [clangd] Speed up a slow sleeping testcase.
This testcase runs slowly due to 3.2s of sleeps = 2 + 1 + 0.2s.
After this patch it has 0.55s only.

Reduced by:
 - observed that the last test was bogus: we were sleeping until the queue was
   idle, effectively just a second copy of the first test. This avoids 1s sleep.
 - when waiting for debounce, sleep only until test passes, not for enough
   time to be safe (in practice was 2x debounce time, now 1x debounce time)
 - scaling delays down by a factor of 2 (note: factor of 10 caused bot failures)

Differential Revision: https://reviews.llvm.org/D125103
2022-05-06 20:12:17 +02:00
Kazu Hirata fffb6e6afd [AArch64] Fix sub with carry
13403a70e4 introduced a bug where we
generate the outgoing carry inverted, which in turn breaks the
lowering of @llvm.usub.sat.i128, returning the normal difference on
saturation and zero otherwise.

Note that AArch64 has peculiar semantics where the subtraction
instructions generate borrow inverted.  The problem is that we mix the
two forms of semantics -- the normal carry and inverted carry -- in
the area of extended precision subtractions.  Specifically, we have
three problems:

- lowerADDSUBCARRY takes the non-inverted incoming carry from a
  subtraction and feeds it to SBCS without inverting it first.

- lowerADDSUBCARRY makes available the outgoing carry from SBCS
  without inverting it.

- foldOverflowCheck folds:

  (SBC{S} l r (CMP (CSET LO carry) 1)) => (SBC{S} l r carry)

  When the incoming carry flag is set, CSET LO results in zero.  CMP
  in turn generates a borrow, *clearing* the carry flag.  Instead, we
  should fold:

  (SBC{S} l r (CMP 0 (CSET LO carry))) => (SBC{S} l r carry)

  When the incoming carry flag is set, CSET LO results in zero.  CMP
  does not generate a borrow, *setting* the carry flag.

IIUC, we should use the normal (that is, non-inverted) semantics for
carry everywhere.

This patch fixes the three problems above.

This patch does not add any new testcases because we have a plenty of
them covering the instruction in question.  In particular,
@u128_saturating_sub is identical to the testcase in the motivating
issue.

Fixes: #55253

Differential Revision: https://reviews.llvm.org/D124976
2022-05-06 11:04:17 -07:00
David Green 891c3cf99e [DAGCombine] Make combineShuffleOfBitcast LittleEndian specific
Something is going wrong with the BigEndian PowerPC bot. It is hard to
tell what is wrong from here, but attempt to fix it by disabling the
combineShuffleOfBitcast combine for bigendian.
2022-05-06 18:42:44 +01:00
Aart Bik 5b122a7310 [mlir][sparse] integration test for zero preserving math op
Also fixes omission in lowering math ops that require lib support

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D125104
2022-05-06 10:42:33 -07:00
Philip Reames f486119ce9 [riscv] Add strict asserts for VSETVLI insertion algorithm to help catch bugs
This assertion should hold for any reasonable data flow algorithm, but is known not to in several cases today. I'd like to go ahead and land this off-by-default, so that we can collaborate on fixes and have a common definition of success.

Differential: https://reviews.llvm.org/D125035
2022-05-06 10:28:22 -07:00
David Green dccc69a38d [AArch64] Add extra reverse costs.
This adds some extra costs for reverse shuffles under AArch64, filling
in the i16/f16/i8 gaps in the cost model.

Differential Revision: https://reviews.llvm.org/D124786
2022-05-06 18:23:36 +01:00
Florian Hahn 1d042312f8
[InstCombine] Add tests for combining AArch64 neon min/max intrinsics. 2022-05-06 17:59:23 +01:00
Louis Dionne 9fffca0444 [libc++][NFC] Fix formatting that was incorrectly changed by D124695 2022-05-06 12:58:51 -04:00
Martin Sebor cc2ce81bd8 [SimplifyLibcalls] Tests for libcall folding of subobjects [NFC]
Add tests exercising the future enancement of folding library function
calls with arguments involving subobjects such as elements of arrays
or struct members.
2022-05-06 10:43:02 -06:00
Craig Topper 2ca78d2bdf [SelectionDAG] Improve asserts in SelectionDAG::getSelect.
The VT passed in must match the type of LHS and RHS.
Previously we only checked that the vectorness matched.
2022-05-06 09:41:11 -07:00
Nathan James dd87aceb51
[clang-tidy][NFC] Add createChecks method that also checks for LangaugeOptions
This method won't add a check if it isn't supported in the Contexts current LanguageOptions.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D124320
2022-05-06 17:30:34 +01:00
Craig Topper 76f90a9d71 [SelectionDAG] Clear promoted bits before UREM on shift amount in PromoteIntRes_FunnelShift.
Otherwise we have garbage in the upper bits that can affect the
results of the UREM.

Fixes PR55296.

Differential Revision: https://reviews.llvm.org/D125076
2022-05-06 09:26:30 -07:00
Amaury Séchet 324d696c15 Automatically generates several X86/sse tests cases. NFC 2022-05-06 16:08:19 +00:00
Amaury Séchet d955010d8d Automatically generate CodeGen/X86/sse-align-*.ll test cases. NFC 2022-05-06 15:44:50 +00:00
Daniil Dudkin 2c27d5b36a [flang] Fix internal error with DATA-statement style initializers
The code below causes flang to crash with an exception.
After fixing the crash flang with an internal error "no symbol found for 'bar'"
This change fixes all the issues.

  program name
    implicit none
    integer, parameter :: bar = 1
    integer foo(bar) /bar*2/
  end program name

Reviewed By: kiranchandramohan, klausler

Differential Revision: https://reviews.llvm.org/D124914
2022-05-06 18:21:34 +03:00
Joseph Huber e12905b4d5 [OpenMP] Add basic support for properly handling static libraries
Currently we handle static libraries like any other object in the
linker wrapper. However, this does not preserve the sematnics that
dictate static libraries should be lazily loaded as the symbols are
needed. This allows us to ignore linking in architectures that are not
used by the main application being compiled. This patch adds the basic
support for detecting if a file came from a static library, and only
including it in the link job if it's used by other object files.

This patch only adds the basic support, to be more correct we should
check the symbols and only inclue the library if the link job contains
symbols that are needed. Ideally we could just put this on the linker
itself, but nvlink doesn't seem to support `.a` files.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D125092
2022-05-06 11:20:58 -04:00
Sam McCall edaeab664c Revert "[clangd] Speed up an unfortunate timer-based test."
This reverts commit 076dd0a763.

http://45.33.8.238/macm1/34776/step_9.txt
2022-05-06 17:19:00 +02:00
Louis Dionne ec3d22cd3a [libc++][NFC] Add release note for constexpr std::string 2022-05-06 11:18:07 -04:00
Nikita Popov 82190f917a [InstCombine] Fold icmp of select with implied condition
When threading the icmp over the select, check whether the
condition can be folded when taking into account the select
condition.
2022-05-06 17:13:32 +02:00
Nikita Popov a94589d52f [InstCombine] Add icmp of select with implied condition tests (NFC) 2022-05-06 17:13:32 +02:00
Sam McCall 6ed81abec2 Fix LLDB test broken by 499d0b96cb 2022-05-06 17:09:02 +02:00
Sam McCall f44552ab38 [Frontend] Fix broken createInvocation test due to bad merge 2022-05-06 17:06:13 +02:00
Louis Dionne 687ccba198 [libc++][NFC] Move swap_noexcept test to .compile.pass.cpp 2022-05-06 11:04:29 -04:00
Louis Dionne 3442ff17a5 [libc++][NFC] Slight refactoring of some std::vector tests 2022-05-06 10:56:34 -04:00
Fangrui Song b3d5bb3b30 [ELF] Change (NOLOAD) type mismatch to use SHT_NOBITS instead of SHT_PROGBITS
Placing a non-SHT_NOBITS input section in an output section specified with
(NOLOAD) is fishy but used by some projects. D118840 changed the output type to
SHT_PROGBITS, but using the specified type seems to make more sense and improve
GNU ld compatibility: `(NOLOAD)` seems to change the output section type
regardless of input.

I think we should keep the current type mismatch warning as it does indicate an
error-prone usage.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D125074
2022-05-06 07:49:42 -07:00
Simon Pilgrim c0840799e3 [MC][X86] Add vcmpps disassembler tests for Issue #41491
We were missing coverage for vcmpps imm, vreg, vreg, mreg {mreg} patterns
2022-05-06 15:39:17 +01:00
Simon Pilgrim c0bebc12f0 [DAG] visitREM - merge buildOptimizedSREM into if(). NFCI. 2022-05-06 15:39:17 +01:00
Sam McCall 4b76ba887c [clangd] Eliminate direct usage of isAvailable() matcher. NFC
This prepares to replace the implementation of EXPECT_[UN]AVAILABLE with
something more efficient.
2022-05-06 16:35:12 +02:00
Sam McCall 076dd0a763 [clangd] Speed up an unfortunate timer-based test. 2022-05-06 16:29:10 +02:00
Sam McCall d2405e1da5 Fix lifetime of DiagnosticsEngine in diagtool. 2022-05-06 16:21:49 +02:00
Sam McCall 499d0b96cb [clang] createInvocationFromCommandLine -> createInvocation, delete former. NFC
(Followup from 40c13720a4)

Differential Revision: https://reviews.llvm.org/D125012
2022-05-06 16:21:48 +02:00
PeixinQiao 2472b6869a [flang] Add one semantic check for masked array assignment
As Fortran 2018 states, in each where-assignment-stmt, the mask-expr and
the variable being defined shall be arrays of the same shape. The
previous check does not consider checking if it is an array.

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D125022
2022-05-06 22:19:20 +08:00
PeixinQiao ffc7f9d542 [flang] Support external procedure passed as actual argument with implicit character type
As Fortran 2018 15.5.2.9 point 2, the actual argument and dummy argument
have the same type and type parameters and an external function with
assumed character length may be associated with a dummy argument with
explicit character length. As Fortran 2018 15.5.2.9 point 7, if an
external procedure is used as an actual argument, it can be explicitly
declared to have the EXTERNAL attribute. This supports the external
procedure passed as actual argument with implicit character type, either
explicit character length or assumed character length.

Reviewed By: Jean Perier, klausler

Differential Revision: https://reviews.llvm.org/D124345
2022-05-06 22:14:51 +08:00