526760 Commits

Author SHA1 Message Date
Kazu Hirata
7628fcf3d4
[CrossTU] Avoid repeated hash lookups (NFC) (#126380) 2025-02-08 11:36:05 -08:00
Kazu Hirata
2fee5ef235
[ByteCode] Avoid repeated hash lookups (NFC) (#126379) 2025-02-08 11:35:45 -08:00
Kazu Hirata
451007173a
[Analysis] Avoid repeated hash lookups (NFC) (#126378) 2025-02-08 11:35:17 -08:00
David Green
ca9c0486cc [ARM] Silence "enumerated and non-enumerated type in conditional expression" warning. NFC
Fixes #125543
2025-02-08 19:32:14 +00:00
Florian Hahn
9266b48c5b
[VPlan] Add outer loop tests with wide phis in inner loop.
Add test coverage with phis outside a header block with multiple
incoming values.
2025-02-08 18:09:45 +00:00
Vasileios Porpodas
7f2f905361 [SandboxVec] Fix: Add missing lit.local.cfg for target test 2025-02-08 09:06:00 -08:00
Michael Kruse
5c8c2b3db5
[Flang] Rename libFortranRuntime.a to libflang_rt.runtime.a (#122341)
Following the conclusion of the
[RFC](https://discourse.llvm.org/t/rfc-names-for-flang-rt-libraries/84321),
rename Flang's runtime libraries as follows:

 * libFortranRuntime.(a|so) to libflang_rt.runtime.(a|so)
 * libFortranFloat128Math.a to libflang_rt.quadmath.a
* libCufRuntime_cuda_${CUDAToolkit_VERSION_MAJOR}.(a|so) to
libflang_rt.cuda_${CUDAToolkit_VERSION_MAJOR}.(a|so)

This follows the same naming scheme as Compiler-RT libraries
(`libclang_rt.${component}.(a|so)`). It provides some consistency
between Flang's runtime libraries for current and potential future
library components.
2025-02-08 18:02:54 +01:00
LLVM GN Syncbot
40ce8fd843 [gn build] Port 69b8cf4f0621 2025-02-08 16:35:01 +00:00
vporpo
69b8cf4f06
[SandboxVec][BottomUpVec] Add cost estimation and tr-accept-or-revert pass (#126325)
The TransactionAcceptOrRevert pass is the final pass in the Sandbox
Vectorizer's default pass pipeline. It's job is to check the cost
before/after vectorization and accept or revert the IR to its original
state.

Since we are now starting the transaction in BottomUpVec, tests that run
a custom pipeline need to accept the transaction. This is done with the
help of the TransactionAlwaysAccept pass (tr-accept).
2025-02-08 08:34:18 -08:00
Durgadoss R
2feced1df0
[MLIR][NVVM] Add tcgen05 wait/fence Ops (#126265)
PR #126091 adds intrinsics for tcgen05
wait/fence/commit operations. This patch
adds NVVM Dialect Ops for them.

Signed-off-by: Durgadoss R <durgadossr@nvidia.com>
2025-02-08 21:34:40 +05:30
Sam Elliott
101b3ff7af
[RISCV][NFC] Adopt DiagnosticString interface (#126290) 2025-02-08 07:59:55 -08:00
Mats Jun Larsen
a07928c3ce
[CodeGen][Hexagon] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126274)
Follow-up to https://github.com/llvm/llvm-project/issues/123569

The obsolete bitcasts on the LoadInsts are also removed.
2025-02-08 15:13:23 +00:00
Mats Jun Larsen
e0fee55a55
[CodeGen] Replace of PointerType::get(Type) with opaque version (NFC) (#124771)
Follow-up to https://github.com/llvm/llvm-project/issues/123569
2025-02-08 15:13:02 +00:00
Florian Hahn
6ff8a06de9
[VPlan] Run recipe removal and simplification after optimizeForVFAndUF. (#125926)
Run recipe simplification and dead recipe removal after VPlan-based
unrolling and optimizeForVFAndUF, to clean up any redundant or dead
recipes introduced by them. Currently this is NFC, as it removes the
corresponding removeDeadRecipes run in optimizeForVFAndUF and no
additional simplifications kick in after unrolling yet. That is changing
with https://github.com/llvm/llvm-project/pull/123655.

Note that with this change, pattern-matching is now applied after
EVL-based recipes have been introduced.

Trying to match VPWidenEVLRecipe when not explicitly requested might
apply a pattern with 2 operands to one with 3 due to the extra EVL
operand and VPWidenEVLRecipe being a subclass of VPWidenRecipe.

To prevent this, update Recipe_match::match to only match
VPWidenEVLRecipe if it is in the requested recipe types (RecipeTy).

PR: https://github.com/llvm/llvm-project/pull/125926
2025-02-08 13:33:46 +00:00
Mats Jun Larsen
df2e8ee7ae
[CodeGen][AArch64] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126278)
Follow-up to #123569
2025-02-08 13:23:08 +00:00
Mats Jun Larsen
54e0c2bbe2
[CodeGen][SystemZ] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126280)
Follow-up to #126278
2025-02-08 13:22:53 +00:00
Mats Jun Larsen
4e29148cca
[CodeGen][XCore] Replace PointerType::getUnqual(Type) with opaque version (NFC) (#126279)
Follow-up to #123569
2025-02-08 13:22:42 +00:00
Guy David
ef23ba7da3
[Support] Re-raise external signals (#125854)
Otherwise, the handler "swallows" the signal and the process continues
to execute. While this use case is peculiar, ignoring these signals
entirely seems more odd.
2025-02-08 15:16:26 +02:00
Amr Hesham
66bea0df75
[llvm-objcopy] Fix prints wrong path when dump-section output path doesn't exist (#125345)
Fix printing the correct file path in the error message when the output
file specified by `--dump-section` cannot be opened

Fixes: #125113 on ELF, MachO, Wasm
2025-02-08 14:14:16 +01:00
Florian Hahn
ee806646ad
[VPlan] Consistently use hasScalarVFOnly (NFC).
Consistently use hasScalarVFOnly instead of using
hasVF(ElementCount::getFixed(1)). Also add an assert to ensure all cases
are covered by hasScalarVFOnly.
2025-02-08 12:19:25 +00:00
Michael Buch
0cdb467c7d
[lldb][TypeSystemClang] Create EnumExtensibilityAttr from DW_AT_APPLE_enum_kind (#126221)
This patch consumes the `DW_AT_APPLE_enum_kind` attribute added in
https://github.com/llvm/llvm-project/pull/124752 and turns it into a
Clang attribute in the AST. This will currently be used by the Swift
language plugin when it creates `EnumDecl`s from debug-info and passes
it to Swift compiler, which expects these attributes
2025-02-08 11:39:11 +00:00
Florian Hahn
16df836a52
[VPlan] Mark hasVF & hasScalableVF as const (NFC). 2025-02-08 11:32:23 +00:00
Akshat Oke
564b9b7f4d
Revert "CodeGen][NewPM] Port MachineScheduler to NPM. (#125703)" (#126268)
This reverts commit 5aa4979c47255770cac7b557f3e4a980d0131d69 while I
investigate what's causing the compile-time regression.
2025-02-08 15:36:48 +05:30
Thomas Preud'homme
027aa70ea4
[TOSA] Fix negate maxValue computation (#126295)
getInput1Zp() returns an unsigned value which means in case of negative
zero point value the max intermediate value computation currently goes
wrong. Use getInput1ZpAttr() instead which returns an APInt and allows
easy sign extension to int64_t.
2025-02-08 09:23:32 +00:00
Kazu Hirata
95922d8334
[dsymutil] Avoid repeated hash lookups (NFC) (#126190) (#126346) 2025-02-08 00:49:42 -08:00
Kazu Hirata
5901bda5a0
[Vectorize] Avoid repeated hash lookups (NFC) (#126345) 2025-02-08 00:48:51 -08:00
Kazu Hirata
dbe812220c
[TableGen] Avoid repeated hash lookups (NFC) (#126344) 2025-02-08 00:48:30 -08:00
Kazu Hirata
1c497c4837
[CodeGen] Avoid repeated hash lookups (NFC) (#126343) 2025-02-08 00:48:01 -08:00
Yanzuo Liu
6f241e3683
[Clang][Sema] Fix wrong initialization kind when handling initializing structured bindings from an array with direct-list-initialization (#124793)
In 377257f063c, elements of structured bindings are copy-initialized.
They should be direct-initialized because the form of the initializer of
the whole structured bindings is a direct-list-initialization.

> [dcl.struct.bind]/1:
> ... and each element is copy-initialized or direct-initialized from
the corresponding element of the assignment-expression as specified by
the form of the initializer. ...

For example,

```cpp
  int arr[2]{};
  // elements of `[a, b]` should be direct-initialized
  auto [a, b]{arr};
```
2025-02-08 14:31:47 +08:00
Gedare Bloom
e0a21e23a7
[clang-format] Add BinPackLongBracedList style option (#112482)
The use of Cpp11BracedListStyle with BinPackArguments=False avoids bin
packing until reaching a hard-coded limit of 20 items. This is an
arbitrary choice. Introduce a new style option to allow disabling this
limit.
2025-02-07 22:10:35 -08:00
Craig Topper
de12bf5089
[RISCV] Refactor tablegen classes to push common values down to VPseudoBinaryM. NFC (#126339)
Move VPseudoBinaryM ajacent to its only users.
2025-02-07 21:37:21 -08:00
Augusto Noronha
9d5edc9a0d
[lldb][NFC] Replace GetLocalBufferSize() with GetLocalBuffer() (#126333) 2025-02-07 19:12:35 -08:00
Uday Bondhugula
b850ce41db
[MLIR][Affine] Fix private memref creation bug in affine fusion (#126028)
Fix private memref creation bug in affine fusion exposed in the case of
the same memref being loaded from/stored to in producer nest. Make the
private memref replacement sound.

Change affine fusion debug string to affine-fusion - more compact.

Fixes: https://github.com/llvm/llvm-project/issues/48703
2025-02-08 08:35:10 +05:30
Tiezhu Yang
ff79d83cae
[LLDB][LoongArch] Extend the maximum number of watchpoints (#126204)
The maximum number of load/store watchpoints and fetch instruction
watchpoints is 14 each according to LoongArch Reference Manual [1],
so extend the maximum number of watchpoints from 8 to 14 for ptrace.

A new struct user_watch_state_v2 was added into uapi in the related
kernel commit 531936dee53e ("LoongArch: Extend the maximum number of
watchpoints") [2], but there may be no struct user_watch_state_v2 in
the system header in time.

In order to avoid undefined or redefined error, just add a new struct
loongarch_user_watch_state in LLDB which is same with the uapi struct
user_watch_state_v2, then replace the current user_watch_state with
loongarch_user_watch_state.

As far as I can tell, the only users for this struct in the userspace
are GDB and LLDB, there are no any problems of software compatibility
between the application and kernel according to the analysis.

The compatibility problem has been considered while developing and
testing. When the applications in the userspace get watchpoint state,
the length will be specified which is no bigger than the sizeof struct
user_watch_state or user_watch_state_v2, the actual length is assigned
as the minimal value of the application and kernel in the generic code
of ptrace:

```
kernel/ptrace.c: ptrace_regset():

	kiov->iov_len = min(kiov->iov_len,
                            (__kernel_size_t) (regset->n * regset->size));

	if (req == PTRACE_GETREGSET)
                return copy_regset_to_user(task, view, regset_no, 0,
                                           kiov->iov_len, kiov->iov_base);
	else
                return copy_regset_from_user(task, view, regset_no, 0,
                                             kiov->iov_len, kiov->iov_base);
```

For example, there are four kind of combinations, all of them work well.

(1) "older kernel + older app", the actual length is 8+(8+8+4+4)*8=200;
(2) "newer kernel + newer app", the actual length is 8+(8+8+4+4)*14=344;
(3) "older kernel + newer app", the actual length is 8+(8+8+4+4)*8=200;
(4) "newer kernel + older app", the actual length is 8+(8+8+4+4)*8=200.

[1]
https://loongson.github.io/LoongArch-Documentation/LoongArch-Vol1-EN.html#control-and-status-registers-related-to-watchpoints
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=531936dee53e

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
2025-02-08 10:31:48 +08:00
Ami-zhang
12a154a94a
[libunwind] Unwind through loongarch64/Linux sigreturn frame (#123682)
Similar to D90898 (Linux AArch64), D124765 (SystemZ), and D148499
(RISCV).

In this commit, I enabled two test cases, while zhuqizheng supported
with the source code development.

Co-Authored-By: zhuqizheng <zhuqizheng@loongson.cn>

Co-authored-by: zhuqizheng <zhuqizheng@loongson.cn>
2025-02-08 09:48:41 +08:00
A. Jiang
51ba9819b4
[libc++][test] Fix size_type issues with MinSequenceContainer and min_allocator (#126267)
`MinSequenceContainer::size` can be narrowing on 64-bit platforms, and
MSVC complains about such implicit conversion. This PR changes the
implicit conversion to explicit `static_cast`.

`min_allocator::allocate` and `min_allocator::deallocate` have
`ptrdiff_t` as the parameter type, which seems weird, because the
underlying `std::allocator`'s member functions take `size_t`. It seems
better to use `size_t` consistently.
2025-02-08 09:26:59 +08:00
Min-Yih Hsu
7464dc8c76
[RISCV] Include RISCVGenSearchTable.inc in RISCVISelDAGToDAG.h (#126326)
This line was previously removed when
12d47247e5046b959af180e12f648c54e2c5e863 moved it to RISCVInstrInfo.h.
But we probably don't want to have dangling `#define *_DECL`
(RISCVGenSearchableTables.inc will `#undef` these macros) and I think
there is no harm putting declarations of those search table functions in
RISCVISelDAGToDAG.h.
2025-02-07 17:13:56 -08:00
Paul Kirth
3e2afe5f01
Revert "[Fuchsia] Support PGO" (#126293)
Reverts llvm/llvm-project#120323

This breaks some internal Fuchsia builders. We can reland again later,
once that is addresed.
2025-02-07 16:57:11 -08:00
Michael Kruse
e6e8ac59ba
[Flang] Optionally do not compile the runtime in-tree (#122336)
Introduce the CMake switch FLANG_INCLUDE_RUNTIME. When set to off, do
not add build instructions for the runtime.

This is required for Flang-RT (#110217) and the current runtime CMake
code to co-exist. When using `LLVM_ENABLE_RUNTIME=flang-rt`, the in-tree
build instructions are in conflict and must be disabled.
2025-02-08 01:06:27 +01:00
David Blaikie
343bbda140 Use a stable sort to handle overlapping/duplicate line sequences
This can occur due to linker ICF and stable sort will ensure the results
are stable.

No explicit/new test coverage, because nondeterminism is non-testable.

It should already be covered by the DWARFDebugLineTest that was failing
some internal testing on an ARM machine which might've been what changed
the sort order. But `llvm::sort` also deliberately randomizes the
contents (under EXPENSIVE_CHECKS) so I'd have expected failures to show
up in any EXPENSIVE_CHECKS Build...
2025-02-07 23:50:41 +00:00
David Blaikie
51e7dc8627 Use explicit unsigned literals to fix mixed sign comparisons 2025-02-07 23:47:23 +00:00
David Pagan
898112e529
[OpenMP][Docs] Update OpenMP supported features table (#126292)
Updated status to 'done' for OpenMP 6.0 features:
  - OpenMP directives in concurrent loop regions
  - atomics constructs on concurrent loop regions
  - Lift nesting restriction on concurrent loop

Removed duplicate OpenMP 6.0 feature per Michael Klemm:
  - atomic constructs in loop region
2025-02-07 14:53:49 -08:00
Petr Hosek
170cdadf7d
[libc] Exercise all CMake build types in GitHub Action workflows (#126315)
We want to test libc in all build configurations: Debug, Release and
MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
2025-02-07 14:50:52 -08:00
LLVM GN Syncbot
756dab4c25 [gn build] Port 76985fd7cafd 2025-02-07 22:19:30 +00:00
joaosaffran
76985fd7ca
[DXIL] Adding support to RootSignatureFlags in obj2yaml (#122396)
This PR adds:
- `RootSignatureFlags` extraction from DXContainer using `obj2yaml`


This PR is part of: #121493

---------

Co-authored-by: joaosaffran <joao.saffran@microsoft.com>
2025-02-07 14:19:19 -08:00
Joseph Huber
addbb44484
[LinkerWrapper] Clean up options after proper forwarding (#126297)
Summary:
Recent changes made a lot of this stuff redundant or unused, clean it up
a bit.

Also snuck in a change to pass the CUDA path since we still use it for
`fatbinary` internally.
2025-02-07 15:40:45 -06:00
Petr Hosek
6dbe542290
[libc] Use ${libc_opt_high_flag} instead of -O3 (#123233)
This is preferable since `${libc_opt_high_flag}` will be set correctly
for the compiler used.
2025-02-07 13:36:06 -08:00
David CARLIER
427b24a408
[compiler-rt][rtsan] adding readlink(at) interception (#126262) 2025-02-07 21:33:29 +00:00
Md Abdullah Shahneous Bari
8b12acd2a4
[mlir][vector][spirv] Handle 1-element vector.{load|store} lowering. (#126294)
Add support for single element vector{load|store} lowering to SPIR-V.
Since, SPIR-V converts single element vector to scalars, it needs
special attention for vector{load|store} lowering to spirv{load|store}.
2025-02-07 15:31:47 -06:00
Nico Weber
2e0c0931bc [gn] fix bug in bfba6215cec2 2025-02-07 16:14:40 -05:00