David Sherwood [Fri, 10 Jun 2022 12:41:53 +0000 (13:41 +0100)]
[NFC][InstCombine] Refactor InstCombinerImpl::foldSelectIntoOp
Introduce a lambda function so that we remove a lot of code
duplication.
Differential Revision: https://reviews.llvm.org/D127493
zhongyunde [Mon, 13 Jun 2022 09:24:59 +0000 (17:24 +0800)]
[MachineScheduler] Order more stores by ascending address
According D125377, we order STP Q's by ascending address. While on some
targets, paired 128 bit loads and stores are slow, so the STP will split
into STRQ and STUR, so I hope these stores will also be ordered.
Also add subtarget feature ascend-store-address to control the aggressive order.
Reviewed By: dmgreen, fhahn
Differential Revision: https://reviews.llvm.org/D126700
Lucas Prates [Fri, 6 May 2022 09:31:11 +0000 (10:31 +0100)]
[ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records
Currently the a AAPCS compliant frame record is not always created for
functions when it should. Although a consistent frame record might not
be required in some cases, there are still scenarios where applications
may want to make use of the call hierarchy made available trough it.
In order to enable the use of AAPCS compliant frame records whilst keep
backwards compatibility, this patch introduces a new command-line option
(`-mframe-chain=[none|aapcs|aapcs+leaf]`) for Aarch32 and Thumb backends.
The option allows users to explicitly select when to use it, and is also
useful to ensure the extra overhead introduced by the frame records is
only introduced when necessary, in particular for Thumb targets.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D125094
Lucas Prates [Mon, 23 May 2022 15:40:38 +0000 (16:40 +0100)]
[NFC][Thumb1] Use FrameDestroy flag to identify epilog instructions
Simiarly to what's done on both ARM's and AArch64's frame lowering code,
this updates Thumb1FrameLowering to use the FrameDestroy Machine
Instruction flag to identify instructions inserted as part of the epilog
instead of relying on assumptions about specific machine instructions.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D126285
Adrian Kuegel [Mon, 13 Jun 2022 08:48:17 +0000 (10:48 +0200)]
[mlir] Fix ClangTidyPerformance finding (NFC).
Nikita Popov [Fri, 10 Jun 2022 14:17:19 +0000 (16:17 +0200)]
[InstCombine] Don't push operation across loop phi
When pushing an operation across a phi node, we should avoid doing
so across a loop backedge. This is generally non-profitable, because
it does not reduce the number of times the operation is executed,
and could lead to an infinite combine loop.
The code was already guarding against this, but using an
insufficiently strong condition, which did not cover the case where
the operation was originally outside the loop (in which case the
transform moves the operation from outside the loop into the loop,
which is particularly undesirable).
Differential Revision: https://reviews.llvm.org/D127499
Nikita Popov [Fri, 10 Jun 2022 15:18:33 +0000 (17:18 +0200)]
[InstSimplify] Update GEP test to use opaque pointers (NFC)
With opaque pointers, we end up merging these GEPs and dropping
the inrange attribute (in the last two cases). This did not happen
previously, because typed pointers use less powerful GEP folding logic.
I'm a bit unsure whether this is something we need to be concerned
about or not. I believe that generally our stance is that we should
perform folds even if this requires losing poison-generating flags
like inrange.
We can either a) accept this as-is, b) try to inhibit folding if it
requires dropping inrange or c) try to fold to poison if we know
that inrange is going to be violated.
For now, we accept it as-is.
Differential Revision: https://reviews.llvm.org/D127503
David Green [Mon, 13 Jun 2022 08:24:15 +0000 (09:24 +0100)]
[AArch64] Mark smull and umull as commutative.
Nuno Lopes [Mon, 13 Jun 2022 07:59:07 +0000 (08:59 +0100)]
[NFC] Remove straight UB from SROA tests
Including 'br undef', store/load to undef pointers.
Plus some cosmetics: select undef, insertvalue undef -> poison.
Recommit c1b6103 with fix.
Guillaume Chatelet [Mon, 13 Jun 2022 07:50:35 +0000 (07:50 +0000)]
[NFC][polly] Removed dead code
Maksim Panchenko [Tue, 31 May 2022 21:50:19 +0000 (14:50 -0700)]
[X86][Disassembler] Fix displacement operand size for symbolizer
On 64-bit X86, 0x66 operand-size override prefix will change the size of
the instruction operand, e.g. from 32 bits to 16 bits, but it will not
modify the size of the displacement operand used for memory addressing,
which will always be 32 bits.
Reviewed By: skan, rafauler
Differential Revision: https://reviews.llvm.org/D126726
owenca [Sat, 11 Jun 2022 20:06:58 +0000 (13:06 -0700)]
[clang-format] Handle deprecated options in dump_format_style.py
Also add two deprecated options as comments back to Format.h.
Fangrui Song [Mon, 13 Jun 2022 04:15:06 +0000 (21:15 -0700)]
[ELF] Change getRISCVPCRelHi20 error to conventional errorOrWarn
Craig Topper [Mon, 13 Jun 2022 03:34:14 +0000 (20:34 -0700)]
[RISCV] Use isShiftedInt to improve readability. NFC
Kazushi (Jam) Marukawa [Mon, 13 Jun 2022 03:32:25 +0000 (12:32 +0900)]
Revert "[NFC] Remove 'br i1 undef' from SROA tests"
Transforms/SROA/vector-promotion-different-size.ll causes errors.
This reverts commit
c1b610307df22d12687bde26919e45752c33ab0b.
Kazu Hirata [Mon, 13 Jun 2022 01:52:02 +0000 (18:52 -0700)]
[AArch64] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
Kazu Hirata [Mon, 13 Jun 2022 01:46:25 +0000 (18:46 -0700)]
[Support] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
Kazu Hirata [Mon, 13 Jun 2022 01:39:05 +0000 (18:39 -0700)]
[Transforms] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
Kazu Hirata [Mon, 13 Jun 2022 01:30:45 +0000 (18:30 -0700)]
[X86] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
Petr Hosek [Mon, 28 Mar 2022 21:12:23 +0000 (14:12 -0700)]
[CMake][libcxx] Use target_include_directories for libc++ headers
This is the idiomatic way to handle include directories in CMake.
Differential Revision: https://reviews.llvm.org/D122614
Jez Ng [Sun, 12 Jun 2022 21:26:08 +0000 (17:26 -0400)]
[lld-macho] Make `--icf=safe` work with LTO
Just matter of enabling the config option.
(Also changed the platform of the input test file to macOS, since that's
the default that we specify in the `%lld` substitution. The conflict was
causing errors when linking with LTO.)
Reviewed By: #lld-macho, thakis
Differential Revision: https://reviews.llvm.org/D127600
Jez Ng [Sun, 12 Jun 2022 21:15:56 +0000 (17:15 -0400)]
[MC][re-land] Omit DWARF unwind info if compact unwind is present where eligible
This reverts commit
d941d597837d9e1405086f008c9bd6a71e7263c9.
Differential Revision: https://reviews.llvm.org/D122258
Hubert Tong [Sun, 12 Jun 2022 20:31:55 +0000 (16:31 -0400)]
[NFC] Remove unused variable `MF`
https://reviews.llvm.org/D127583 removed the only use of this variable
and broke builds with warnings-as-errors.
Nikolas Klauser [Sat, 11 Jun 2022 21:43:00 +0000 (23:43 +0200)]
[libc++] Use unsigned char in basic_string::__short again
D125496 changed the string layout on windows. Change `__is_long_` and `__size_` back to using `unsigned char` to fix the issue.
Reviewed By: Mordante, #libc
Spies: jloser, libcxx-commits, ayzhao
Differential Revision: https://reviews.llvm.org/D127566
Nuno Lopes [Sun, 12 Jun 2022 18:29:00 +0000 (19:29 +0100)]
fix test expected output (fixes arm buildbot failure) [NFC]
Simon Pilgrim [Sun, 12 Jun 2022 17:56:24 +0000 (18:56 +0100)]
[DAG] Enable ISD::FSHL/R SimplifyMultipleUseDemandedBits handling inside SimplifyDemandedBits
This patch allows SimplifyDemandedBits to call SimplifyMultipleUseDemandedBits in cases where the source operand has other uses, enabling us to peek through the shifted value if we don't demand all the bits/elts.
This helps with several of the regressions from D125836
Nuno Lopes [Sun, 12 Jun 2022 18:03:47 +0000 (19:03 +0100)]
[clang][CodeGen] Switch a few placeholders from UndefValue to PoisonValue
This change is cosmetic, as these are dummy values that are not observable, but it
gets us closer to removing undef.
NFC
Craig Topper [Sun, 12 Jun 2022 17:38:29 +0000 (10:38 -0700)]
[RISCV] Move some methods out of RISCVInstrInfo and into RISCV namespace.
These methods don't access any state from RISCVInstrInfo. Make them
free functions in the RISCV namespace.
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D127583
Kazu Hirata [Sun, 12 Jun 2022 17:47:06 +0000 (10:47 -0700)]
[IR] Call DenseMap::erase directly (NFC)
We can erase an item in DenseMap without checking its membership first.
Kazu Hirata [Sun, 12 Jun 2022 17:17:12 +0000 (10:17 -0700)]
[clang] Use any_of and none_of (NFC)
Florian Hahn [Sun, 12 Jun 2022 17:03:26 +0000 (18:03 +0100)]
[SimplifyCFG,EarlyCSE] Update 2 tests to not branch on undef (NFC).
Florian Hahn [Sun, 12 Jun 2022 15:57:47 +0000 (16:57 +0100)]
[LV] Update test to use GEP so it is not dead.
The test should use the GEP for the store, so it is not dead.
Mehdi Amini [Sun, 12 Jun 2022 15:14:37 +0000 (15:14 +0000)]
Revert "[X86][RFC] Enable `_Float16` type support on X86 following the psABI"
This reverts commit
2d2da259c8726fd5c974c01122a9689981a12196.
This breaks MLIR integration test (JIT crashing), reverting in the
meantime.
Jez Ng [Sun, 12 Jun 2022 14:46:49 +0000 (10:46 -0400)]
Revert "[MC] Omit DWARF unwind info if compact unwind is present where eligible"
This reverts commit
ef501bf85d8c869248e51371f0e74bcec0e7b229.
Simon Pilgrim [Sun, 12 Jun 2022 14:40:24 +0000 (15:40 +0100)]
[X86] combineConcatVectorOps - add support for concatenation of VSELECT/BLENDV nodes (REAPPLIED)
If the LHS/RHS selection operands can be cheaply concatenated back together then replace 2 x 128-bit selection nodes with 1 x 256-bit node
Addresses the regression introduced in the bug fix from rGd5af6a38082b39ae520a328e44dc29ebcb036bb2
REAPPLIED with for bug identified in rGea8fb3b60196
Simon Pilgrim [Sun, 12 Jun 2022 14:27:11 +0000 (15:27 +0100)]
[X86] Add regression test for rGea8fb3b60196
Reduced from test case reported by @srj for the concatenation of VSELECT/BLENDV nodes
Nuno Lopes [Sun, 12 Jun 2022 14:29:59 +0000 (15:29 +0100)]
[NFC] Remove 'br i1 undef' from SROA tests
Ulrich Weigand [Sun, 12 Jun 2022 14:03:30 +0000 (16:03 +0200)]
Fix endian conversion of sub-byte types
When convertEndianOfCharForBEmachine is called with elementBitWidth
smaller than CHAR_BIT, the default case is invoked, but this does
nothing at all and leaves the output array unchanged.
Fix DenseIntOrFPElementsAttr::convertEndianOfArrayRefForBEmachine
by not calling convertEndianOfCharForBEmachine in this case, and
instead simply copying the input to the output (for sub-byte types,
endian conversion is in fact a no-op).
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D125676
Jez Ng [Sun, 12 Jun 2022 14:03:56 +0000 (10:03 -0400)]
[MC] Omit DWARF unwind info if compact unwind is present where eligible
Previously, omitting unnecessary DWARF unwinds was only done in two
cases:
* For Darwin + aarch64, if no DWARF unwind info is needed for all the
functions in a TU, then the `__eh_frame` section would be omitted
entirely. If any one function needed DWARF unwind, then MC would emit
DWARF unwind entries for all the functions in the TU.
* For watchOS, MC would omit DWARF unwind on a per-function basis, as
long as compact unwind was available for that function.
This diff makes it so that we omit DWARF unwind on a per-function basis
for Darwin + aarch64 as well. In addition, we introduce the flag
`--emit-dwarf-unwind=` which can toggle between `always`,
`no-compact-unwind` (only emit DWARF when CU cannot be emitted for a
given function), and the target platform `default`. `no-compact-unwind`
is particularly useful for newer x86_64 platforms: we don't want to omit
DWARF unwind for x86_64 in general due to possible backwards compat
issues, but we should make it possible for people to opt into this
behavior if they are only targeting newer platforms.
**Motivation:** I'm working on adding support for `__eh_frame` to LLD,
but I'm concerned that we would suffer a perf hit. Processing compact
unwind is already expensive, and that's a simpler format than EH frames.
Given that MC currently produces one EH frame entry for every compact
unwind entry, I don't think processing them will be cheap. I tried to do
something clever on LLD's end to drop the unnecessary EH frames at parse
time, but this made the code significantly more complex. So I'm looking
at fixing this at the MC level instead.
**Addendum:** It turns out that there was a latent bug in the X86
backend when `OmitDwarfIfHaveCompactUnwind` is naively enabled, which is
not too surprising given that this combination has not been heretofore
used.
For functions that have unwind info that cannot be encoded with CU, MC
would end up dropping both the compact unwind entry (OK; existing
behavior) as well as the DWARF entries (not OK). This diff fixes things
so that we emit the DWARF entry, as well as a CU entry with encoding
`UNWIND_X86_MODE_DWARF` -- this basically tells the unwinder to look for
the DWARF entry. I'm not 100% sure the `UNWIND_X86_MODE_DWARF` CU entry
is necessary, this was the simplest fix. ld64 seems to be able to handle
both the absence and presence of this CU entry. Ultimately ld64 (and
LLD) will synthesize `UNWIND_X86_MODE_DWARF` if it is absent, so there
is no impact to the final binary size.
Reviewed By: davide, lhames
Differential Revision: https://reviews.llvm.org/D122258
Yuki Okushi [Sat, 28 May 2022 16:59:56 +0000 (01:59 +0900)]
[docs][clang] Fix a broken link on the APINotes doc
This patch replaces a link with a GitHub one.
Fixes llvm#55748
Differential Revision: https://reviews.llvm.org/D126599
Simon Pilgrim [Sun, 12 Jun 2022 13:02:23 +0000 (14:02 +0100)]
[DAG] visitSRL - pull out ShiftVT. NFC.
David Green [Sun, 12 Jun 2022 09:59:09 +0000 (10:59 +0100)]
[AArch64] Look through bitcast when looking for extract_high subvector
Since D61806, DAGCombiner has folded subvector_extract(bitcast(..)) to
bitcast(subvector_extract(..)), which would place a bitcast between a
subvector_extract and the operation that could be converted to a high
neon instruction (like smull2). This adds better matching for the
subvector_extract, through the tablegen extract_high PatFrags to
optionally skip the bitcast under little ending, still matchings an
extract of the high half of the input vector.
I didn't update the extract_high of a duplicate patterns, as the
ComplexPattern need names operands. I did add a extract_high_dup_v8i16
PatFrag to abstract away the common code, which can be extended in a
future patch.
Differential Revision: https://reviews.llvm.org/D126782
Phoebe Wang [Sat, 11 Jun 2022 15:19:25 +0000 (23:19 +0800)]
[X86][RFC] Enable `_Float16` type support on X86 following the psABI
GCC and Clang/LLVM will support `_Float16` on X86 in C/C++, following
the latest X86 psABI. (https://gitlab.com/x86-psABIs)
_Float16 arithmetic will be performed using native half-precision. If
native arithmetic instructions are not available, it will be performed
at a higher precision (currently always float) and then truncated down
to _Float16 immediately after each single arithmetic operation.
Reviewed By: LuoYuanke
Differential Revision: https://reviews.llvm.org/D107082
Alex Brachet [Sun, 12 Jun 2022 03:01:08 +0000 (03:01 +0000)]
Revert "[lit] Passthrough CLANG_MODULE_CACHE_PATH env var"
This reverts commit
6466c9abf3674bade1f6ee859f24ebc7aaf9cd88.
Weining Lu [Sun, 12 Jun 2022 02:41:56 +0000 (10:41 +0800)]
[LoongArch] clang-format some code in LoongArchISelLowering.cpp. NFC
Weining Lu [Sun, 12 Jun 2022 02:03:04 +0000 (10:03 +0800)]
[LoongArch] Remove unnecessary `static` keyword as `const` has internal linkage. NFC
See https://reviews.llvm.org/D127199#inline-1222815
Amaury Séchet [Sun, 12 Jun 2022 01:54:10 +0000 (01:54 +0000)]
Autogenerate sve-fixed-length-frame-offests-crash.ll . NFC
Amaury Séchet [Sun, 12 Jun 2022 01:50:41 +0000 (01:50 +0000)]
Autogenerate sve-fixed-length-bitselect.ll . NFC
Kazushi (Jam) Marukawa [Sun, 12 Jun 2022 01:26:55 +0000 (10:26 +0900)]
[Clang][VE][NFC] Fix a comment
Keith Smiley [Sat, 11 Jun 2022 07:10:48 +0000 (00:10 -0700)]
[lld-macho] Add support for -w
This flag suppresses warnings produced by the linker. In ld64 this has
an interesting interaction with -fatal_warnings, it silences the
warnings but the link still fails. Instead of doing that here we still
print the warning and eagerly fail the link in case both are passed,
this seems more reasonable so users can understand why the link fails.
Differential Revision: https://reviews.llvm.org/D127564
Joe Loser [Sun, 12 Jun 2022 00:11:04 +0000 (18:11 -0600)]
[libc++][test] Add tuple trivial destructor test
There is only compile-time tests in `dtor.pass.cpp`, so it could be made a
`dtor.compile.pass.cpp`. Instead, add a runtime test for testing the trivial
destructor behavior for `tuple`.
Differential Revision: https://reviews.llvm.org/D109298
Nico Weber [Sat, 11 Jun 2022 22:55:40 +0000 (18:55 -0400)]
fix comment typo to cycle bots
Florian Hahn [Sat, 11 Jun 2022 22:33:04 +0000 (23:33 +0100)]
[VPlan] Remove dead OrigLoop argument from removeDeadRecipes (NFC).
The use of the argument has been remove a while ago. Remove the dead
argument.
Florian Hahn [Sat, 11 Jun 2022 22:22:48 +0000 (23:22 +0100)]
[InstCombine] Remove unnecessary UB from some tests.
Alex Brachet [Sat, 11 Jun 2022 21:04:02 +0000 (21:04 +0000)]
[lit] Passthrough CLANG_MODULE_CACHE_PATH env var
This environment variable can be set to control module
caching. It disables caching by setting the variable
empty. As such, it needs to be handled differently
from other environment variables here which are
assumed to not be empty.
Simon Pilgrim [Sat, 11 Jun 2022 20:06:37 +0000 (21:06 +0100)]
[DAG] visitVECTOR_SHUFFLE - fold splat(insert_vector_elt()) and splat(scalar_to_vector()) to build_vector splats
Addresses a number of regressions identified in D127115
Joe Loser [Sun, 29 May 2022 01:08:25 +0000 (19:08 -0600)]
[libc++][test] Refactor SmallBasicString uses in range.lazy.split tests
The tests for `std::ranges::lazy_split_view` heavily use a wrapper class around
`std::string` because `std::string` was not `constexpr` until recently. Where
possible, remove the wrapper class and extra functionality no longer needed.
Remove `libcxx/test/std/ranges/range.adaptors/range.lazy.split/small_string.h`
and inline its one use remaining in
`libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp`.
Differential Revision: https://reviews.llvm.org/D126663
Dmitri Gribenko [Fri, 10 Jun 2022 23:43:27 +0000 (01:43 +0200)]
[clang-tidy][docs] Remove an unintentional paragraph break
Dmitri Gribenko [Fri, 10 Jun 2022 23:41:10 +0000 (01:41 +0200)]
[clang-tidy][docs] Use std::optional instead of absl::optional in examples
The standard type is vastly more popular than the Abseil polyfill, so it
makes more sense to use it in documentation, even though the checker
actually understands both (and that fact is documented already).
Amir Ayupov [Sat, 11 Jun 2022 18:58:10 +0000 (11:58 -0700)]
[BOLT][NFC] Move printDebugInfo out of BC::printInstruction
Simplify `BinaryContext::printInstruction`.
Reviewed By: ayermolo
Differential Revision: https://reviews.llvm.org/D127561
Kazu Hirata [Sat, 11 Jun 2022 18:46:16 +0000 (11:46 -0700)]
[llvm] Use contains (NFC)
Simon Pilgrim [Sat, 11 Jun 2022 18:29:56 +0000 (19:29 +0100)]
[X86][AVX512] Retain pmuldq broadcast loads on 32-bit targets
Don't demand just the lower 32-bits on 32-bit AVX512 targets to preserve 64-bit broadcast loads patterns
Simon Pilgrim [Sat, 11 Jun 2022 17:48:26 +0000 (18:48 +0100)]
[X86][AVX512] Add tests showing failure to retain pmuldq broadcast loads on 32-bit targets
Noticed while investigating the build vector issues on D127115
Simon Pilgrim [Sat, 11 Jun 2022 14:54:54 +0000 (15:54 +0100)]
[DAG] visitINSERT_VECTOR_ELT - add <1 x ???> insert_vector_elt(v0,extract_vector_elt(v1,0),0) special case handling
Check if we're just replacing one v1x?? vector with another
Kazu Hirata [Sat, 11 Jun 2022 18:24:57 +0000 (11:24 -0700)]
Use getValueOr (NFC)
Kazu Hirata [Sat, 11 Jun 2022 18:15:52 +0000 (11:15 -0700)]
Use isa instead of dyn_cast (NFC)
Dave Lee [Thu, 9 Jun 2022 15:37:02 +0000 (08:37 -0700)]
[lldb][bindings] Implement __repr__ instead of __str__
When using the `script` Python repl, SB objects are printed in a way that gives
the user no information. The simplest example is:
```
(lldb) script lldb.debugger
<lldb.SBDebugger; proxy of <Swig Object of type 'lldb::SBDebugger *' at 0x1097a5de0> >
```
This output comes from the Python repl printing the `repr()` of an object.
None of the SB classes implement `__repr__`, and all print like the above.
However, many (most?, all?) SB classes implement `__str__`. Because they
implement `__str__`, a more detailed output can be had by `print`ing the
object, for example:
```
(lldb) script print(lldb.debugger)
Debugger (instance: "debugger_1", id: 1)
```
For convenience, this change switches all SB classes that implement to
`__str__` to instead implement `__repr__`. **The result is that `str()` and
`repr()` will produce the same output**. This is because `str` calls `__repr__`
for classes that have no `__str__` method.
The benefit being that when writing a `script` invocation, you don't need to
remember to wrap in `print()`. If that isn't enough motivation, consider the
case where your Python expression results in a list of SB objects, in that case
you'd have to `map` or use a list comprehension like `[str(x) for x in <expr>]`
in order to see the details of the objects in the list.
For reference, the docs for `repr` say:
> repr(object)
> Return a string containing a printable representation of an object. For
> many types, this function makes an attempt to return a string that would
> yield an object with the same value when passed to eval(); otherwise, the
> representation is a string enclosed in angle brackets that contains the
> name of the type of the object together with additional information often
> including the name and address of the object. A class can control what this
> function returns for its instances by defining a __repr__() method.
and the docs for `__repr__` say:
> object.__repr__(self)
> Called by the repr() built-in function to compute the “official” string
> representation of an object. If at all possible, this should look like a
> valid Python expression that could be used to recreate an object with the
> same value (given an appropriate environment). If this is not possible, a
> string of the form <...some useful description...> should be returned. The
> return value must be a string object. If a class defines __repr__() but not
> __str__(), then __repr__() is also used when an “informal” string
> representation of instances of that class is required.
>
> This is typically used for debugging, so it is important that the
> representation is information-rich and unambiguous.
Even if it were convenient to construct Python expressions for SB classes so
that they could be `eval`'d, however for typical lldb usage, I can't think of a
motivating reason to do so. As it stands, the only action the docs say to do,
that this change doesn't do, is wrap the `repr` string in `<>` angle brackets.
An alternative implementation is to change lldb's python repl to apply `str()`
to the top level result. While this would work well in the case of a single SB
object, it doesn't work for a list of SB objects, since `str([x])` uses `repr`
to convert each list element to a string.
Differential Revision: https://reviews.llvm.org/D127458
Chia-hung Duan [Sat, 11 Jun 2022 15:56:21 +0000 (15:56 +0000)]
[mlir:MultiOpDriver] Add operands to worklist should be checked
Operand's defining op may not be valid for adding to the worklist under
stict mode
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D127180
Craig Topper [Sat, 11 Jun 2022 15:28:41 +0000 (08:28 -0700)]
[X86] Add __extension__ to f16c macro intrinsics to suppress warnings about compound literals
This had previously been fixed, but was lost 4 years ago when __extension__
was removed from many intrinsic macros.
Refixes PR32491.
ksyx [Sat, 11 Jun 2022 14:59:51 +0000 (10:59 -0400)]
[Clang][Doc][SafeStack] Fix deadlink (NFC)
Simon Pilgrim [Sat, 11 Jun 2022 14:29:18 +0000 (15:29 +0100)]
[DAG] visitINSERT_VECTOR_ELT - fold insert_vector_elt(scalar_to_vector(x),v,i) -> build_vector()
Allow scalar_to_vector nodes to be used for the start of a build_vector creation
Nikolas Klauser [Sat, 11 Jun 2022 14:20:47 +0000 (16:20 +0200)]
[libc++][NFC] Update ranges algorithms status page
Simon Pilgrim [Sat, 11 Jun 2022 14:12:45 +0000 (15:12 +0100)]
[PowerPC] Regenerate pre-inc-disable.ll checks
Simon Pilgrim [Sat, 11 Jun 2022 13:30:27 +0000 (14:30 +0100)]
[X86] Replace X32 check prefix with X86
We try to use X32 only for gnux32 triple cases
Mark de Wever [Sat, 2 Oct 2021 10:38:46 +0000 (12:38 +0200)]
[libc++][format] Implement format-string.
Implements the compile-time checking of the formatting arguments.
Completes:
- P2216 std::format improvements
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D121530
David Green [Sat, 11 Jun 2022 13:16:37 +0000 (14:16 +0100)]
[AArch64] Generate FADDP from shuffled fadd
As a follow up to D126686, this does the same fold for floating point
add and shuffle. In this case it is limited to reassoc either x[0]+x[1]
or x[1]+x[0] for both result[0] and results[1].
Differential Revision: https://reviews.llvm.org/D127087
David Green [Sat, 11 Jun 2022 11:57:48 +0000 (12:57 +0100)]
[AArch64] Add extra faddp codegen tests. NFC
Simon Pilgrim [Sat, 11 Jun 2022 11:01:13 +0000 (12:01 +0100)]
[DAG] visitINSERT_VECTOR_ELT - refactor BUILD_VECTOR insertion to remove early-out. NFCI.
Remove the early-out cases so we can more easily add additional folds in the future.
Paul Walker [Mon, 6 Jun 2022 03:07:52 +0000 (04:07 +0100)]
[SelectionDAG] Remove invalid TypeSize conversion from WidenVecOp_BITCAST.
Differential Revision: https://reviews.llvm.org/D127322
Simon Pilgrim [Sat, 11 Jun 2022 08:28:38 +0000 (09:28 +0100)]
[clang][docs] Fix typo in code-block declaration
Simon Pilgrim [Thu, 9 Jun 2022 21:18:23 +0000 (22:18 +0100)]
[X86] combineTargetShuffle - break if-else chain. NFC.
(style) Both cases always continue.
Simon Pilgrim [Thu, 9 Jun 2022 21:15:08 +0000 (22:15 +0100)]
[X86] emitOrXorXorTree - break if-else chain. NFC.
(style) Both cases always return.
owenca [Fri, 10 Jun 2022 20:01:27 +0000 (13:01 -0700)]
[clang-format] Fix a bug in RemoveBracesLLVM
Remove the braces of an else block only if the r_brace of the block
is followed by an if.
Differential Revision: https://reviews.llvm.org/D127532
Sheng [Sat, 11 Jun 2022 07:59:05 +0000 (15:59 +0800)]
[NFC][clang] Fix typo
Change 'otuer' to 'outer'.
Mohammed Keyvanzadeh [Mon, 9 May 2022 01:02:26 +0000 (05:32 +0430)]
[github] format and refactor GitHub workflows
Format and refactor the GitHub workflow for consistency.
Differential Revision: https://reviews.llvm.org/D125197
Kazu Hirata [Sat, 11 Jun 2022 06:09:01 +0000 (23:09 -0700)]
[Scalar] Use llvm::append_range (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:59:48 +0000 (22:59 -0700)]
[CodeGen] Use llvm::erase_value (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:51:30 +0000 (22:51 -0700)]
[ProfileData] Use llvm::erase_if (NFC)
Fangrui Song [Sat, 11 Jun 2022 05:50:55 +0000 (22:50 -0700)]
[MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
Kazu Hirata [Sat, 11 Jun 2022 05:45:26 +0000 (22:45 -0700)]
[clang] Construct SmallVector with iterator ranges (NFC)
Kazu Hirata [Sat, 11 Jun 2022 05:39:45 +0000 (22:39 -0700)]
[clang] Convert for_each to range-based for loops (NFC)
Siva Chandra Reddy [Sat, 4 Jun 2022 14:33:49 +0000 (14:33 +0000)]
[libc] Add pthread_detach and thrd_detach.
Tests for pthread_detach and thrd_detach have not been added. Instead, a
test for the underlying implementation has been added as it makes use of
an internal wait method to synchronize with detached threads.
Reviewed By: lntue, michaelrj
Differential Revision: https://reviews.llvm.org/D127479
Kai Luo [Sat, 11 Jun 2022 04:10:21 +0000 (12:10 +0800)]
[PowerPC] Add tests to reflect cfence on float point types. NFC.
Fangrui Song [Sat, 11 Jun 2022 03:40:34 +0000 (20:40 -0700)]
[SanitizerCoverage][test] Remove br i1 undef to avoid UB
Fangrui Song [Sat, 11 Jun 2022 03:36:22 +0000 (20:36 -0700)]
[GlobalOpt][test] Remove br i1 undef
PeixinQiao [Sat, 11 Jun 2022 02:46:42 +0000 (10:46 +0800)]
[NFC] Move flang OpenMP semantic tests under one single directory
To be consistent with OpenACC and will find the tests in one single
directory for OpenMP.
Reviewed By: kiranchandramohan
Differential Revision: https://reviews.llvm.org/D127529
Fangrui Song [Sat, 11 Jun 2022 02:13:59 +0000 (19:13 -0700)]
[TableGen] const char *const x => const char x[]
Vitaly Buka [Sat, 11 Jun 2022 01:20:55 +0000 (18:20 -0700)]
[Bitcode] Don't use UINT_MAX for missing SanitizerMetadata
Looks like comment on D126100 was unnoticed.
Tue Ly [Sun, 8 May 2022 22:27:34 +0000 (18:27 -0400)]
[libc] Implement double precision FMA for targets without FMA instructions.
Implement double precision FMA (Fused Multiply-Add) for targets without
FMA instructions using __uint128_t to store the intermediate results.
Reviewed By: michaelrj, sivachandra
Differential Revision: https://reviews.llvm.org/D124495
Arjun P [Fri, 10 Jun 2022 01:53:46 +0000 (21:53 -0400)]
[MLIR][Presburger] PresburgerSet::containsPoint: support disjuncts with locals
Reviewed By: Groverkss
Differential Revision: https://reviews.llvm.org/D127466