Commit Graph

426434 Commits

Author SHA1 Message Date
Alex Brachet 98052b6463 Revert "[lit] Passthrough CLANG_MODULE_CACHE_PATH env var"
This reverts commit 6466c9abf3.
2022-06-12 03:01:08 +00:00
Weining Lu 45963ae06d [LoongArch] clang-format some code in LoongArchISelLowering.cpp. NFC 2022-06-12 10:41:56 +08:00
Weining Lu 229e08ce99 [LoongArch] Remove unnecessary `static` keyword as `const` has internal linkage. NFC
See https://reviews.llvm.org/D127199#inline-1222815
2022-06-12 10:05:47 +08:00
Amaury Séchet 982f65a68e Autogenerate sve-fixed-length-frame-offests-crash.ll . NFC 2022-06-12 01:54:10 +00:00
Amaury Séchet d35da7f78a Autogenerate sve-fixed-length-bitselect.ll . NFC 2022-06-12 01:53:05 +00:00
Kazushi (Jam) Marukawa 140ad7d378 [Clang][VE][NFC] Fix a comment 2022-06-12 10:27:30 +09:00
Keith Smiley 7d57c69826
[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
2022-06-11 17:38:50 -07:00
Joe Loser c115e760c2
[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
2022-06-11 18:11:04 -06:00
Nico Weber 5f57ca208b fix comment typo to cycle bots 2022-06-11 18:55:40 -04:00
Florian Hahn 763f2bdba5
[VPlan] Remove dead OrigLoop argument from removeDeadRecipes (NFC).
The use of the argument has been remove a while ago. Remove the dead
argument.
2022-06-11 23:36:47 +01:00
Florian Hahn 684a82fbc5
[InstCombine] Remove unnecessary UB from some tests. 2022-06-11 23:22:49 +01:00
Alex Brachet 6466c9abf3 [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.
2022-06-11 21:04:02 +00:00
Simon Pilgrim cf5c63d187 [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
2022-06-11 21:06:42 +01:00
Joe Loser ae2ae84ffe
[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
2022-06-11 13:10:02 -06:00
Dmitri Gribenko 11f75e0a2d [clang-tidy][docs] Remove an unintentional paragraph break 2022-06-11 21:03:43 +02:00
Dmitri Gribenko 65299c9c65 [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).
2022-06-11 21:03:43 +02:00
Amir Ayupov 7dee646b28 [BOLT][NFC] Move printDebugInfo out of BC::printInstruction
Simplify `BinaryContext::printInstruction`.

Reviewed By: ayermolo

Differential Revision: https://reviews.llvm.org/D127561
2022-06-11 11:58:36 -07:00
Kazu Hirata a838043f38 [llvm] Use contains (NFC) 2022-06-11 11:46:16 -07:00
Simon Pilgrim 7841d09449 [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
2022-06-11 19:30:00 +01:00
Simon Pilgrim c8aaa5d9c3 [X86][AVX512] Add tests showing failure to retain pmuldq broadcast loads on 32-bit targets
Noticed while investigating the build vector issues on D127115
2022-06-11 19:30:00 +01:00
Simon Pilgrim 44a0cd25df [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
2022-06-11 19:30:00 +01:00
Kazu Hirata 439a675a5a Use getValueOr (NFC) 2022-06-11 11:24:57 -07:00
Kazu Hirata 5ee3876905 Use isa instead of dyn_cast (NFC) 2022-06-11 11:15:52 -07:00
Dave Lee c7a56af307 [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
2022-06-11 10:19:51 -07:00
Chia-hung Duan ba3a9f51ff [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
2022-06-11 15:56:23 +00:00
Craig Topper ff80dc8544 [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.
2022-06-11 08:34:37 -07:00
ksyx 45b278f195 [Clang][Doc][SafeStack] Fix deadlink (NFC) 2022-06-11 10:59:51 -04:00
Simon Pilgrim a71ad6a3c8 [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
2022-06-11 15:29:22 +01:00
Nikolas Klauser ee397722cc [libc++][NFC] Update ranges algorithms status page 2022-06-11 16:21:34 +02:00
Simon Pilgrim 599aa617e3 [PowerPC] Regenerate pre-inc-disable.ll checks 2022-06-11 15:12:49 +01:00
Simon Pilgrim 50d0804ac7 [X86] Replace X32 check prefix with X86
We try to use X32 only for gnux32 triple cases
2022-06-11 15:12:49 +01:00
Mark de Wever aed5ddf8d0 [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
2022-06-11 15:25:56 +02:00
David Green 338fd211e7 [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
2022-06-11 14:16:37 +01:00
David Green 82fcd7397a [AArch64] Add extra faddp codegen tests. NFC 2022-06-11 12:57:48 +01:00
Simon Pilgrim 693f4db1ec [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.
2022-06-11 12:01:13 +01:00
Paul Walker 10d55c4634 [SelectionDAG] Remove invalid TypeSize conversion from WidenVecOp_BITCAST.
Differential Revision: https://reviews.llvm.org/D127322
2022-06-11 10:41:13 +01:00
Simon Pilgrim 781dc344f5 [clang][docs] Fix typo in code-block declaration 2022-06-11 09:28:38 +01:00
Simon Pilgrim 6eaea225c7 [X86] combineTargetShuffle - break if-else chain. NFC.
(style) Both cases always continue.
2022-06-11 09:16:39 +01:00
Simon Pilgrim 89d2b1e4f7 [X86] emitOrXorXorTree - break if-else chain. NFC.
(style) Both cases always return.
2022-06-11 09:16:38 +01:00
owenca 05d771021a [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
2022-06-11 01:12:11 -07:00
Sheng 6cf83480ea [NFC][clang] Fix typo
Change 'otuer' to 'outer'.
2022-06-11 15:59:05 +08:00
Mohammed Keyvanzadeh 7e5f75aa37
[github] format and refactor GitHub workflows
Format and refactor the GitHub workflow for consistency.

Differential Revision: https://reviews.llvm.org/D125197
2022-06-11 11:31:21 +04:30
Kazu Hirata 5d7b1a5f1b [Scalar] Use llvm::append_range (NFC) 2022-06-10 23:09:01 -07:00
Kazu Hirata a98965d92f [CodeGen] Use llvm::erase_value (NFC) 2022-06-10 22:59:48 -07:00
Kazu Hirata c2713df30b [ProfileData] Use llvm::erase_if (NFC) 2022-06-10 22:51:30 -07:00
Fangrui Song adf4142f76 [MC] De-capitalize SwitchSection. NFC
Add SwitchSection to return switchSection. The API will be removed soon.
2022-06-10 22:50:55 -07:00
Kazu Hirata 2e603c67c2 [clang] Construct SmallVector with iterator ranges (NFC) 2022-06-10 22:45:26 -07:00
Kazu Hirata f5ef2c5838 [clang] Convert for_each to range-based for loops (NFC) 2022-06-10 22:39:45 -07:00
Siva Chandra Reddy 5db4177817 [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
2022-06-11 05:29:40 +00:00
Kai Luo e06faedf1d [PowerPC] Add tests to reflect cfence on float point types. NFC. 2022-06-11 12:30:15 +08:00