531002 Commits

Author SHA1 Message Date
Matt Arsenault
1f1f8200bd
AMDGPU: Switch simplifydemandedbits-recursion.ll to generated checks (#131317)
This just checked the s_endpgm. Generate full checks, and remove undefs.
2025-03-17 16:10:01 +07:00
Matt Arsenault
a6ae965cec
AMDGPU: Switch scheduler-subrange-crash.ll to generated checks (#131316)
Also remove unnecessarily requiring asserts, and replace undef
with poison.
2025-03-17 16:07:08 +07:00
Matt Arsenault
ee8a804cba
AMDGPU: Switch test to generated checks (#131315)
I doubt this is testing what it originally intended anymore. Also
replace an undef.
2025-03-17 16:03:55 +07:00
Anatoly Trosinenko
4f2ee07454
[BOLT][AArch64] Do not crash on authenticated branch instructions (#129898)
When an indirect branch instruction is decoded, analyzeIndirectBranch
method is asked if this is a well-known code pattern. On AArch64, the
only special pattern which is detected is Jump Table, emitted as a
branch to the sum of a constant base address and a variable offset.
Therefore, `Inst.getOpcode()` being one of `AArch64::BRA*` means Inst
cannot belong to such Jump Table pattern, thus returning early.
2025-03-17 12:00:05 +03:00
Matt Arsenault
8cc6c2e80f
AMDGPU: Migrate more tests away from undef (#131314)
andorbitset.ll is interesting since it directly depends on the
difference between poison and undef. Not sure it's useful to keep
the version using poison, I assume none of this code makes it to
codegen.

si-spill-cf.ll was also a nasty case, which I doubt has been reproducing
its original issue for a very long time. I had to reclaim an older version,
replace some of the poison uses, and run simplify-cfg. There's a very
slight change in the final CFG with this, but final the output is approximately
the same as it used to be.
2025-03-17 15:57:47 +07:00
Younan Zhang
d9110858ee
[Clang] Fix an incorrect assumption on getTemplatedDecl() (#131559)
Since a68d20e98, we've been calling HandleDelayedAccessCheck() for
concept declarations when the declaration contains invalid member
accesses.

However, a concept declaration is TemplateDecl such that doesn't contain
any TemplatedDecl.

Fixes https://github.com/llvm/llvm-project/issues/131530
2025-03-17 16:53:57 +08:00
Jim Lin
a10e1e0135 [RISCV] Remove unused check prefixes from double maximum/minimum test. NFC 2025-03-17 16:39:51 +08:00
Balázs Kéri
fd41f1b0ce
[clang][analyzer] Add BugReporterVisitor messages for non-null fixed pointer (#129557) 2025-03-17 09:46:58 +01:00
Mariusz Sikora
6b47bba440
[AMDGPU] Add intrinsics and MIs for ds_bvh_stack_* (#130007)
New intrinsics / instructions :
int_amdgcn_ds_bvh_stack_push4_pop1_rtn / ds_bvh_stack_push4_pop1_rtn_b32
int_amdgcn_ds_bvh_stack_push8_pop1_rtn / ds_bvh_stack_push8_pop1_rtn_b32
int_amdgcn_ds_bvh_stack_push8_pop2_rtn / ds_bvh_stack_push8_pop2_rtn_b64

Co-authored-by: Mateja Marjanovic <mateja.marjanovic@amd.com>
2025-03-17 09:13:20 +01:00
Ebuka Ezike
3af6c9fa83
[lldb][lldb-dap][NFC] Fix swapped logging directions for DAP messages. (#131544)
The logging markers for incoming ("<--") and outgoing ("-->") messages
were incorrectly reversed. from #7790d69
2025-03-17 07:58:55 +00:00
Julian Ruess
ccfabe8380
[clang-tidy-diff] Add an option to treat warnings as errors (#128221)
This patch allows to treat warnings as erros using clang-tidy-diff.

Co-authored-by: Piotr Zegar <me@piotrzegar.pl>
2025-03-17 15:55:40 +08:00
LLVM GN Syncbot
9b1ce477af [gn build] Port 57e36419b251 2025-03-17 07:24:08 +00:00
Arseniy Zaostrovnykh
57e36419b2
[analyzer] Introduce per-entry-point statistics (#131175)
So far CSA was relying on the LLVM Statistic package that allowed us to
gather some data about analysis of an entire translation unit. However,
the translation unit consists of a collection of loosely related entry
points. Aggregating data across multiple such entry points is often
counter productive.

This change introduces a new lightweight always-on facility to collect
Boolean or numerical statistics for each entry point and dump them in a
CSV format. Such format makes it easy to aggregate data across multiple
translation units and analyze it with common data-processing tools.

We break down the existing statistics that were collected on the per-TU
basis into values per entry point.

Additionally, we enable the statistics unconditionally (STATISTIC ->
ALWAYS_ENABLED_STATISTIC) to facilitate their use (you can gather the
data with a simple run-time flag rather than having to recompile the
analyzer). These statistics are very light and add virtually no
overhead.

Co-authored-by: Balazs Benics <benicsbalazs@gmail.com>
CPP-6160
2025-03-17 08:23:31 +01:00
LLVM GN Syncbot
c3f6d2c024 [gn build] Port 3b1e18c2dba8 2025-03-17 07:12:11 +00:00
Congcong Cai
3b1e18c2db
[clang-tidy] Add new check bugprone-capture-this-by-field (#130297)
Finds lambda captures that capture the ``this`` pointer and store it as
class
members without handle the copy and move constructors and the
assignments.

Capture this in a lambda and store it as a class member is dangerous
because the
lambda can outlive the object it captures. Especially when the object is
copied
or moved, the captured ``this`` pointer will be implicitly propagated to
the
new object. Most of the time, people will believe that the captured
``this``
pointer points to the new object, which will lead to bugs.

Fixes: #120863

---------

Co-authored-by: Baranov Victor <70346889+vbvictor@users.noreply.github.com>
Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
2025-03-17 15:11:43 +08:00
sharang.12492
7eb8b73178
[Flang][OpenMP][taskloop] Adding missing semantic checks in Taskloop (#128431)
Below semantic checks for Taskloop clause mentioned in OpenMP [5.2]
specification were missing, this patch contains the semantic checks,
corresponding error messages and test cases:
OpenMP standard [5.2]:
[12.6] Taskloop Construct
[Restrictions]
Restrictions to the taskloop construct are as follows: 
• The reduction-modifier must be default.
• The conditional lastprivate-modifier must not be specified.

Authored-by: shkaushi <sharang.kaushik@amd.com>
2025-03-17 12:35:37 +05:30
Kazu Hirata
78408fddcc
[ExecutionEngine] Avoid repeated map lookups (NFC) (#131552) 2025-03-16 23:52:47 -07:00
Kazu Hirata
05607a3f39
[CodeGen] Avoid repeated hash lookups (NFC) (#131551) 2025-03-16 23:52:16 -07:00
Fangrui Song
2c35cb6f16 [MC] Remove unneeded getNumFixupKinds 2025-03-16 23:50:46 -07:00
Letu Ren
009d36222c
[clang][CodeComplete] Add code completion for if constexpr and consteval (#124315)
Code complete `constexpr` and `consteval` keywords after `if` in the
relevant language modes. If pattern completion is enabled, the
completions also include placeholders for the condition (in the case
of `constexpr`) and statement block.
2025-03-17 02:45:19 -04:00
Matthias Springer
6c867e27a7
[mlir] Use getSingleElement/hasSingleElement in various places (#131460)
This is a code cleanup. Update a few places in MLIR that should use
`hasSingleElement`/`getSingleElement`.

Note: `hasSingleElement` is faster than `.getSize() == 1` when it is
used with linked lists etc.

Depends on #131508.
2025-03-17 07:43:18 +01:00
Lang Hames
f402953339 [ORC] Fix code example in comment: SPS function sigs are function types. NFCI. 2025-03-17 17:38:22 +11:00
Matt Arsenault
f75d75b889
AMDGPU: Use MFPropsModifier modifier in SIFoldOperands (#127752)
This doesn't appear to work. I do not get an error in the new PM.

---------

Co-authored-by: Akshat Oke <Akshat.Oke@amd.com>
2025-03-17 13:37:34 +07:00
Fangrui Song
8a1b4d0ed2 [MC] Rework AVR #121498 to not add extra argument to shouldForceRelocation
This removes the extra argument from commit 814b34f31e163e76b816194004689985f5b9fd7b.

Also remove unneeded `>= FirstLiteralRelocationKind`.
2025-03-16 23:35:01 -07:00
Hua Tian
b09b9ac108
[llvm][CodeGen] Fix the empty interval issue in Window Scheduler (#129204)
The interval of newly generated reg in ModuloScheduleExpander is empty.
This will cause crash at some corner case. This patch recalculate the
live intervals of these regs.
2025-03-17 14:28:47 +08:00
Craig Topper
e0fee65b87 [PowerPC] Use Register in FastISel. NFC 2025-03-16 23:26:22 -07:00
Yingwei Zheng
c5a491e9ea
[SCEV] Check whether the start is non-zero in ScalarEvolution::howFarToZero (#131522)
https://github.com/llvm/llvm-project/pull/94525 assumes that the loop
will be infinite when the stride is zero. However, it doesn't hold when
the start value of addrec is also zero.

Closes https://github.com/llvm/llvm-project/issues/131465.
2025-03-17 13:59:16 +08:00
Akshat Oke
baab447aad
[llc] Report error in lieu of warning for invalid cl option (#128846) 2025-03-17 11:24:54 +05:30
Fangrui Song
de60c0e034 [MC] .reloc: move FirstLiteralRelocationKind check to evaluateFixup
Target shouldForceRelocation checks `FirstLiteralRelocationKind` to
determine whether a relocation is forced due to the .reloc directive. We
should move the code to evaluateFixup so that many targets don't need to
override shouldForceRelocation.
2025-03-16 22:32:18 -07:00
Akshat Oke
687c9d359e
[CodeGen][NPM] Port FEntryInserter to NPM (#129857) 2025-03-17 10:35:53 +05:30
Jim Lin
2a2d6d61b1 [RISCV] Remove unused check prefixes from half arith strict test. NFC 2025-03-17 12:51:39 +08:00
Brandon Wu
752aa81c4f
[clang][RISCV] Rename variable name in SemaRISCV. NFC (#131261) 2025-03-17 12:55:59 +08:00
Ryotaro Kasuga
e24e523150
[LoopVectorize] Add test for follow-up metadata for loops (NFC) (#131337)
When pragma of loop transformations are encoded in LLVM IR, follow-up
metadata is used if multiple transformations are specified. They are
used to explicitly express the order of the transformations. However,
they are not properly processed on each transformation pass, so now only
the first one is attempted to be applied. This is a pre-commit to add a
test that causes the problem.

ref:
https://github.com/llvm/llvm-project/pull/127474#issuecomment-2717790398
2025-03-17 13:45:09 +09:00
Valentin Clement (バレンタイン クレメン)
4fde8c341f
[flang][cuda] Lower CUDA shared variable with cuf.shared_memory op (#131399)
Use `cuf.shared_memory` operation instead of `cuf.alloc` for CUDA shared
variable. These variables do not need free operations.
2025-03-16 17:44:56 -07:00
Owen Pan
4b86a7f386 [clang-format] Update the minimum python version requirement
See https://llvm.org/docs/GettingStarted.html#software

Fix #131456
2025-03-16 16:42:19 -07:00
Fangrui Song
2e78abe788 [MSP430] Delete unneeded fixupNeedsRelaxationAdvanced 2025-03-16 16:37:21 -07:00
Ebuka Ezike
125c4db730
[lldb][lldb-dap] setVariable request should send the correct response (#130773)
The display value was incorrectly sent as "result" instead of "value".
2025-03-16 23:28:25 +00:00
Alexander Shaposhnikov
2dc123b33d
[clang][opencl] Allow passing all zeros to reqd_work_group_size (#131543)
Allow passing all zeros to reqd_work_group_size.

Test plan: ninja check-all
2025-03-16 16:21:46 -07:00
Fangrui Song
81ba006296
[X86] nocf_check: disable tail call
When a function pointer is annotated with
`void (*fptr)(void) __attribute__((nocf_check));`, calling it should use
the NOTRACK prefix, as the callee may not contain an ENDBR.

https://reviews.llvm.org/D41879 implemented NOTRACK variants for
X86ISD::CALL and ISD::BRIND but not for TCRETURN. Given that there are
so many tail call variants (e.g. conditional tailcall
https://reviews.llvm.org/D29856), let's just disable tailcall.
While nocf_check has some uses within the Linux kernel, it isn't a
popular attribute.

Fix #91228

Pull Request: https://github.com/llvm/llvm-project/pull/131487
2025-03-16 16:18:14 -07:00
Owen Pan
91328dbae9
[clang-format] Correctly annotate user-defined conversion functions (#131434)
Also fix/delete existing invalid/redundant test cases.

Fix #130894
2025-03-16 16:11:39 -07:00
Pedro Lobo
950bc6cd77
[LoopFuse] Change placeholder from undef to poison (#131535)
Use `poison` instead of `undef` as a placeholder for phi entries of
unreachable predecessors.
2025-03-16 22:44:39 +00:00
Matthias Springer
3e6f618e86
[llvm][ADT] Add getSingleElement helper (#131508)
This commit adds a new helper function: `getSingleElement`

This function asserts that the container has a single element and then
returns that element. This helper function is useful during 1:N dialect
conversions in MLIR, where certain `ValueRange`s (returned from the
adaptor) are known to have a single value.
2025-03-16 21:20:36 +01:00
Florian Hahn
40b7034213
[LV] Add tests for vector backedge elimination with early-exit loops. 2025-03-16 19:42:30 +00:00
Florian Hahn
ee29e16135
[LV] Reorganize tests for narrowing interleave group transform.
Make test target-dependent, as they will require access to a concrete
vector register width. Also add new tests for cost modeling, unrolling
and removing the vector loop region.
2025-03-16 19:18:47 +00:00
Kazu Hirata
b648576528
[CodeGen] Avoid repeated hash lookups (NFC) (#131495) 2025-03-16 11:02:57 -07:00
Tristan Ross
4e841d7d63
[libc] add uefi docs (#131426)
Adds documentation for the UEFI target since #131246 was merged.
2025-03-16 10:21:19 -07:00
Ivan Butygin
7c98cddc5a
[mlir] Expose AffineExpr.shift_dims/shift_symbols through C and Python bindings (#131521) 2025-03-16 19:57:56 +03:00
Kazu Hirata
93ce345504
[PowerPC] Avoid repeated hash lookups (NFC) (#131498) 2025-03-16 09:30:34 -07:00
Kazu Hirata
1bc2108c49
[Transforms] Avoid repeated hash lookups (NFC) (#131497) 2025-03-16 09:30:05 -07:00
Kazu Hirata
48ecec20a2
[Hexagon] Avoid repeated hash lookups (NFC) (#131496) 2025-03-16 09:29:35 -07:00