Commit Graph

407363 Commits

Author SHA1 Message Date
Simon Pilgrim 90f9855231 [X86] Update MMX opname test changes that were lost
I stupidly lost these in a temp git stash :(
2021-12-12 18:21:34 +00:00
Simon Pilgrim 41052fd699 [X86][MMX] Remove superfluous 'i' from MMX cvt opnames. NFCI.
This is a very old copy+paste typo - none of these cvt ops have an immediate operand.

Noticed while trying to merge MMX instructions into some existing SSE instruction scheduler instregex patterns.
2021-12-12 17:59:16 +00:00
Simon Pilgrim 0a08813cad [X86][MMX] Remove superfluous 'i' from MMX binop opnames. NFCI.
This is a very old copy+paste typo - none of these binops have an immediate operand.

Noticed while trying to merge MMX instructions into some existing SSE instruction scheduler instregex patterns.
2021-12-12 17:59:16 +00:00
Nico Weber 318942de22 [gn build] Port abb5dd6e99
(This reverts commit 7d9f11be81,
to reland the Ryu code: ae53d02f55 relanded in abb5dd6e99).
2021-12-12 12:39:32 -05:00
mydeveloperday 05bea533d1 [clang-format] [PR49298] Sort includes pass will sort inside raw strings
https://github.com/llvm/llvm-project/issues/48642

clang-format does not respect raw string literals when sorting includes

```
const char *RawStr = R"(
)";
```

Running clang-format over with SortIncludes enabled transforms this code to:

```
const char *RawStr = R"(
)";
```
The following code tries to minimize this impact during IncludeSorting, by treating R"( and )" as equivalent of // clang-format off/on

Reviewed By: HazardyKnusperkeks, curdeius

Differential Revision: https://reviews.llvm.org/D115168

Fixes #48642
2021-12-12 17:00:43 +00:00
Michael Kruse 77e019c233 [OpenMP] Add "not" to test dependencies.
The `not` program is used to test executions prefixed with `%libomptarget-run-fail-`. Currently `not` is not used for libomp tests, but might be used in the future and its dependency does not add any additional burden over the already established `FileCheck` dependency.

Required to add libomptarget testing to the Phabricator pre-merge check (see https://github.com/google/llvm-premerge-checks/issues/368)

Reviewed By: jdenny, JonChesterfield

Differential Revision: https://reviews.llvm.org/D115454
2021-12-12 10:52:53 -06:00
Kazu Hirata 483499670e [Target] Use llvm::reverse (NFC) 2021-12-12 08:34:24 -08:00
Simon Pilgrim c02f9791c6 [X86][AVX512] Remove xmm->xmm vpmovsx/vpmovzx rm overrides
The XMM evex cases have the same behaviour as the SSE41 versions, which already uses WriteShuffleX.Folded
2021-12-12 16:08:10 +00:00
Jacques Pienaar b743ff161b [mlir] Relax restriction on name location parsing
We currently restrict parsing of location to not allow nameloc being
nested inside nameloc. This restriction may be historical as there
doesn't seem to be a reason for it anymore (locations like this can be
constructed in C++ and they print fine). Relax this restriction in the
parser to allow this nesting.

Differential Revision: https://reviews.llvm.org/D115581
2021-12-12 08:06:59 -08:00
Jacques Pienaar efb7727a96 [mlir] Flag near misses in file splitting
Flags some potential cases where splitting isn't happening and so could result
in confusing results. Also update some test files where there were near misses
in splitting that seemed unintentional.

Differential Revision: https://reviews.llvm.org/D109636
2021-12-12 08:03:30 -08:00
Mark de Wever abb5dd6e99 Microsoft's floating-point to_chars powered by Ryu and Ryu Printf
Microsoft would like to contribute its implementation of floating-point to_chars to libc++. This uses the impossibly fast Ryu and Ryu Printf algorithms invented by Ulf Adams at Google. Upstream repos: https://github.com/microsoft/STL and https://github.com/ulfjack/ryu .

Licensing notes: MSVC's STL is available under the Apache License v2.0 with LLVM Exception, intentionally chosen to match libc++. We've used Ryu under the Boost Software License.

This patch contains minor changes from Jorg Brown at Google, to adapt the code to libc++. He verified that it works in Google's Linux-based environment, but then I applied more changes on top of his, so any compiler errors are my fault. (I haven't tried to build and test libc++ yet.) Please tell me if we need to do anything else in order to follow https://llvm.org/docs/DeveloperPolicy.html#attribution-of-changes .

Notes:

* libc++'s integer charconv is unchanged (except for a small refactoring). MSVC's integer charconv hasn't been tuned for performance yet, so you're not missing anything.
* Floating-point from_chars isn't part of this patch because Jorg found that MSVC's implementation (derived from our CRT's strtod) was slower than Abseil's. If you're unable to use Abseil or another implementation due to licensing or technical considerations, Microsoft would be delighted if you used MSVC's from_chars (and you can just take it, or ask us to provide a patch like this). Ulf is also working on a novel algorithm for from_chars.
* This assumes that float is IEEE 32-bit, double is IEEE 64-bit, and long double is also IEEE 64-bit.
* I have added MSVC's charconv tests (the whole thing: integer/floating from_chars/to_chars), but haven't adapted them to libcxx's harness at all. (These tests will be available in the microsoft/STL repo soon.)
* Jorg added int128 codepaths. These were originally present in upstream Ryu, and I removed them from microsoft/STL purely for performance reasons (MSVC doesn't support int128; Clang on Windows does, but I found that x64 intrinsics were slightly faster).
* The implementation is split into 3 headers. In MSVC's STL, charconv contains only Microsoft-written code. xcharconv_ryu.h contains code derived from Ryu (with significant modifications and additions). xcharconv_ryu_tables.h contains Ryu's large lookup tables (they were sufficiently large to make editing inconvenient, hence the separate file). The xmeow.h convention is MSVC's for internal headers; you may wish to rename them.
* You should consider separately compiling the lookup tables (see https://github.com/microsoft/STL/issues/172 ) for compiler throughput and reduced object file size.
* See https://github.com/StephanTLavavej/llvm-project/commits/charconv for fine-grained history. (If necessary, I can perform some rebase surgery to show you what Jorg changed relative to the microsoft/STL repo; currently that's all fused into the first commit.)

Differential Revision: https://reviews.llvm.org/D70631
2021-12-12 16:34:50 +01:00
Simon Pilgrim fc02ceb12a [X86][AVX512] Use WriteShuffleX for xmm->xmm extensions
The XMM evex cases have the same behaviour as the SSE41 versions, which already uses WriteShuffleX
2021-12-12 15:22:32 +00:00
Nicolas Vasilache 408553dd96 [mlir][Vector] Support 0-D vectors in `CreateMaskOp`
The 0-D case gets lowered in almost the same way that the 1-D case does
in VectorCreateMaskOpConversion. I also had to slightly update the
verifier for the op to always require exactly 1 operand in the 0-D case.

Depends On D115220

Reviewed by: ftynse

Differential revision: https://reviews.llvm.org/D115221
2021-12-12 13:32:29 +00:00
Michal Terepeta a0c930d312 [mlir][Vector] Support 0-D vectors in `CmpIOp`
Following the example of `VectorOfAnyRankOf`, I've done a few changes in the
`.td` files to help with adding the support for the 0-D case gradually.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D115220
2021-12-12 13:28:26 +00:00
Simon Pilgrim 8e833d081b [X86][AVX512] Use WriteVPMOV256 sched class for all truncations/extensions.
At the moment these are identical to WriteShuffle256 (which we were using), but it should be WriteVPMOV256 to match the AVX2 instruction, plus it will help us remove some unnecessary overrides by tweaking the WriteVPMOV256 class.

Also, as D115547 shows, we still need to split off 128-bit extensions/truncations sched classes to remove some other overrides.
2021-12-12 13:24:26 +00:00
Arjun P d7ec4d0be3 [MLIR] PresburgerSet subtraction: fix bug where the set `b` was not restored properly on return
When subtracting `b \ c`, when there are divisions in `c`, these division
constraints get added to `b`. `b` must be restored to its original state
when returning, but these added divisions constraints were not removed in
one of the return paths. This patch fixes this and deduplicates the
restoration logic by encapuslating it in a lambda `restoreState`. The patch
also includes a regression test for the bug fix.

Reviewed By: Groverkss

Differential Revision: https://reviews.llvm.org/D115577
2021-12-12 17:14:04 +05:30
Anton Korobeynikov c16ced9937 Version bump 2021-12-12 12:58:52 +03:00
Anton Korobeynikov f3c91b4f38 Try another labeler implementation 2021-12-12 12:54:29 +03:00
Anton Korobeynikov 5ccfb73756 Autolabel new issues 2021-12-12 12:46:21 +03:00
Konstantin Varlamov 805488358a [libc++][ranges] Add subsumption tests to `[special.mem.concepts]`.
Test that `nothrow-forward-iterator` subsumes `nothrow-input-iterator`,
`nothrow-forward-range` subsumes `nothrow-input-range`, and
`nothrow-sentinel-for` and `sentinel_for` subsume each other.

This is a follow-up to [D114761](https://reviews.llvm.org/D114761).

Differential Revision: https://reviews.llvm.org/D115422
2021-12-12 00:37:23 -08:00
Kazu Hirata 474e1bc96d [AST] Remove an unnecessary continue (NFC) 2021-12-11 23:04:08 -08:00
Kazu Hirata ea68ce2a9b [AST] Remove isWhitespace in favor of clang::isWhitespace (NFC) 2021-12-11 22:52:00 -08:00
Kazu Hirata 67aeae0138 [llvm] Use range-based for loops (NFC) 2021-12-11 22:34:07 -08:00
Gulfem Savrun Yeniceri e5a8af7a90 [Passes] Fix relative lookup table converter pass
This patch fixes the relative table converter pass for the lookup table
accesses that are resulted in an instruction sequence, where gep is not
immediately followed by a load, such as gep being hoisted outside the loop
or another instruction is inserted in between them. The fix inserts the
call to load.relative.instrinsic in the original place of load instead of gep.
Issue is reported by FreeBSD via https://bugs.freebsd.org/259921.

Differential Revision: https://reviews.llvm.org/D115571
2021-12-12 04:40:17 +00:00
Yitzhak Mandelbaum 93fbaa46c8 Revert "Revert "[clang][dataflow] Add framework for testing analyses.""
This reverts commit 78ff12da11 and fixes the initial cause of the revert.
2021-12-11 23:16:59 +00:00
Jacques Pienaar feeee78afc [mlir] Flip dialects to _Prefixed
Following
https://llvm.discourse.group/t/psa-ods-generated-accessors-will-change-to-have-a-get-prefix-update-you-apis/4476
these have been flipped to both for ~4 weeks, flipping to _Prefixed.

Differential Revision: https://reviews.llvm.org/D115585
2021-12-11 14:21:20 -08:00
Tue Ly 08aa40b9e6 [libc] Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.
Add ADD_FMA_FLAG macro to add -mfma flag to functions that requires it.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D115572
2021-12-11 16:21:33 -05:00
Nikita Popov 9932d4db0d [SCEV] Fix unused variable warning (NFC) 2021-12-11 21:03:54 +01:00
Kazu Hirata c2bb9637d9 Use llvm::any_of and llvm::all_of (NFC) 2021-12-11 11:54:37 -08:00
Lei Zhang 731676b10d [mlir][spirv] Fix nested control flow serialization
If we have a `spv.mlir.selection` op nested in a `spv.mlir.loop`
op, when serializing the loop's block, we might need to jump
from the selection op's merge block, which might be different
than the immediate MLIR IR predecessor block. But we still need
to get the block argument from the MLIR IR predecessor block.

Also, if the `spv.mlir.selection` is in the `spv.mlir.loop`'s
header block, we need to make sure `OpLoopMerge` is emitted
in the current block before start processing the nested selection
op. Otherwise we'll see the LoopMerge in the wrong SPIR-V
basic block.

Reviewed By: Hardcode84

Differential Revision: https://reviews.llvm.org/D115560
2021-12-11 14:47:19 -05:00
Kazu Hirata 36b8a4f9f3 [llvm] Use llvm::is_contained (NFC) 2021-12-11 11:42:09 -08:00
Kazu Hirata d395befa65 [llvm] Use range-based for loops (NFC) 2021-12-11 11:29:12 -08:00
Jacques Pienaar 1ab3efac41 [mlir][python] Add fused location 2021-12-11 10:16:13 -08:00
Matt Arsenault 6bcf1f9181 AMDGPU: Indicate pessimistic fixpoint for entry functions
There aren't going to be any callers for these, so avoid running
through the machinery to look at the callers.
2021-12-11 11:42:34 -05:00
Florian Hahn 361111906b
[EarlyCSE] Retain poison flags, if program is UB if poison.
Poison-generating flags can be retained during CSE on the earlier
instruction , *if* the earlier instruction being poison causes UB. For
now, always take AND for floating point instructions.

https://alive2.llvm.org/ce/z/4K3D7P

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D115247
2021-12-11 15:11:44 +00:00
Groverkss c6a8bec4c5 [MLIR][FlatAffineConstraints] Add support for extracting divisions with tighter bounds
This patch adds support for extracting divisions when the set contains bounds
which are tighter than the division bounds. For example:

```
     3q - i + 2 >= 0                       <-- Lower bound for 'q'
    -3q + i - 1 >= 0                       <-- Tighter upper bound for 'q'
```

Here, the actual upper bound for division for `q` would be `-3q + i >= 0`, but
since this actual upper bound is implied by a tighter upper bound, which awe can still
extract the divison.

Reviewed By: arjunp

Differential Revision: https://reviews.llvm.org/D115096
2021-12-11 16:23:54 +05:30
Anton Korobeynikov 686dca86bf Enable github issues 2021-12-11 12:13:33 +03:00
Jez Ng 098430cd25 [lld-macho][nfc] Simplify LC_DATA_IN_CODE generation
1. After D113241, we have the section address easily accessible and no
   longer need to iterate across the LC_SEGMENT commands to emit
   LC_DATA_IN_CODE.

2. There's no need to store a pointer to the data in code entries during
   the parse step; we can just look it up as part of the output step.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D115556
2021-12-11 01:01:57 -05:00
Jez Ng 40bcbe48e8 [lld-macho][nfc] InputSections don't need to track their total # of callsites
... only whether they have more than zero. This simplifies the code slightly.

I've also moved the field into the ConcatInputSection subclass since it doesn't
actually get used by the other InputSections.

Reviewed By: #lld-macho, oontvoo

Differential Revision: https://reviews.llvm.org/D115539
2021-12-11 01:01:57 -05:00
Shilei Tian cdd5fb6e19 [NFC][Clang] clang-format -i clang/lib/Sema/SemaOpenMP.cpp 2021-12-10 22:05:25 -05:00
Nico Weber 3ca6928344 Revert "[gn build] (manually) port 492de35df44"
This reverts commit 9a3df8fbc2.
492de35df4 was reverted in 30fc88bf1d.
2021-12-10 21:00:02 -05:00
Sam McCall ac431fc2cd [clangd] ... and mark a new test as -fno-ms-compatibility too 2021-12-11 02:41:39 +01:00
Med Ismail Bennani 30fc88bf1d Revert "Revert "Revert "Use `GNUInstallDirs` to support custom installation dirs. -- LLVM"""
This reverts commit 492de35df4.

I tried to apply John's changes in 8d897ec915 that were expected to
fix his patch but that didn't work unfortunately.

Reverting this again to fix the macOS bots and leave him more time to
investigate the issue.
2021-12-10 17:33:54 -08:00
Med Ismail Bennani 654aa3ad92 Revert "[llvm] Partial revert, hopefully fix LLVM module maps build"
This reverts commit 8d897ec915.

I tentativily landed John's patch in D115553 to fix the macOS bots but
it's still failing as shown here:

https://green.lab.llvm.org/green/job/lldb-cmake/39267/

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
2021-12-10 17:33:54 -08:00
Sam McCall 1a68c14b57 [clangd] Restore -fno-ms-compatibility to tests
Turns out these weren't obsolete after all...
http://45.33.8.238/win/50653/step_9.txt
2021-12-11 02:31:26 +01:00
John Ericson 8d897ec915 [llvm] Partial revert, hopefully fix LLVM module maps build
In 492de35df4 / D115544 I accidentally
added ${LLVM_INCLUDE_DIR}/ to the destination path. This broke the
"LLDB Incremental" build. Putting it back the way it was should fix it.

Differencial Revision: https://reviews.llvm.org/D115553
2021-12-10 17:17:01 -08:00
Sam McCall c25ea488a3 [clangd] Include-fixer: handle more "incomplete type" diags.
I started adding tests for all diags but found there were just too many cases.

Differential Revision: https://reviews.llvm.org/D115484
2021-12-11 01:46:35 +01:00
Kirill Stoimenov a55e51f9a6 Revert "[ASan] Replace IR based callbacks with shared assembly code callbacks."
This reverts commit db124df495.

Broke some builds:
https://lab.llvm.org/buildbot/#/builders/98/builds/9895
https://lab.llvm.org/buildbot/#/builders/91/builds/434

Reviewed By: kstoimenov

Differential Revision: https://reviews.llvm.org/D115564
2021-12-11 00:42:18 +00:00
Matt Arsenault 06b90175e7 AMDGPU: Remove fixed function ABI option 2021-12-10 19:41:19 -05:00
Jon Chesterfield 86caf517bf Revert "[amdgpu][nfc] Delete dead code in LowerModuleLDS"
This reverts commit 7b9ab06d10.
Said code is better removed as part of a larger change.
2021-12-11 00:31:51 +00:00