Kazu Hirata [Mon, 29 Aug 2022 06:28:57 +0000 (23:28 -0700)]
[Instrumentation] Use std::clamp (NFC)
The use of std::clamp should be safe here. MinRZ is at most 32, while
kMaxRZ is 1 << 18, so we have MinRZ <= kMaxRZ, avoiding the undefind
behavior of std::clamp.
zhongyunde [Mon, 29 Aug 2022 06:17:06 +0000 (14:17 +0800)]
[tests] precommit tests for D132658
Reviewed By: bcl5980
Differential Revision: https://reviews.llvm.org/D132820
Fangrui Song [Mon, 29 Aug 2022 06:13:46 +0000 (23:13 -0700)]
[MC][test] Test FreeBSD after D131162
Vitaly Buka [Mon, 29 Aug 2022 06:05:23 +0000 (23:05 -0700)]
[test][msan] Add debug info use-after-dtor tests
Vitaly Buka [Mon, 29 Aug 2022 05:42:27 +0000 (22:42 -0700)]
[test][msan] Simplify tests with --implicit-check-not
Siva Chandra Reddy [Mon, 29 Aug 2022 04:28:57 +0000 (04:28 +0000)]
[libc][Obvious] Re-enable math unit tests.
Yeting Kuo [Sat, 13 Aug 2022 14:59:19 +0000 (22:59 +0800)]
[RISCV] Merge vmerge.vvm and unmasked intrinsic with VLMAX vector length.
The motivation of this patch is to lower the IR pattern
(vp.merge mask, (add x, y), false, vl) to
(PseudoVADD_VV_<LMUL>_MASK false, x, y, mask, vl).
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D131841
Tyker [Wed, 17 Aug 2022 04:17:03 +0000 (21:17 -0700)]
[MLIR] Add mlir::TypedValue
mlir::TypedValue is a wrapper class for mlir::Values with a known type
getType will return the known type and all assignements will be checked
Also the tablegen Operation generator was adapted to use mlir::TypedValue
when appropriate
jacquesguan [Wed, 24 Aug 2022 07:42:10 +0000 (15:42 +0800)]
[RISCV][NFC] Add cost model coverage for fp arithmetic instructions.
This patch adds cost model coverage for fp arithmetic instructions. Some is not exact, I am working on a revision to implement that.
Differential Revision: https://reviews.llvm.org/D132537
jacquesguan [Fri, 26 Aug 2022 08:18:16 +0000 (16:18 +0800)]
[RISCV][NFC] Refactor fadd test to match the code.
Change fadd test case in D122563 to match the fold base case.
Differential Revision: https://reviews.llvm.org/D132722
liqinweng [Mon, 29 Aug 2022 02:16:44 +0000 (10:16 +0800)]
[RISCV] Remove unused code
Reviewed By: benshi001
Differential Revision: https://reviews.llvm.org/D132281
liqinweng [Mon, 29 Aug 2022 02:10:35 +0000 (10:10 +0800)]
[RISCV] Refactor for costs of integer min/max
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D132724
gonglingqin [Mon, 29 Aug 2022 01:57:18 +0000 (09:57 +0800)]
[LoongArch] Combine add + shl to alsl.[w/d/wu]
Differential Revision: https://reviews.llvm.org/D132718
Kazu Hirata [Mon, 29 Aug 2022 01:52:49 +0000 (18:52 -0700)]
Revert "[llvm] Use llvm::is_contained (NFC)"
This reverts commit
ebf574f59a80ca00e234eee0b047e5f0df99587d.
This patch seems to cause build failures on Windows.
Sheng [Mon, 29 Aug 2022 01:32:25 +0000 (09:32 +0800)]
[NFC][clang-format] Fix typo
combinartorial
v
combinatorial
Kazu Hirata [Mon, 29 Aug 2022 00:35:09 +0000 (17:35 -0700)]
[Target] Qualify auto in range-based for loops (NFC)
Kazu Hirata [Mon, 29 Aug 2022 00:35:08 +0000 (17:35 -0700)]
[Support] Remove greatestCommonDivisor and GreatestCommonDivisor64 (NFC)
This patch removes greatestCommonDivisor and GreatestCommonDivisor64
as I've migrated all the uses to std::gcd.
Kazu Hirata [Mon, 29 Aug 2022 00:35:06 +0000 (17:35 -0700)]
[llvm] Use std::is_unsigned instead of std::numeric_limits (NFC)
Kazu Hirata [Mon, 29 Aug 2022 00:35:04 +0000 (17:35 -0700)]
[llvm] Use range-based for loops (NFC)
Kazu Hirata [Mon, 29 Aug 2022 00:35:03 +0000 (17:35 -0700)]
[llvm] Use llvm::is_contained (NFC)
Benjamin Kramer [Sun, 28 Aug 2022 22:32:37 +0000 (00:32 +0200)]
[RISC-V][HWASAN] Fold variable into assert
owenca [Sun, 28 Aug 2022 05:22:50 +0000 (22:22 -0700)]
[clang-format] Fix a bug in removing braces for the LLVM style
When an l_brace is wrapped and the line above it ends with a
comment, the annotator adds ColumnLimit to the TotalLength of the
l_brace, so the actual column position of the l_brace must be
adjusted accordingly.
Fixes #57376.
Differential Revision: https://reviews.llvm.org/D132805
Andrey Tretyakov [Wed, 24 Aug 2022 14:42:33 +0000 (17:42 +0300)]
[SPIRV] Add tests to improve test coverage
Differential Revision: https://reviews.llvm.org/D132562
Fangrui Song [Sun, 28 Aug 2022 19:13:01 +0000 (12:13 -0700)]
[Driver][Linux] Pass --hash-style=gnu to ld unless special cased
To align with many Linux distributions which configure GCC with
--enable-default-hash-style=gnu or binutils with --with-linker-hash-style=gnu.
ld.lld does not support changed default, so passing the option in the driver is
better.
Note: there was a bug that Debian specified both --hash-style=gnu and
--hash-style=both. Actually its GCC has defaulted to --hash-style=gnu since 2007.
Shoaib Meenai [Sun, 28 Aug 2022 18:27:40 +0000 (23:27 +0500)]
[MachO] Remove stale comments
https://reviews.llvm.org/D93267 implemented handling more than 127
compact unwind encodings, and https://reviews.llvm.org/D123435 and
https://reviews.llvm.org/D124561 implemented stripping redundant
__eh_frame entries.
Fangrui Song [Sun, 28 Aug 2022 18:38:40 +0000 (11:38 -0700)]
[Driver] Don't pass --enable-new-dtags to ld for Android/openSUSE
This has been the default for a very long time.
Alexey Baturo [Sun, 31 Jul 2022 10:42:45 +0000 (13:42 +0300)]
[RISC-V][HWASAN] Add support for lowering HWASAN intrinsic for RISC-V
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D131343
Alexey Baturo [Wed, 10 Aug 2022 05:28:27 +0000 (08:28 +0300)]
[RISC-V][HWASAN] Save sp address at the start of tag mismatch routine
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D131574
Alexey Baturo [Sun, 31 Jul 2022 10:38:36 +0000 (13:38 +0300)]
[RISC-V][HWASAN] Add runtime support for HWASAN for RISC-V
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D131342
Kazu Hirata [Sun, 28 Aug 2022 17:41:53 +0000 (10:41 -0700)]
Use std::gcd (NFC)
To avoid changing semantics inadvertently, this patch casts arguments
to uint64_t before calling std::gcd.
Kazu Hirata [Sun, 28 Aug 2022 17:41:51 +0000 (10:41 -0700)]
Use std::gcd (NFC)
This patch replaces calls to greatestCommonDivisor with std::gcd where
two arguments are of the same type. This means that
std::common_type_t of the argument type is the same as the argument
type.
We could drop calls to std::abs in some cases, but that's left for
another patch.
Kazu Hirata [Sun, 28 Aug 2022 17:41:50 +0000 (10:41 -0700)]
[Target] Qualify auto in range-based for loops (NFC)
Kazu Hirata [Sun, 28 Aug 2022 17:41:48 +0000 (10:41 -0700)]
[llvm] Use llvm::find_if (NFC)
Katherine Rasmussen [Thu, 18 Aug 2022 00:06:28 +0000 (17:06 -0700)]
[flang] Split up synchronization, event, and error stop stmt tests
Splitting up the tests for the synchronization statements,
event statements, and error stop statement allow for some of the
errors which are hidden by other errors, to be caught in the test.
This then reveals which invalid code does produce errors and which
does not produce errors.
Alexey Baturo [Sun, 31 Jul 2022 10:39:53 +0000 (13:39 +0300)]
[RISC-V][HWASAN] Add tag mismatch routines for HWASAN required for RISC-V
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D131341
Sanjay Patel [Sun, 28 Aug 2022 14:58:21 +0000 (10:58 -0400)]
[InstCombine] allow sext in fold of mask using signbit, part 2
https://alive2.llvm.org/ce/z/rcbZmx
Sibling tranform to
275aa24c0a51
This pattern is seen in the examples in issue #57381.
Alexey Baturo [Sun, 31 Jul 2022 10:39:08 +0000 (13:39 +0300)]
[RISC-V][HWASAN] Add intrinsics required for HWASAN support for RISC-V
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D131340
zhongyunde [Sun, 28 Aug 2022 09:46:37 +0000 (17:46 +0800)]
[InstCombine] Propagate the nuw for combine of add+mul
As the commit of D132658, make the 'nuw' change separately.
Reviewed By: spatel
Differential Revision: https://reviews.llvm.org/D132777
Florian Hahn [Sun, 28 Aug 2022 14:53:35 +0000 (15:53 +0100)]
[VPlan] Use range check in VPHeaderPHIRecipe::classof (NFC).
This addresses a suggestion to simplify the check from D131989. This
also makes it easier to ensure that VPHeaderPHIRecipe::classof checks
for all header phi ids.
Sanjay Patel [Sat, 27 Aug 2022 21:38:27 +0000 (17:38 -0400)]
[InstCombine] allow sext in fold of mask using signbit
~(iN X s>> (N-1)) & Y --> (X s< 0) ? 0 : Y -- with optional sext
https://alive2.llvm.org/ce/z/wFFnZT
Sanjay Patel [Sat, 27 Aug 2022 17:34:13 +0000 (13:34 -0400)]
[InstCombine] add tests for inverted signbit splat mask; NFC
Anubhab Ghosh [Sat, 20 Aug 2022 20:36:47 +0000 (02:06 +0530)]
[Orc] Use MapperJITLinkMemoryManager with SharedMemoryMapper in llvm-jitlink tool
MapperJITLinkMemoryManager combined with SharedMemoryMapper can be
used in place of EPCGenericJITLinkMemoryManager when running on top of
same physical memory. This commit enables it when --use-shared-memory is
passed.
Differential Revision: https://reviews.llvm.org/D132369
Benjamin Kramer [Sun, 28 Aug 2022 07:56:17 +0000 (09:56 +0200)]
Pavel Samolysov [Fri, 26 Aug 2022 12:06:21 +0000 (15:06 +0300)]
[Pipelines] Introduce DAE after ArgumentPromotion
The ArgumentPromotion pass uses Mem2Reg promotion at the end to cutting
down generated `alloca` instructions as well as meaningless `store`s and
this behavior can leave unused (dead) arguments. To eliminate the dead
arguments and therefore let the DeadCodeElimination remove becoming dead
inserted `GEP`s as well as `load`s and `cast`s in the callers, the
DeadArgumentElimination pass should be run after the ArgumentPromotion
one.
Differential Revision: https://reviews.llvm.org/D128830
Daniel Bertalan [Wed, 17 Aug 2022 14:14:03 +0000 (16:14 +0200)]
[llvm-objdump] Add -dyld_info to llvm-otool
This option outputs the location, encoded value and target of chained
fixups, using the same format as `otool -dyld_info`.
This initial implementation only supports the DYLD_CHAINED_PTR_64 and
DYLD_CHAINED_PTR_64_OFFSET pointer encodings, which are used in x86_64
and arm64 userspace binaries.
When Apple's effort to upstream their chained fixups code continues,
we'll replace this code with the then-upstreamed code. But we need
something in the meantime for testing ld64.lld's chained fixups code.
Differential Revision: https://reviews.llvm.org/D132036
Sheng [Sun, 28 Aug 2022 07:15:20 +0000 (15:15 +0800)]
[NFC] Fix typo
Kazu Hirata [Sun, 28 Aug 2022 06:54:32 +0000 (23:54 -0700)]
[Transform] Use range-based for loops (NFC)
Kazu Hirata [Sun, 28 Aug 2022 06:54:31 +0000 (23:54 -0700)]
[Utils] Remove redundaunt declarations (NFC)
Identified with readability-redundant-declaration.
Kazu Hirata [Sun, 28 Aug 2022 06:54:29 +0000 (23:54 -0700)]
[llvm] Use std::gcd (NFC)
This patch replaces calls to greatestCommonDivisor with std::gcd where
both arguments are known to be of unsigned. This means that
std::common_type_t of the two argument types should just be the wider
one of the two.
Kazu Hirata [Sun, 28 Aug 2022 06:54:27 +0000 (23:54 -0700)]
[flang] Use std::clamp (NFC)
The use of std::clamp here is safe because the definition of
largestLDKind gurantees that 8 <= largestLDKind.
Amir Ayupov [Fri, 19 Aug 2022 22:57:24 +0000 (15:57 -0700)]
[BOLT][NFC] Use llvm::any_of
Replace the imperative pattern of the following kind
```
bool IsTrue = false;
for (Element : Range) {
if (Condition(Element)) {
IsTrue = true;
break;
}
}
```
with functional style `llvm::any_of`:
```
bool IsTrue = llvm::any_of(Range, [&](Element) {
return Condition(Element);
});
```
Reviewed By: rafauler
Differential Revision: https://reviews.llvm.org/D132276
Kazu Hirata [Sun, 28 Aug 2022 04:21:08 +0000 (21:21 -0700)]
[Support] Use std::clamp (NFC)
We can safely use std::clamp here because the call to
report_size_overflow a few lines above guarantees MinSize <= MaxSize.
Kazu Hirata [Sun, 28 Aug 2022 04:21:07 +0000 (21:21 -0700)]
[lldb] Use nullptr instead of NULL (NFC)
Identified with modernize-use-nullptr.
Kazu Hirata [Sun, 28 Aug 2022 04:21:05 +0000 (21:21 -0700)]
[lldb] Remove a redundaunt return statement (NFC)
Identified with readability-redundant-control-flow.
Kazu Hirata [Sun, 28 Aug 2022 04:21:04 +0000 (21:21 -0700)]
[flang] Simplify string comparisons (NFC)
Identified with readability-string-compare.
Kazu Hirata [Sun, 28 Aug 2022 04:21:02 +0000 (21:21 -0700)]
[Transforms] Qualify auto in range-based for loops (NFC)
Identified with readability-qualified-auto.
Kazu Hirata [Sun, 28 Aug 2022 04:21:00 +0000 (21:21 -0700)]
Use llvm::is_contained (NFC)
Kazu Hirata [Sun, 28 Aug 2022 04:20:58 +0000 (21:20 -0700)]
Use std::gcd (NFC)
This patch replaces calls to GreatestCommonDivisor64 with std::gcd
where both arguments are known to be of unsigned types no larger than
64 bits in size.
Arnab Dutta [Sun, 28 Aug 2022 01:25:48 +0000 (06:55 +0530)]
Fold memref.expand_shape and memref.collapse_shape ops
Fold memref.expand_shape and memref.collapse_shape ops into their
memref/affine load/store ops.
Reviewed By: bondhugula, nicolasvasilache
Differential Revision: https://reviews.llvm.org/D128986
Nathan James [Sat, 27 Aug 2022 23:21:39 +0000 (00:21 +0100)]
[clang-tidy] Tweak diagnostics for bugprone-assign-in-if-condition
Currently the diagnostic is printed at the start of the assignment expression, This can be misleading.
Having the location for the diagnostic be the location of the assignment operator is much more intuitive.
Reviewed By: gribozavr2
Differential Revision: https://reviews.llvm.org/D132795
Shafik Yaghmour [Sat, 27 Aug 2022 22:18:36 +0000 (15:18 -0700)]
[Clang] Avoid crashes when parsing using enum declarations
In Parser::ParseUsingDeclaration(...) when we call ParseEnumSpecifier(...) it is
not calling SetTypeSpecError() on DS when it detects an error. That means that
DS is left set to TST_unspecified. When we then pass DS into
Sema::ActOnUsingEnumDeclaration(...) we hit an llvm_unreachable(...) since it
expects it to be one of three states TST_error, TST_enum or TST_typename.
This fixes https://github.com/llvm/llvm-project/issues/57347
Differential Revision: https://reviews.llvm.org/D132695
owenca [Fri, 26 Aug 2022 06:13:34 +0000 (23:13 -0700)]
[clang-format] Rework removeBraces() in Format.cpp
Fixes #57373.
Differential Revision: https://reviews.llvm.org/D132719
Florian Hahn [Sat, 27 Aug 2022 21:06:11 +0000 (22:06 +0100)]
[VPlan] Verify that header only contains header phi recipes.
Add verification that VPHeaderPHIRecipes are only in header VPBBs. Also
adds missing checks for VPPointerInductionRecipe to
VPHeaderPHIRecipe::classof.
Split off from D119661.
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D131989
Akira Hatanaka [Sat, 27 Aug 2022 20:39:28 +0000 (13:39 -0700)]
[compiler-rt][builtins] Pass -Werror to check_cxx_compiler_flag
This is needed to avoid passing flags that are supported by the compiler
but cause warnings to be emitted.
Nikolas Klauser [Sun, 21 Aug 2022 00:03:35 +0000 (02:03 +0200)]
[libc++] Mark everything in <deque> as _LIBCPP_HIDE_FROM_ABI and replace _LIBCPP_INLINE_VISIBILITY
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D132320
Nathan James [Sat, 27 Aug 2022 18:59:16 +0000 (19:59 +0100)]
[clang-tidy] Add missing header from
6bd98b4f2d
Nathan James [Sat, 27 Aug 2022 18:55:08 +0000 (19:55 +0100)]
[clang-tidy] Fix a false positive in bugprone-assignment-in-if-condition
Fixed a false positive where a lambda expression in the condition which contained an assignement would trigger a warning.
Fixes #56729
Reviewed By: gribozavr2
Differential Revision: https://reviews.llvm.org/D132786
Arthur Eubanks [Fri, 26 Aug 2022 22:06:51 +0000 (15:06 -0700)]
[LazyCallGraph] Update libcall list when replacing a libcall node's function
Otherwise when we visit all libcalls in
updateCGAndAnalysisManagerForPass(), the old libcall is dead and doesn't
have a node.
We treat libcalls conservatively in LazyCallGraph because any function
may introduce calls to them out of thin air.
It is weird to change the signature of a libcall since introducing calls
to the libcall with a different signature may break, but other passes
like deadargelim already do it, so let's preserve this behavior for now.
Fixes an issue found in D128830.
Reviewed By: psamolysov
Differential Revision: https://reviews.llvm.org/D132764
Kazu Hirata [Sat, 27 Aug 2022 16:53:16 +0000 (09:53 -0700)]
[GlobalISel] Use std::lcm (NFC)
This patch replaces getLCMSize with std::lcm, a C++17 feature.
Note that all the arguments are of unsigned with no implicit type
conversion as they are passed to getLCMSize.
Kazu Hirata [Sat, 27 Aug 2022 16:53:14 +0000 (09:53 -0700)]
[mlir] Use std::lcm (NFC)
This patch replaces mlir::lcm with std::lcm, a C++17 feature.
Note that all the arguments to mlir::lcm are of int64_t with no
implicit type conversion as they are passed to mlir::lcm, which I've
verified by modifying mlir::lcm as:
template <typename TA, typename TB>
inline int64_t lcm(TA a, TB b) {
static_assert(std::is_same_v<TA, int64_t>);
static_assert(std::is_same_v<TB, int64_t>);
:
Kazu Hirata [Sat, 27 Aug 2022 16:53:13 +0000 (09:53 -0700)]
Use std::clamp (NFC)
This patch replaces clamp idioms with std::clamp where the range is
obviously valid from the source code (that is, low <= high) to avoid
introducing undefined behavior.
Kazu Hirata [Sat, 27 Aug 2022 16:53:11 +0000 (09:53 -0700)]
Use llvm::is_contained (NFC)
Kazu Hirata [Sat, 27 Aug 2022 16:53:09 +0000 (09:53 -0700)]
Use llvm::all_equal (NFC)
Emil Kieri [Sat, 27 Aug 2022 06:37:19 +0000 (08:37 +0200)]
[flang] Don't emit faulty warnings for illegal COMMON blocks
SAVE statements referencing COMMON block names are not allowed in BLOCK
constructs. If they occur, an error is correctly emitted, but then flang
gets confused by the illegal SAVE and produces a faulty warning. This
patch removes that warning.
Consider this piece of Fortran (from the test blockconstruct02.f90):
program main
real r, s, t
common /argmnt2/ r, s, t
block
save /argmnt2/
end block
end program
Here flang (in addition to the error about the illegal SAVE) emits a
portability warning saying that the two definitions of argmnt2 have
different size, which does not make much sense.
This patch is a prerequisite for D125804, which in turn will make
blockconstruct02.f90 test this patch.
Reviewed By: jeanPerier
Differential Revision: https://reviews.llvm.org/D132403
Sanjay Patel [Sat, 27 Aug 2022 14:15:30 +0000 (10:15 -0400)]
[InstCombine] allow poison (undef) element in vector signbit transforms
If the shift constant has undefined lanes, we can assume those
are the same as the defined lanes in these transforms:
https://alive2.llvm.org/ce/z/t6TTJ2
Replace undef with poison in the test while here to support
the transition away from undef.
Sanjay Patel [Sat, 27 Aug 2022 13:30:26 +0000 (09:30 -0400)]
[InstCombine] add tests for signbit splat mask; NFC
issue #57381
Jun Zhang [Sat, 27 Aug 2022 15:14:48 +0000 (23:14 +0800)]
Avoid else-if after return, NFC
Signed-off-by: Jun Zhang <jun@junz.org>
Jun Zhang [Sat, 27 Aug 2022 14:32:47 +0000 (22:32 +0800)]
[CodeGen] Track DeferredDecls that have been emitted
If we run into a first usage or definition of a mangled name, and
there's a DeferredDecl that associated with it, we should remember it we
need to emit it later on.
Without this patch, clang-repl hits a JIT symbol not found error:
clang-repl> extern "C" int printf(const char *, ...);
clang-repl> auto l1 = []() { printf("ONE\n"); return 42; };
clang-repl> auto l2 = []() { printf("TWO\n"); return 17; };
clang-repl> auto r1 = l1();
ONE
clang-repl> auto r2 = l2();
TWO
clang-repl> auto r3 = l2();
JIT session error: Symbols not found: [ l2 ]
error: Failed to materialize symbols: { (main,
{ r3, orc_init_func.incr_module_5, $.incr_module_5.inits.0 }) }
Signed-off-by: Jun Zhang <jun@junz.org>
Differential Revision: https://reviews.llvm.org/D130831
Benjamin Kramer [Sat, 27 Aug 2022 12:47:19 +0000 (14:47 +0200)]
Use std::uninitialized_move where appropriate. NFCI.
Sanjay Patel [Sat, 27 Aug 2022 11:59:48 +0000 (07:59 -0400)]
[InstCombine] fold signbit splat pattern that uses negate
0 - (zext (i8 X u>> 7) to iN) --> sext (i8 X s>> 7) to iN
https://alive2.llvm.org/ce/z/jzv4Ud
This is part of solving issue #57381.
Sanjay Patel [Fri, 26 Aug 2022 20:03:10 +0000 (16:03 -0400)]
[InstCombine] add tests for signbit-smear; NFC
issue #57381
Mark de Wever [Thu, 4 Aug 2022 15:29:25 +0000 (17:29 +0200)]
[libc++][CI] Increases the Clang version used.
Changes the CI to use the Clang 16 nightly builds instead of Clang 14.
(The libc++15 branch was accidentally build using Clang 14 instead of
Clang 15; hence the skipping of a number.)
Also adds a Clang 15 build to the test matrix.
Based on the private discussion with @ldionne we decided to move
the configuration parameters from the `run-buildbot` script to the
CI configuration `buildkite-pipeline.yml`. Other hard-coded values
from the Dockerfile should be move to the CI configuration too. That
will be done in another commit.
C++17 will use Clang-15 since D131479 causes a test to fail.
Reviewed By: ldionne, #libc
Differential Revision: https://reviews.llvm.org/D131174
Nathan James [Sat, 27 Aug 2022 10:24:57 +0000 (11:24 +0100)]
[clang-tidy] Move bugprone-assignment-in-if-condition check to correct folder
Shoaib Meenai [Mon, 22 Aug 2022 19:55:41 +0000 (22:55 +0300)]
[MachO] Fix dead-stripping __eh_frame
This section is marked S_ATTR_LIVE_SUPPORT in input files, which meant
that on arm64, we were unnecessarily preserving FDEs if we e.g. had
multiple weak definitions for a function. Worse, we would actually
produce an invalid `__eh_frame` section in that case, because the CIE
associated with the unnecessary FDE would still get dead-stripped and
we'd end up with a dangling FDE. We set up associations from functions
to their FDEs, so dead-stripping will just work naturally, and we can
clear S_ATTR_LIVE_SUPPORT from our input `__eh_frame` sections to fix
dead-stripping.
Reviewed By: #lld-macho, int3
Differential Revision: https://reviews.llvm.org/D132489
Benjamin Kramer [Sat, 27 Aug 2022 08:50:28 +0000 (10:50 +0200)]
[tblgen] Use std::variant to simplify code. NFCI.
Benjamin Kramer [Sat, 27 Aug 2022 08:50:06 +0000 (10:50 +0200)]
[libTooling] Simplify code with constexpr if. NFCI.
Nikolas Klauser [Sat, 27 Aug 2022 06:47:31 +0000 (08:47 +0200)]
[libc++] Simplify type_traits a bit more
Reviewed By: ldionne, #libc
Spies: STL_MSFT, CaseyCarter, huixie90, libcxx-commits
Differential Revision: https://reviews.llvm.org/D129094
Stanislav Mekhanoshin [Tue, 23 Aug 2022 19:28:54 +0000 (12:28 -0700)]
[AMDGPU] Detect uniformness of TID / wavefrontsize
A value of 'workitemid / wavefrontize' or 'workitemid & (wavefrontize - 1)'
is wave uniform.
Differential Revision: https://reviews.llvm.org/D132511
Rainer Orth [Sat, 27 Aug 2022 05:50:18 +0000 (07:50 +0200)]
[asan][test] Fix typo in Unit/lit.site.cfg.py.in
I noticed that `test/asan/Unit/lit.site.cfg.py.in` contains two typos,
using the FreeBSD forms of the `LD_*LIBRARY_PATH*` variables on Solaris.
Tested on `amd64-pc-solaris2.11`.
Differential Revision: https://reviews.llvm.org/D132736
Anubhab Ghosh [Sat, 20 Aug 2022 20:32:51 +0000 (02:02 +0530)]
[Orc] Use MapperJITLinkMemoryManager with InProcessMapper in llvm-jitlink tool
MapperJITLinkMemoryManager has slab allocation. Combined with
InProcessMapper, it can replace InProcessMemoryManager.
It can also replace JITLinkSlabAllocator through the InProcessDeltaMapper
that adds an offset to the executor addresses for use in tests.
Differential Revision: https://reviews.llvm.org/D132315
Mircea Trofin [Sat, 27 Aug 2022 04:29:25 +0000 (21:29 -0700)]
[mlgo] Fix flaky test
The source of the flakyness is internal uninitialized buffers due to
a dangling variable in the model.
Chelsea Cassanova [Sat, 27 Aug 2022 01:06:44 +0000 (20:06 -0500)]
[lldb][docs] Fix formatting in fuzzing doc
The page for fuzzing LLDB had incorrectly formatted code,
this commit fixes that.
Differential revision: https://reviews.llvm.org/D132775
Anubhab Ghosh [Fri, 26 Aug 2022 13:28:21 +0000 (18:58 +0530)]
[Orc] Take offset inside slab into account in SharedMemoryMapper
SharedMemoryMapper assumed each reservation will have its corresponding
allocations starting from the beginning. However with the introduction
of the slab allocator, there can be a possible offset from the start
from where the initialization is being performed.
This commit also simplifies the logic for finding the parent reservation
and makes the assert messages consistent.
Amir Ayupov [Sat, 27 Aug 2022 02:12:17 +0000 (19:12 -0700)]
[BOLT][UTILS] Stash including untracked in nfc-check-setup
The command to detect whether the stash is needed is `git status --porcelain`
which includes untracked files by default. We want to stash untracked files
as well as they may affect compilation (LLVM CMake checks that all source files
should be included in CMakeLists).
Update the stash command to include untracked files as well.
Reviewed By: #bolt, rafauler
Differential Revision: https://reviews.llvm.org/D132610
Julian Lettner [Sat, 27 Aug 2022 01:26:32 +0000 (18:26 -0700)]
[Clang][Driver] Temporarily disable failing DriverKit test
Lang Hames [Sat, 27 Aug 2022 00:06:56 +0000 (17:06 -0700)]
[ORC-RT] Remove __orc_rt::apply_tuple.
This utility was a substitute for std::apply, which is now available.
Craig Topper [Fri, 26 Aug 2022 19:50:06 +0000 (12:50 -0700)]
[RISCV] Pre-commit tests for D132771. NFC
Chelsea Cassanova [Fri, 26 Aug 2022 23:27:35 +0000 (18:27 -0500)]
[lldb][docs] Add documentation for LLDB fuzzers
This commit adds a new page to the LLDB HTML documentation for the LLDB
fuzzers. The page primarily explains what the fuzzers are as well as how
to build them, run them and investigate and reproduce bugs.
Differential revision: https://reviews.llvm.org/D132148
Vitaly Buka [Fri, 26 Aug 2022 21:52:39 +0000 (14:52 -0700)]
[msan] Enable msan-check-constant-shadow by default
Depends on D132761.
Reviewed By: eugenis
Differential Revision: https://reviews.llvm.org/D132765
Julian Lettner [Fri, 26 Aug 2022 23:29:30 +0000 (16:29 -0700)]
[TSan] Fix pointer/type-mismatch bug in test that has turned into a compile error
Fixes this test compile error:
```
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:54:7: error: no matching function for call to '__tsan_get_alloc_stack'
__tsan_get_alloc_stack(mem, trace, num_frames, &thread_id, &thread_os_id);
^~~~~~~~~~~~~~~~~~~~~~
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:17:16: note: candidate function not viable: no known conversion from 'uint64_t **' (aka 'unsigned long long **') to 'uint64_t *' (aka 'unsigned long long *') for 5th argument; remove &
extern "C" int __tsan_get_alloc_stack(void *addr, void **trace, size_t size,
^
<path>/compiler-rt/test/tsan/debug_alloc_stack.cpp:61:46: warning: format specifies type 'unsigned long long' but the argument has type 'uint64_t *' (aka 'unsigned long long *') [-Wformat]
fprintf(stderr, "thread os id = 0x%llx\n", thread_os_id);
~~~~ ^~~~~~~~~~~~
1 warning and 1 error generated.
```