Jonas Devlieghere [Thu, 2 Dec 2021 00:58:13 +0000 (16:58 -0800)]
[lldb] Split TestCxxChar8_t
Split TestCxxChar8_t into two parts: one that check reading variables
without a process and another part with. This allows us to skip the
former on Apple Silicon, where lack of support for chained fix-ups
causes the test to fail.
Differential revision: https://reviews.llvm.org/D114819
Fabian Wolff [Thu, 2 Dec 2021 00:34:31 +0000 (01:34 +0100)]
[clang-tidy] Use `hasCanonicalType()` matcher in `bugprone-unused-raii` check
Fixes PR#52217.
Reviewed By: simon.giesecke
Differential Revision: https://reviews.llvm.org/D113429
LLVM GN Syncbot [Thu, 2 Dec 2021 00:48:10 +0000 (00:48 +0000)]
[gn build] Port
170783f991fa
Noah Shutty [Wed, 1 Dec 2021 23:46:57 +0000 (23:46 +0000)]
[llvm] [Support] Add HTTP Client Support library.
This patch implements a small HTTP client library consisting primarily of the `HTTPRequest`, `HTTPResponseHandler`, and `BufferedHTTPResponseHandler` classes. Unit tests of the `HTTPResponseHandler` and `BufferedHTTPResponseHandler` are included.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D112751
Julian Lettner [Wed, 1 Dec 2021 23:49:40 +0000 (15:49 -0800)]
[TSan][Darwin] Mark test unsupported
Arthur Eubanks [Sat, 13 Nov 2021 00:05:31 +0000 (16:05 -0800)]
[llvm-reduce] Assert that the number of chunks does not change with reductions
Followup to D113537.
Reviewed By: Meinersbur
Differential Revision: https://reviews.llvm.org/D113816
Arthur Eubanks [Fri, 12 Nov 2021 23:48:31 +0000 (15:48 -0800)]
[Cloning] Clone metadata on function declarations
Previously we missed cloning metadata on function declarations because
we don't call CloneFunctionInto() on declarations in CloneModule().
Reviewed By: dexonsmith
Differential Revision: https://reviews.llvm.org/D113812
LLVM GN Syncbot [Wed, 1 Dec 2021 23:31:02 +0000 (23:31 +0000)]
[gn build] Port
7cc2493daaf5
spupyrev [Wed, 1 Dec 2021 23:29:35 +0000 (15:29 -0800)]
profi - a flow-based profile inference algorithm: Part I (out of 3)
The benefits of sampling-based PGO crucially depends on the quality of profile
data. This diff implements a flow-based algorithm, called profi, that helps to
overcome the inaccuracies in a profile after it is collected.
Profi is an extended and significantly re-engineered classic MCMF (min-cost
max-flow) approach suggested by Levin, Newman, and Haber [2008, Complementing
missing and inaccurate profiling using a minimum cost circulation algorithm]. It
models profile inference as an optimization problem on a control-flow graph with
the objectives and constraints capturing the desired properties of profile data.
Three important challenges that are being solved by profi:
- "fixing" errors in profiles caused by sampling;
- converting basic block counts to edge frequencies (branch probabilities);
- dealing with "dangling" blocks having no samples in the profile.
The main implementation (and required docs) are in SampleProfileInference.cpp.
The worst-time complexity is quadratic in the number of blocks in a function,
O(|V|^2). However a careful engineering and extensive evaluation shows that
the running time is (slightly) super-linear. In particular, instances with
1000 blocks are solved within 0.1 second.
The algorithm has been extensively tested internally on prod workloads,
significantly improving the quality of generated profile data and providing
speedups in the range from 0% to 5%. For "smaller" benchmarks (SPEC06/17), it
generally improves the performance (with a few outliers) but extra work in
the compiler might be needed to re-tune existing optimization passes relying on
profile counts.
UPD Dec 1st 2021:
- synced the declaration and definition of the option `SampleProfileUseProfi ` to use type `cl::opt<bool`;
- added `inline` for `SampleProfileInference<BT>::findUnlikelyJumps` and `SampleProfileInference<BT>::isExit` to avoid linking problems on windows.
Reviewed By: wenlei, hoy
Differential Revision: https://reviews.llvm.org/D109860
Konstantin Boyarinov [Wed, 1 Dec 2021 23:04:17 +0000 (02:04 +0300)]
[libcxx][test][NFC] Various tests for std::vector
Add missing tests for std::vector funcionality to improve code coverage:
- Rewrote access tests to check modification of the container using
the reference returned by the non-const overload
- Added tests for reverse iterators: rbegin, rend, etc.
- Added exception test for vector::reserve
- Extended test cases for vector copy assignment
- Fixed insert_iter_value.pass.cpp to use insert overload with const
value_type& (not with value_type&& which is tested in
iter_rvalue.pass.cpp test)
Reviewed By: Quuxplusone, rarutyun, #libc
Differential Revision: https://reviews.llvm.org/D112438
Vitaly Buka [Wed, 1 Dec 2021 22:49:14 +0000 (14:49 -0800)]
[sanitizer] Implement MprotectReadOnly and MprotectNoAccess
MprotectReadOnly for Win and Fuchsia
MprotectNoAccess for Fuchsia
Nikolas Klauser [Tue, 30 Nov 2021 11:02:04 +0000 (12:02 +0100)]
[libc++] Make __wrap_iter constexpr
`__wrap_iter` is currently only constexpr if it's not a debug built, but it isn't used in a constexpr context currently. Making it always constexpr and disabling the debugging utilities at constant evaluation is more usful since it has to be always constexpr to be used in a constexpr context.
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D114733
Vitaly Buka [Wed, 1 Dec 2021 20:35:29 +0000 (12:35 -0800)]
[NFC][sanitizer] constexpr in sanitizer_dense_map_info
Kazu Hirata [Wed, 1 Dec 2021 21:43:17 +0000 (13:43 -0800)]
[mlir] Remove extractVectorTypeFromShapedValue
This patch fixes the build by removing
extractVectorTypeFromShapedValue. The last use was removed Dec 1,
2021 in commit extractVectorTypeFromShapedValue.
Peter Klausler [Wed, 1 Dec 2021 00:21:11 +0000 (16:21 -0800)]
[flang] Don't close stderr in runtime (fixes STOP output)
STOP statement output was sometimes failing to appear because
the runtime flushes and shuts down open Fortran units beforehand.
But when file descriptor 2 was closed, the STOP statement output
was suppressed. The fix is to not actually close file descriptors
0-2 if they are connected to Fortran units being closed. This was
already the policy when an OPEN statement was (re-)opening such a
unit, so that logic has been pulled out into a member function and
shared with CLOSE processing.
Differential Revision: https://reviews.llvm.org/D114897
Gabor Marton [Wed, 1 Dec 2021 15:47:22 +0000 (16:47 +0100)]
[Analyzer][solver] Simplification: Do a fixpoint iteration before the eq class merge
This reverts commit
f02c5f3478318075d1a469203900e452ba651421 and
addresses the issue mentioned in D114619 differently.
Repeating the issue here:
Currently, during symbol simplification we remove the original member
symbol from the equivalence class (`ClassMembers` trait). However, we
keep the reverse link (`ClassMap` trait), in order to be able the query
the related constraints even for the old member. This asymmetry can lead
to a problem when we merge equivalence classes:
```
ClassA: [a, b] // ClassMembers trait,
a->a, b->a // ClassMap trait, a is the representative symbol
```
Now let,s delete `a`:
```
ClassA: [b]
a->a, b->a
```
Let's merge ClassA into the trivial class `c`:
```
ClassA: [c, b]
c->c, b->c, a->a
```
Now, after the merge operation, `c` and `a` are actually in different
equivalence classes, which is inconsistent.
This issue manifests in a test case (added in D103317):
```
void recurring_symbol(int b) {
if (b * b != b)
if ((b * b) * b * b != (b * b) * b)
if (b * b == 1)
}
```
Before the simplification we have these equivalence classes:
```
trivial EQ1: [b * b != b]
trivial EQ2: [(b * b) * b * b != (b * b) * b]
```
During the simplification with `b * b == 1`, EQ1 is merged with `1 != b`
`EQ1: [b * b != b, 1 != b]` and we remove the complex symbol, so
`EQ1: [1 != b]`
Then we start to simplify the only symbol in EQ2:
`(b * b) * b * b != (b * b) * b --> 1 * b * b != 1 * b --> b * b != b`
But `b * b != b` is such a symbol that had been removed previously from
EQ1, thus we reach the above mentioned inconsistency.
This patch addresses the issue by making it impossible to synthesise a
symbol that had been simplified before. We achieve this by simplifying
the given symbol to the absolute simplest form.
Differential Revision: https://reviews.llvm.org/D114887
Florian Hahn [Wed, 1 Dec 2021 21:18:19 +0000 (21:18 +0000)]
[TLI] Add memset_pattern4, memset_pattern8 lib functions.
Similar to memset_pattern16, memset_pattern4, memset_pattern8 are
available on Darwin platforms.
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/memset_pattern4.3.html
Reviewed By: ab
Differential Revision: https://reviews.llvm.org/D114881
LLVM GN Syncbot [Wed, 1 Dec 2021 20:41:34 +0000 (20:41 +0000)]
[gn build] Port
a0efb1750065
Christopher Di Bella [Wed, 1 Dec 2021 01:36:32 +0000 (01:36 +0000)]
[libcxx][modularisation] modularises <numeric> header
Differential Revision: https://reviews.llvm.org/D114836
Petar Avramovic [Wed, 1 Dec 2021 16:39:39 +0000 (17:39 +0100)]
AMDGPU/GlobalISel: Fix constant bus restriction errors for med3
Detected on targets older then gfx10 (e.g. gfx9) for constants that are
too large to be inlined (constant are sgpr by default).
In med3 combine it is expected that regbankselect maps all operands of
min/max we try to match to vgpr. However constants are mapped to sgpr
and there will be a sgpr-to-vgpr copy. Matchers look through sgpr-to-vgpr
copies and return sgpr and these break constant bus restriction.
Build med3 with all vgpr operands. Use existing sgpr-to-vgpr copies for
matched sgprs. If there is no such copy (not expected) build one.
Differential Revision: https://reviews.llvm.org/D114700
Paul Robinson [Tue, 23 Nov 2021 18:24:29 +0000 (10:24 -0800)]
[TLI checker] Update for post-commit review comments
Ignore undefined symbols; other minor code cleanup.
Replace test objects and their asm source with a yaml equivalent.
Differential Revision: https://reviews.llvm.org/D114478
Florian Hahn [Wed, 1 Dec 2021 20:30:15 +0000 (20:30 +0000)]
[DSE] Add libcall tests for functions only available on Darwin.
Add a set of tests for memset_pattern{4,8,16} variants.
Fabian Wolff [Wed, 1 Dec 2021 20:28:01 +0000 (15:28 -0500)]
Fix false positives in `fuchsia-trailing-return` check involving deduction guides
Fixes PR#47614. Deduction guides, implicit or user-defined, look like
function declarations in the AST. They aren't really functions, though,
and they always have a trailing return type, so it doesn't make sense
to issue this warning for them.
Nikita Popov [Sat, 23 Oct 2021 15:23:56 +0000 (17:23 +0200)]
[GlobalOpt] Simplify CleanupConstantGlobalUsers()
This bases the CleanupConstantGlobalUsers() implementation around
the ConstantFoldLoadFromConst() API. The general approach is that
we discover all users while looking through casts, and then
constant fold loads and drop stores and memintrinsics.
This avoids special cases and limitations in the previous
implementation, which is also incompatible with opaque pointers.
The result is a bit more powerful than before, because we now use
more general load folding logic which can for example look through
pointer bitcasts between different sizes. This is where the test
changes come from, as we now fold more loads and can thus remove
more globals.
Differential Revision: https://reviews.llvm.org/D114889
Arthur O'Dwyer [Fri, 26 Nov 2021 19:24:36 +0000 (14:24 -0500)]
[libc++] [test] Refactor string_view comparison tests for comprehensiveness.
Differential Revision: https://reviews.llvm.org/D114658
Arthur O'Dwyer [Mon, 29 Nov 2021 19:56:00 +0000 (14:56 -0500)]
[libc++] [test] C++14/17-friendly `TEST_IS_CONSTANT_EVALUATED` macro.
Reviewed as part of D114658.
Ultimately this will probably have to be flipped around and renamed
`TEST_IS_RUNTIME`, and extended with `TEST_IS_RUNTIME_OR_CXX20` (once
constexpr std::string support is added) and so on for every new C++
version. But we don't need that flexibility yet, so we're not adding it.
Arthur O'Dwyer [Fri, 26 Nov 2021 20:17:21 +0000 (15:17 -0500)]
[libc++] [test] C++03-friendly MAKE_STRING macro.
Reviewed as part of D114658.
Konstantin Varlamov [Wed, 1 Dec 2021 19:55:46 +0000 (11:55 -0800)]
[libcxx][NFC] Make sequence containers slightly more SFINAE-friendly during CTAD.
Disable the constructors taking `(size_type, const value_type&,
allocator_type)` if `allocator_type` is not a valid allocator.
Otherwise, these constructors are considered when resolving e.g.
`(int*, int*, NotAnAllocator())`, leading to a hard error during
instantiation. A hard error makes the Standard's requirement to not
consider deduction guides of the form `(Iterator, Iterator,
BadAllocator)` during overload resolution essentially non-functional.
The previous approach was to SFINAE away `allocator_traits`. This patch
SFINAEs away the specific constructors instead, for consistency with
`basic_string` -- see [LWG3076](wg21.link/lwg3076) which describes
a very similar problem for strings (note, however, that unlike LWG3076,
no valid constructor call is affected by the bad instantiation).
Differential Revision: https://reviews.llvm.org/D114311
Ellis Hoag [Wed, 1 Dec 2021 19:46:18 +0000 (11:46 -0800)]
[InstrProf][NFC] Refactor ProfileDataMap usage
Instead of using `DenseMap::find()` and `DenseMap::insert()`, use
`DenseMap::operator[]` to get a reference to the profile data and update
the reference. This simplifies the changes in D114565.
Reviewed By: kyulee
Differential Revision: https://reviews.llvm.org/D114828
Craig Topper [Wed, 1 Dec 2021 18:46:30 +0000 (10:46 -0800)]
[RISCV] Add inline expansion for vector ftrunc/fceil/ffloor.
This prevents scalarization of fixed vector operations or crashes
on scalable vectors.
We don't have direct support for these operations. To emulate
ftrunc we can convert to the same sized integer and back to fp using
round to zero. We don't need to do a convert if the value is large
enough to have no fractional bits or is a nan.
The ceil and floor lowering would be better if we changed FRM, but
we don't model FRM correctly yet. So I've used the trunc lowering
with a conditional add or subtract with 1.0 if the truncate rounded
in the wrong direction.
There are also missed opportunities to use masked instructions.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D113543
Peter Klausler [Fri, 26 Nov 2021 21:26:50 +0000 (13:26 -0800)]
[flang] Adjust names in Semantics that imply too much (NFC)
Some kinds of Fortran arrays are declared with the same syntax,
and it is impossible to tell from a shape (:, :) or (*) whether
the object is assumed shape, deferred shape, assumed size, implied
shape, or whatever without recourse to more information about the
symbol in question. This patch softens the names of some predicate
functions (IsAssumedShape to CanBeAssumedShape) and makes others
more reflective of the syntax they represent (isAssumed to isStar)
in an attempt to encourage coders to seek and find definitive
predicate functions whose names deliver what they seem to mean.
Address TODO comments in IsSimplyContiguous() by using the
updated IsAssumedShape() predicate.
Differential Revision: https://reviews.llvm.org/D114829
Hans Wennborg [Wed, 1 Dec 2021 19:02:51 +0000 (20:02 +0100)]
Revert "[sanitizer] Add delta compression stack depot"
Broke the build on Windows, where MprotectReadOnly() isn't defined, see comment
on the code review.
> Compress by factor 4x, takes about 10ms per 8 MiB block.
>
> Depends on D114498.
>
> Reviewed By: morehouse
>
> Differential Revision: https://reviews.llvm.org/D114503
This reverts commit
1d8f2957591cad2e82d99e2e04830e0faf87707e.
Mogball [Wed, 1 Dec 2021 18:40:36 +0000 (18:40 +0000)]
[mlir][ods][nfc] fixing test cases
Paul Walker [Wed, 1 Dec 2021 18:06:11 +0000 (18:06 +0000)]
[Clang] Remove bogus "REQUIRES arm-registered-target" from SVE ACLE tests.
Many of the SVE ACLE tests have gained entries as follows:
REQUIRES: aarch64-registered-target || arm-registered-target
which can cause test failures when only arm-registered-target is
available because only aarch64-registered-target supports SVE.
Anton Korobeynikov [Wed, 1 Dec 2021 18:43:22 +0000 (21:43 +0300)]
Disable issues / pull requests via templates in preparation with migration
Sanjay Patel [Wed, 1 Dec 2021 18:39:48 +0000 (13:39 -0500)]
[Support] replace check with assert in known bits of mul calculation; NFC
Jonas Devlieghere [Wed, 1 Dec 2021 18:39:28 +0000 (10:39 -0800)]
Revert "[lldb] Temporarily skip TestTsanBasic on Darwin"
This reverts commit
92a8dc0735cfb3f296f0c487b20d8fa8474e3e40 because
66d4ce7e26a5ab00f7e4946b6e1bac8f805010fa was reverted in
09859113ed23.
Zarko Todorovski [Tue, 30 Nov 2021 18:39:56 +0000 (13:39 -0500)]
[NFC][Clang] Fix some comments in clang
Applying post commit comment suggestions from https://reviews.llvm.org/D114025
Mogball [Wed, 1 Dec 2021 18:12:37 +0000 (18:12 +0000)]
[mlir][ods][nfc] fix gcc-5 build
Simon Moll [Wed, 1 Dec 2021 17:55:28 +0000 (18:55 +0100)]
[VE][NFC] Fix use-after-free in VEInstrInfo
First call getOperand, then erase the MachineInstr. Not the other way
round.
Expected to fix test/CodeGen/VE/VELIntrinsics/lvm.ll
Detected by asan buildbot:
sanitizer-x86_64-linux-fast
(https://lab.llvm.org/buildbot/#/builders/5/builds/15384)
Kirill Stoimenov [Wed, 1 Dec 2021 01:27:22 +0000 (01:27 +0000)]
[ASan] Fixed include order.
Reviewed By: morehouse
Differential Revision: https://reviews.llvm.org/D114835
Corentin Jabot [Wed, 1 Dec 2021 17:57:39 +0000 (12:57 -0500)]
[Clang] Fix nesting of discarded and immediate contexts.
In C++23, discarded statements and if consteval statements can nest
arbitrarily. To support that, we keep track of whether the parent of
the current evaluation context is discarded or immediate.
This is done at the construction of an evaluation context
to improve performance.
Fixes https://bugs.llvm.org/show_bug.cgi?id=52231
Louis Dionne [Wed, 1 Dec 2021 17:57:30 +0000 (12:57 -0500)]
[runtimes] Move WARNING to FATAL_ERROR for folks using FOO_BUILD_32_BITS
Louis Dionne [Tue, 23 Nov 2021 21:34:09 +0000 (16:34 -0500)]
[runtimes] Remove support for GCC-style 32 bit multilib builds
This patch removes the ability to build the runtimes in the 32 bit
multilib configuration, i.e. using -m32. Instead of doing this, one
should cross-compile the runtimes for the appropriate target triple,
like we do for all other triples.
As it stands, -m32 has several issues, which all seem to be related to
the fact that it's not well supported by the operating systems that
libc++ support. The simplest path towards fixing this is to remove
support for the configuration, which is also the best course of action
if there is little interest for keeping that configuration. If there
is a desire to keep this configuration around, we'll need to do some
work to figure out the underlying issues and fix them.
Differential Revision: https://reviews.llvm.org/D114473
Reid Kleckner [Wed, 1 Dec 2021 17:27:44 +0000 (09:27 -0800)]
[AArch64] Fix unused variable warning with NDEBUG, NFC
Simon Moll [Wed, 1 Dec 2021 17:03:14 +0000 (18:03 +0100)]
[Clang][VE] Fix toolchain test when -DCLANG_DEFAULT_LINKER=lld in use
The CLANG_DEFAULT_LINKER flag overrides the default toolchain linker.
VE strictly requires 'nld' to be the default linker. This causes a test
failure in test/Driver/ve-toolchain.cpp when configured with
CLANG_DEFAULT_LINKER!=ld
Failure in clang-ppc64le-rhel
(https://lab.llvm.org/buildbot/#/builders/57/builds/12628)
Until default linker selection with CLANG_DEFAULT_LINKER!=ld is fixed
proper, we manually specify '-fuse-ld=ld' (ie the toolchain default
linker) in the ve-toolchain tests.
Omer Aviram [Wed, 1 Dec 2021 17:03:22 +0000 (12:03 -0500)]
[SelectionDAG] Add pattern to haveNoCommonBitsSet
Correctly identify the following pattern, which has no common bits: (X & ~M) op (Y & M).
Differential Revision: https://reviews.llvm.org/D113970
Dmitry Vyukov [Wed, 1 Dec 2021 16:55:14 +0000 (17:55 +0100)]
Revert "tsan: new runtime (v3)"
This reverts commit
66d4ce7e26a5ab00f7e4946b6e1bac8f805010fa.
Chromium tests started failing:
https://bugs.chromium.org/p/chromium/issues/detail?id=1275581
Mogball [Tue, 30 Nov 2021 14:09:00 +0000 (14:09 +0000)]
[mlir][ods] AttrOrTypeGen uses Class
AttrOrType def generator uses `Class` code gen helper,
instead of naked raw_ostream.
Depends on D113714 and D114807
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D113715
Mogball [Tue, 30 Nov 2021 14:08:40 +0000 (14:08 +0000)]
[llvm][stlextras] Add const methods to concat_range and enumerator
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D114807
Mark de Wever [Sat, 4 Sep 2021 11:26:58 +0000 (13:26 +0200)]
[libc++][format][1/6] Reduce binary size.
This removes the `format_args_t` from `<format>` and adjusts the type of
the `format_args` for the `vformat_to` overloads.
The `format_context` uses a `back_insert_iterator<string>` therefore the
new `output_iterator` function uses a `string` as its temporary storage
buffer. This isn't ideal. The next patches in this series will improve
this. These improvements make it easy to also improve `format_to_n` and
`formatted_size`.
This addresses P2216 `6. Binary size`.
P2216 `5. Compile-time checks` are not part of this change.
Implements parts of:
- P2216 std::format improvements
Depends on D103670
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D110494
Nicolas Vasilache [Wed, 1 Dec 2021 15:48:17 +0000 (15:48 +0000)]
[mlir][Vector] Thread 0-d vectors through vector.transfer ops
This revision adds 0-d vector support to vector.transfer ops.
In the process, numerous cleanups are applied, in particular around normalizing
and reducing the number of builders.
Reviewed By: ThomasRaoux, springerm
Differential Revision: https://reviews.llvm.org/D114803
Joseph Huber [Wed, 1 Dec 2021 14:53:41 +0000 (09:53 -0500)]
[OpenMP][FIX] SPMDzation guarding needs to account for all reaching kernels
If two reaching kernels disagree on the execution mode we cannot guard a
function right now. Ensure we do not as we otherwise will cause a
deadlock.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D114866
Simon Pilgrim [Wed, 1 Dec 2021 16:37:39 +0000 (16:37 +0000)]
[X86] combinePMULH - recognise 'cheap' trunctions via PACKS/PACKUS as well as SEXT/ZEXT
combinePMULH currently only truncates vXi32/vXi64 multiplies to PMULHW/PMULUW if the source operands are SEXT/ZEXT instructions for a 'free' truncation.
But we can generalize this to any source operand with sufficient leading sign/zero bits that would allow PACKS/PACKUS to be used as a 'cheap' truncation.
This helps us avoid the wider multiplies, in exchange for truncation on both source operands instead of the result.
Differential Revision: https://reviews.llvm.org/D113371
Simon Pilgrim [Wed, 1 Dec 2021 14:36:06 +0000 (14:36 +0000)]
[VE] Remove switch with only default case statement to fix MSVC warning. NFC.
Simon Moll [Wed, 1 Dec 2021 16:25:29 +0000 (17:25 +0100)]
[VE][NFC] Use POSIX-compatible stream redirection
Drop Bash-style stream redirect in favor of POSIX stream redirection to
fix spurious test failures on Windows.
Failure:
https://lab.llvm.org/buildbot/#/builders/123/builds/7509/steps/8/logs/stdio
Alexey Bataev [Fri, 12 Nov 2021 17:09:15 +0000 (09:09 -0800)]
[SLP]Improve cost model for the shuffled extracts.
Improved the calculation of the shuffled extracts, where possible. Need
to calculate the cost for the extracted scalars if some users are not
insertelements + improved the total estimation of the shuffled scalars
used in insertelements build vectors.
Differential Revision: https://reviews.llvm.org/D113782
Fabian Wolff [Wed, 1 Dec 2021 16:01:06 +0000 (11:01 -0500)]
[libc++] Fix `uniform_int_distribution` for 128-bit result type
Fixes https://llvm.org/PR51520. The problem is that `uniform_int_distribution`
currently uses an unsigned integer with at most 64 bits internally, which
is then casted to the desired result type. If the result type is `int64_t`,
this will produce a negative number if the most significant bit is set,
but if the result type is `__int128_t`, the value remains non-negative
and will be out of bounds for the example in PR#51520. (The reason why
it also seems to work if the upper or lower bound is changed is
because the branch at [1] will then no longer be taken, and proper
rejection sampling takes place.)
The bigger issue here is probably that `uniform_int_distribution` can be
instantiated with `__int128_t` but will silently produce incorrect results
(only the lowest 64 bits can ever be set). libstdc++ also supports `__int128_t`
as a result type, so I have simply extended the maximum width of the
internal intermediate result type.
[1]: https://github.com/llvm/llvm-project/blob/
6d28dffb6/libcxx/include/__random/uniform_int_distribution.h#L266-L267
Differential Revision: https://reviews.llvm.org/D114129
Yousuf Ali [Tue, 30 Nov 2021 18:43:14 +0000 (13:43 -0500)]
[PowerPC][AIX] Add toc-data support for 64-bit AIX small code model.
The patch expands the existing 32-bit toc-data attribute support to 64-bit.
In both 32-bit and 64-bit it is supported for small code model only.
Differential Revision: https://reviews.llvm.org/D114654
Alexey Bataev [Wed, 1 Dec 2021 12:58:18 +0000 (04:58 -0800)]
[SLP]Introduce isUndefVector function to check for undef vectors.
Undefined vector might be not only the UndefValue, but also it can be
a constant vector with undef ot poison elements, need to check for this
kind of undef too.
Differential Revision: https://reviews.llvm.org/D114873
Bradley Smith [Fri, 26 Nov 2021 12:01:22 +0000 (12:01 +0000)]
[AArch64][SVE] Duplicate FP_EXTEND/FP_TRUNC -> LOAD/STORE dag combines
By duplicating these dag combines we can bypass the legality checks that
they do, this allows us to perform these combines on larger than legal
fixed types, which in turn allows us to bring the same benefits D114580
brought but to larger than legal fixed types.
Depends on D114580
Differential Revision: https://reviews.llvm.org/D114628
Alexey Bataev [Tue, 16 Nov 2021 19:05:19 +0000 (11:05 -0800)]
[SLP]Improve vectorization of cmp instructions sequences.
Final attempt to vectorize bundles of comptatible cmp instructions after
all other instructions processing.
Metric: SLP.NumVectorInstructions
Program results results0 diff
test-suite :: MultiSource/Benchmarks/mediabench/g721/g721encode/encode.test 1.00 5.00 400.0%
test-suite :: MultiSource/Benchmarks/PAQ8p/paq8p.test 8.00 11.00 37.5%
test-suite :: MultiSource/Benchmarks/Olden/voronoi/voronoi.test 20.00 26.00 30.0%
test-suite :: External/SPEC/CINT2017rate/525.x264_r/525.x264_r.test 1344.00 1648.00 22.6%
test-suite :: External/SPEC/CINT2017speed/625.x264_s/625.x264_s.test 1344.00 1648.00 22.6%
test-suite :: MultiSource/Benchmarks/Olden/bh/bh.test 102.00 124.00 21.6%
test-suite :: MultiSource/Benchmarks/DOE-ProxyApps-C/CoMD/CoMD.test 118.00 133.00 12.7%
test-suite :: External/SPEC/CFP2017speed/638.imagick_s/638.imagick_s.test 3233.00 3554.00 9.9%
test-suite :: External/SPEC/CFP2017rate/538.imagick_r/538.imagick_r.test 3233.00 3554.00 9.9%
test-suite :: MultiSource/Benchmarks/Olden/power/power.test 64.00 70.00 9.4%
test-suite :: External/SPEC/CFP2017rate/526.blender_r/526.blender_r.test 7879.00 8604.00 9.2%
test-suite :: MultiSource/Benchmarks/Prolangs-C/simulator/simulator.test 50.00 54.00 8.0%
test-suite :: MultiSource/Applications/sqlite3/sqlite3.test 27.00 29.00 7.4%
test-suite :: External/SPEC/CFP2017rate/510.parest_r/510.parest_r.test 8345.00 8955.00 7.3%
test-suite :: MultiSource/Benchmarks/Prolangs-C/TimberWolfMC/timberwolfmc.test 694.00 738.00 6.3%
test-suite :: MultiSource/Benchmarks/MallocBench/gs/gs.test 361.00 382.00 5.8%
test-suite :: MultiSource/Benchmarks/7zip/7zip-benchmark.test 409.00 430.00 5.1%
test-suite :: External/SPEC/CINT2017speed/600.perlbench_s/600.perlbench_s.test 140.00 147.00 5.0%
test-suite :: External/SPEC/CINT2017rate/500.perlbench_r/500.perlbench_r.test 140.00 147.00 5.0%
test-suite :: External/SPEC/CFP2017rate/511.povray_r/511.povray_r.test 4013.00 4206.00 4.8%
test-suite :: MultiSource/Applications/JM/ldecod/ldecod.test 966.00 1011.00 4.7%
test-suite :: SingleSource/Benchmarks/Misc/oourafft.test 65.00 68.00 4.6%
test-suite :: MultiSource/Benchmarks/Bullet/bullet.test 4219.00 4381.00 3.8%
test-suite :: MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.test 1911.00 1973.00 3.2%
test-suite :: External/SPEC/CINT2017rate/531.deepsjeng_r/531.deepsjeng_r.test 62.00 64.00 3.2%
test-suite :: External/SPEC/CINT2017speed/631.deepsjeng_s/631.deepsjeng_s.test 62.00 64.00 3.2%
test-suite :: External/SPEC/CINT2017speed/602.gcc_s/602.gcc_s.test 852.00 877.00 2.9%
test-suite :: External/SPEC/CINT2017rate/502.gcc_r/502.gcc_r.test 852.00 877.00 2.9%
test-suite :: MultiSource/Applications/JM/lencod/lencod.test 1624.00 1668.00 2.7%
test-suite :: MultiSource/Benchmarks/McCat/18-imp/imp.test 39.00 40.00 2.6%
test-suite :: MultiSource/Benchmarks/MiBench/consumer-typeset/consumer-typeset.test 613.00 624.00 1.8%
test-suite :: MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame.test 378.00 383.00 1.3%
test-suite :: MultiSource/Benchmarks/MiBench/consumer-jpeg/consumer-jpeg.test 293.00 295.00 0.7%
test-suite :: MultiSource/Benchmarks/mediabench/jpeg/jpeg-6a/cjpeg.test 297.00 299.00 0.7%
test-suite :: External/SPEC/CINT2017rate/523.xalancbmk_r/523.xalancbmk_r.test 5522.00 5534.00 0.2%
test-suite :: External/SPEC/CINT2017speed/623.xalancbmk_s/623.xalancbmk_s.test 5522.00 5534.00 0.2%
Differential Revision: https://reviews.llvm.org/D114799
Nikita Popov [Wed, 1 Dec 2021 15:08:44 +0000 (16:08 +0100)]
[Verifier] Make matrix intrinsic verification compatible with opaque pointers
Don't check the pointer element type for opaque pointers.
Stephan Herhut [Wed, 1 Dec 2021 09:38:12 +0000 (10:38 +0100)]
[mlir][linalg] Disable tensor-matmul test under asan
The test is currently leaky. Disabling it to make the bots green.
Differential Revision: https://reviews.llvm.org/D114857
David Green [Wed, 1 Dec 2021 15:25:19 +0000 (15:25 +0000)]
Revert "[ARM] Teach getIntImmCostInst about the cost of saturating fp converts"
This reverts commit
6d41de380f223c8da02fd4d6a7f7dd1e7a404a24 as the
windows bots are not happy, in a way I do not understand. Revert whilst
we figure out what is wrong.
Florian Hahn [Wed, 1 Dec 2021 14:56:51 +0000 (14:56 +0000)]
[LV] Move code from vectorizeMemoryInstruction to recipe's execute().
The code in widenMemoryInstruction has already been transitioned
to only rely on information provided by VPWidenMemoryInstructionRecipe
directly.
Moving the code directly to VPWidenMemoryInstructionRecipe::execute
completes the transition for the recipe.
It provides the following advantages:
1. Less indirection, easier to see what's going on.
2. Removes accesses to fields of ILV.
2) in particular ensures that no dependencies on
fields in ILV for vector code generation are re-introduced.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D114324
Kiran Chandramohan [Wed, 1 Dec 2021 14:23:48 +0000 (14:23 +0000)]
Revert "[Flang] Replace notifyMatchFailure with TODO hard failures"
This reverts commit
46fd7fd7b342039b59ec534bab8b93fa5d34f6e2.
Alexey Bataev [Wed, 1 Dec 2021 14:20:35 +0000 (06:20 -0800)]
[SLP][NFC]Add a test for inserting into constant undef vector, NFC.
Florian Hahn [Wed, 1 Dec 2021 14:15:46 +0000 (14:15 +0000)]
[BasicAA] Add memset_chk libfunc tests.
Florian Hahn [Wed, 1 Dec 2021 14:15:40 +0000 (14:15 +0000)]
[BasicAA] Add strncpy libfunc tests.
Stephen Tozer [Wed, 1 Dec 2021 14:03:53 +0000 (14:03 +0000)]
[Dexter] Fix address_printing test by requiring lldb
Fixes a failure on the llvm-clang-x86_64-sie-ubuntu-fast buildbot caused
by the test requiring lldb (with the standard dexter lit config), but
not including a "Requires: lldb" clause.
Simon Moll [Wed, 1 Dec 2021 12:21:39 +0000 (13:21 +0100)]
[VE] Make VE official
Add VE to the list of official targets.
Proposal: https://lists.llvm.org/pipermail/llvm-dev/2021-November/153571.html
Reviewed By: rengolin
Differential Revision: https://reviews.llvm.org/D113247
Nico Weber [Wed, 1 Dec 2021 13:35:32 +0000 (08:35 -0500)]
[clang-cl] Set _MSVC_LANG to 202002L with /std:c++20
MSVC says this should be 202002L for /std:c++20, and of VS16.11
that's indeed the case (older versions warn that they don't
understand /std:c++20, and then cl.exe defaults to C++14 and
sets _MSVC_LANG to 201402 accordingly).
Differential Revision: https://reviews.llvm.org/D114867
Nico Weber [Wed, 1 Dec 2021 13:53:49 +0000 (08:53 -0500)]
[gn build] (manually) port
94d5f2afbef0
Manuel Klimek [Wed, 1 Dec 2021 13:37:10 +0000 (14:37 +0100)]
Fix a violated precondition in clang-format.
Make sure we do not try to change line comments that are non-regular, i.e. do
not start with "//" or "#". This can for example happen when "//" is
broken into two lines with an escaped newline.
Konstantin Boyarinov [Wed, 1 Dec 2021 13:04:59 +0000 (16:04 +0300)]
[libcxx][test][NFC] Extend get_allocator() testing for containers
Add dedicated tests for get_allocator() method for sequence, ordered and
unordered associative containers including constness coverage.
Reviewed by: ldionne, Mordante, rarutyun, #libc
Differential revision: https://reviews.llvm.org/D114785
Stephen Tozer [Wed, 1 Dec 2021 13:00:22 +0000 (13:00 +0000)]
[Dexter] Add DexDeclareAddress command and address function
This patch adds a new dexter command, DexDeclareAddress, which is used
to test the relative values of pointer variables. The motivation for
adding this command is to allow meaningful assertions to be made about
pointers that go beyond checking variable availability and null
equality.
The full explanation and syntax is in Commands.md.
Reviewed By: Orlando
Differential Revision: https://reviews.llvm.org/D111447
LLVM GN Syncbot [Wed, 1 Dec 2021 12:55:06 +0000 (12:55 +0000)]
[gn build] Port
f5f28d5b0ce7
Ties Stuij [Wed, 1 Dec 2021 12:44:09 +0000 (12:44 +0000)]
[ARM] Implement BTI placement pass for PACBTI-M
This patch implements a new MachineFunction in the ARM backend for
placing BTI instructions. It is similar to the existing AArch64
aarch64-branch-targets pass.
BTI instructions are inserted into basic blocks that:
- Have their address taken
- Are the entry block of a function, if the function has external
linkage or has its address taken
- Are mentioned in jump tables
- Are exception/cleanup landing pads
Each BTI instructions is placed in the beginning of a BB after the
so-called meta instructions (e.g. exception handler labels).
Each outlining candidate and the outlined function need to be in agreement about
whether BTI placement is enabled or not. If branch target enforcement is
disabled for a function, the outliner should not covertly enable it by emitting
a call to an outlined function, which begins with BTI.
The cost mode of the outliner is adjusted to account for the extra BTI
instructions in the outlined function.
The ARM Constant Islands pass will maintain the count of the jump tables, which
reference a block. A `BTI` instruction is removed from a block only if the
reference count reaches zero.
PAC instructions in entry blocks are replaced with PACBTI instructions (tests
for this case will be added in a later patch because the compiler currently does
not generate PAC instructions).
The ARM Constant Island pass is adjusted to handle BTI
instructions correctly.
Functions with static linkage that don't have their address taken can
still be called indirectly by linker-generated veneers and thus their
entry points need be marked with BTI or PACBTI.
The changes are tested using "LLVM IR -> assembly" tests, jump tables
also have a MIR test. Unfortunately it is not possible add MIR tests
for exception handling and computed gotos because of MIR parser
limitations.
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Mikhail Maltsev
- Momchil Velikov
- Ties Stuij
Reviewed By: ostannard
Differential Revision: https://reviews.llvm.org/D112426
Djordje Todorovic [Wed, 1 Dec 2021 12:39:26 +0000 (04:39 -0800)]
Revert "[LICM] Hoist LOAD without sinking the STORE"
This reverts commit
ecb9d8e4e3c4623c2edcd2c50727103927d31508.
I'll reland this as soon as the failing tests are fixed/updated.
Djordje Todorovic [Wed, 1 Dec 2021 12:21:10 +0000 (04:21 -0800)]
[LICM] Hoist LOAD without sinking the STORE
When doing load/store promotion within LICM, if we
cannot prove that it is safe to sink the store we won't
hoist the load, even though we can prove the load could
be dereferenced and moved outside the loop. This patch
implements the load promotion by moving it in the loop
preheader by inserting proper PHI in the loop. The store
is kept as is in the loop. By doing this, we avoid doing
the load from a memory location in each iteration.
Please consider this small example:
loop {
var = *ptr;
if (var) break;
*ptr= var + 1;
}
After this patch, it will be:
var0 = *ptr;
loop {
var1 = phi (var0, var2);
if (var1) break;
var2 = var1 + 1;
*ptr = var2;
}
This addresses some problems from [0].
[0] https://bugs.llvm.org/show_bug.cgi?id=51193
Differential revision: https://reviews.llvm.org/D113289
Stanislav Funiak [Wed, 1 Dec 2021 12:10:37 +0000 (17:40 +0530)]
Fixed a memory leak in the PDLToPDLInterp RootOrderingTest.
RootOrderingTest is a low-level unit test that creates values and uses them as vertices in a directed graph. These vertices were created using `builder.create`, but never freed, due to my insufficient understanding of the MLIR infrastructure.
Reviewed By: mehdi_amini, bondhugula, rriddle
Differential Revision: https://reviews.llvm.org/D114745
Ties Stuij [Wed, 1 Dec 2021 12:04:08 +0000 (12:04 +0000)]
[clang][ARM] removing branch protection error cmdline test
This test which was just introduced in the PACBTI-M frontend
patch (https://reviews.llvm.org/D112421) is currently failing on some
platforms. Removing temporarily.
Simon Pilgrim [Wed, 1 Dec 2021 12:03:30 +0000 (12:03 +0000)]
[X86] Add some basic fptosi/fptoui saturate vector tests
Nikita Popov [Wed, 1 Dec 2021 11:40:40 +0000 (12:40 +0100)]
[LICM] Support opaque pointers in scalar promotion
Make sure that all pointers have the same load/store access type,
rather than comparing pointer element types.
Bradley Smith [Mon, 29 Nov 2021 16:54:01 +0000 (16:54 +0000)]
[DAGCombiner] When combining REM ensure optimized div nodes are unique
The REM DAG combine uses the visitDivLike functions to try and get an
optimized DIV node to provide better codegen, however in some cases this
visitDivLike call ends up in the BuildSDIVPow2 target hook, which in
turn sometimes will return the same node passed in to indicate not to
change it. The REM DAG combine does not anticipate this and creates a
cycle in the DAG because of it.
Fix this by ensuring any such optimized div node returned is distinct
from the node being combined.
Differential Revision: https://reviews.llvm.org/D114716
Simon Pilgrim [Wed, 1 Dec 2021 11:23:47 +0000 (11:23 +0000)]
[DAG] Apply clang-format to visitMSTORE + visitMLOAD. NFC.
Reduce diff in D114582
David Green [Wed, 1 Dec 2021 11:11:09 +0000 (11:11 +0000)]
[ARM] Strengthen fpclamptosat.ll triple to attempt to fix buildbot errors. NFC
Ties Stuij [Wed, 1 Dec 2021 10:52:31 +0000 (10:52 +0000)]
[ARM] emit PACBTI-M build attributes
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Victor Campos
- Ties Stuij
Reviewed By: ostannard
Differential Revision: https://reviews.llvm.org/D112425
Manuel Klimek [Wed, 1 Dec 2021 10:56:51 +0000 (11:56 +0100)]
Fix segfault in clang-format.
Fix bug where we'd read past the end of the tokens after merging _T
macro strings.
Nikita Popov [Wed, 1 Dec 2021 10:53:17 +0000 (11:53 +0100)]
[IRBuilder] Remove deprecated methods
Remove deprecated methods that are incompatible with opaque
pointers. These have all been deprecated at some point prior to
the LLVM 13 release.
Nikita Popov [Wed, 1 Dec 2021 10:41:59 +0000 (11:41 +0100)]
[IR] Remove deprecated GetElementPtrInst constructors
Remove deprecated constructors that are incompatible with opaque
pointers. These have been deprecated since before the LLVM 13
release.
Ties Stuij [Wed, 1 Dec 2021 10:48:30 +0000 (10:48 +0000)]
[ARM] add common parts for PACBTI-M support in the backend
This patch encapsulates decision logic about when and how to generate
PAC/BTI related code. It's a part shared by PAC-RET, BTI placement,
build attribute emission, etc, so it make sense committing it
separately in order to unblock the aforementioned parts, which can
proceed concurrently.
This patch adds a few member functions to `ARMFunctionInfo`, which are currently
unused, therefore there is no testing for them at the moment. This code is
tested in follow-up PAC/BTI code gen patches.
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Momchil Velikov
- Ties Stuij
Reviewed By: danielkiss
Differential Revision: https://reviews.llvm.org/D112423
Ties Stuij [Wed, 1 Dec 2021 10:39:23 +0000 (10:39 +0000)]
[clang][ARM] emit PACBTI-M feature defines
emit __ARM_FEATURE_BTI_DEFAULT and __ARM_FEATURE_PAC_DEFAULT defines when those
features have been enabled
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Victor Campos
- Ties Stuij
Reviewed By: ostannard
Differential Revision: https://reviews.llvm.org/D112422
Nikita Popov [Wed, 1 Dec 2021 10:33:52 +0000 (11:33 +0100)]
[IR] Assert on getPointerElementType() on opaque pointer (NFC)
Previously this simply crashed.
Ties Stuij [Wed, 1 Dec 2021 10:22:19 +0000 (10:22 +0000)]
[clang][ARM] PACBTI-M frontend support
Handle branch protection option on the commandline as well as a function
attribute. One patch for both mechanisms, as they use the same underlying
parsing mechanism.
These are recorded in a set of LLVM IR module-level attributes like we do for
AArch64 PAC/BTI (see https://reviews.llvm.org/D85649):
- command-line options are "translated" to module-level LLVM IR
attributes (metadata).
- functions have PAC/BTI specific attributes iff the
__attribute__((target("branch-protection=...))) was used in the function
declaration.
- command-line option -mbranch-protection to armclang targeting Arm,
following this grammar:
branch-protection ::= "-mbranch-protection=" <protection>
protection ::= "none" | "standard" | "bti" [ "+" <pac-ret-clause> ]
| <pac-ret-clause> [ "+" "bti"]
pac-ret-clause ::= "pac-ret" [ "+" <pac-ret-option> ]
pac-ret-option ::= "leaf" ["+" "b-key"] | "b-key" ["+" "leaf"]
b-key is simply a placeholder to make it consistent with AArch64's
version. In Arm, however, it triggers a warning informing that b-key is
unsupported and a-key will be selected instead.
- Handle _attribute_((target(("branch-protection=..."))) for AArch32 with the
same grammer as the commandline options.
This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension
The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:
https://developer.arm.com/documentation/ddi0553/latest
The following people contributed to this patch:
- Momchil Velikov
- Victor Campos
- Ties Stuij
Reviewed By: vhscampos
Differential Revision: https://reviews.llvm.org/D112421
David Green [Wed, 1 Dec 2021 10:25:52 +0000 (10:25 +0000)]
[ARM] Teach getIntImmCostInst about the cost of saturating fp converts
Given a min(max(fptosi, INT_MIN), INT_MAX) with the correct constants,
we can now generate a fptosi.sat. But in the arm backend, the constant
can be treated as high cost, pulling it out of the basic block in a way
that the DAG combine can no longer see it. This teaches it again that it
is a low cost constant, not worth hoisting out.
Differential Revision: https://reviews.llvm.org/D114380
Manuel Klimek [Wed, 1 Dec 2021 10:19:19 +0000 (11:19 +0100)]
Fix clang-format bug when handling conflict markers.
Previously, clang-format would not correctly identify preprocessor
directives directly following a conflict marker, which would result in
violating the formatter's invariants.
The provided test fails in assert mode before this change.
Jeroen Dobbelaere [Wed, 1 Dec 2021 10:18:30 +0000 (11:18 +0100)]
Revert "[Sema] check PseudoObject when rebuilding CXXOperatorCallExpr in template instantiation"
This reverts commit
0c047a8e13320fb8e9dabbf7a3c6a00fe81198c7.
A number of buildbots started failing. Reverting for now.
Florian Hahn [Wed, 1 Dec 2021 10:06:20 +0000 (10:06 +0000)]
[BuildLibCalls] Add argmemonly, writeonly, nounwind to memset_chk.
The memset_chk library function should match memset's attributes with
respect of memory effects (argmemonly, writeonly). It also does not
raise exceptions. It may not return, in case it aborts the program.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D114793