[NFC][AMDGPU] Remove redundant add/mul check (#240881)
Remove redundant add/mul check. Same check is done two statements
earlier.
Signed-off-by: John Lu <John.Lu at amd.com>
[SystemZ][z/OS] Make symbols renameable (#239692)
z/OS can rename symbols, but only if the symbol is marked as renameable
in the ESD record. Until now all symbols were emitted as non-renameable.
Mark them renameable by default, with these exceptions:
- CELQSTRT and CELQINPL stay non-renameable.
- CELQBST is renameable. Section-level PR symbols are unchanged.
Add a renameable flag to MCSymbolGOFF and the ER attributes, and update
the affected tests.
Note that HLASM has no way to express this flag, so it is only visible
in the GOFF object output.
Assisted by: IBM Bob
[Offload][Omp] Track allocation kind and host data in libomptarget
Move OpenMP specific tracking of kind and host data to libomptarget.
Assisted by Claude.
[Offload][Omp] Split plugin diagnostics into detection & messaging
The plugin interface tracks a allocations and kernels (when TrackAllocationTraces
and TrackNumKernelLaunches are enabled) to emit diagnostic messages.
These messages currently contain OpenMP specific data that needs to be carried
through the Plugin Interface.
This PR splits this support in two pieces: tracking and detection that is
kept inside the plugins, and reporting of the error which is done through
a handler set from libomptarget.
A new diagnostic handler type is added, and the API to associate it to a device
are added to liboffload.
This will allow to handle the OpenMP specific data fromb the libomptarget handler
and remove it from the Plugin Interface (not done in this PR).
[AArch64] Treat PAUTH_EPILOGUE as a scheduling boundary (#239157)
Machine schedulers can move `PAUTH_EPILOGUE` ahead of other epilogue
instructions, leaving instructions between return address authentication
and `RET`. This prevents the PAuth lowering pass from forming a combined
authenticated return.
Treat `PAUTH_EPILOGUE` as a scheduling boundary to preserve its position
relative to surrounding instructions. For example, the Armv8.3-A
return-address extraction sequence changes from `autiasp; xpaci x0; ret`
to `xpaci x0; retaa`.
Extend the scheduler regression to check `PAUTH_EPILOGUE` ordering under
both pre-RA and post-RA scheduling, and update the return-address and
PAuthLR speculative load hardening checks for the resulting instruction
order.
Split from https://github.com/llvm/llvm-project/pull/237467.
[lldb-dap][ext] Set the tsconfig types for TypeScript 6 (#240863)
TypeScript 6 no longer includes every @types package by default. so we
get lsp error in the unit tests and the webview.
explicitly list the global packages the extension uses. moduleResolution
'node' is deprecated in TypeScript 6.
Revert "[CMake] message type: FATAL_ERROR instead of ERROR" (#241321)
Reverts llvm/llvm-project#174947
The error is now indeed fatal, but it fires also when using clang-cl,
breaking our builds. See comment on the original PR.
[mlir][VectorToGPU] Split VectorToNVGPU from VectorToGPU (#238804)
VectorToGPU contains lowering to both the GPU and NVGPU dialects,
causing users of the generic GPU conversion to link NVGPU dependencies.
Move the NVGPU lowering into a separate VectorToNVGPU library and
introduce the convert-vector-to-nvgpu pass. Remove the use-nvgpu option
from convert-vector-to-gpu, which retains the generic GPU lowering.
Share common helpers through `MLIRVectorToGPUCommonConversion`. Preserve
the existing lowering behaviour for both paths.
Related: [#236134](https://github.com/llvm/llvm-project/pull/236134)
---------
Co-authored-by: Markus Böck <markus.boeck02 at gmail.com>
[Attributor][NFC] Only look for callback arguments of call site arguments (#240912)
`getArgNo` looked for a callback callee argument for every position
kind, e.g. for the attribute index of every argument.
Only call site arguments can map to a different argument.
Attributor passes on CTMark files, on top of the other pending
Attributor compile-time changes: -0.1% to -0.4% instructions.
Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
Co-authored-by: Shilei Tian <i at tianshilei.me>
Assisted-by: Claude Opus 5.5
[AMDGPU][AsmParser] Require a comma between dfmt and nfmt
PR46403 says that the MTBUF syntax expects dfmt and nfmt to be
separated by a comma. Nothing required supporting the comma as
optional: dfmt and nfmt were always ordinary operands. They were
separate operands before 35484c9d5024, and the printer has always
printed them as 'dfmt:N, nfmt:M'.
Another step towards checks for correct use of commas between
operands.
Assisted-By: Claude
[Offload][AMDGPU] Return the real user count from getUserCount (#241301)
This patch fixes the return type of AMDGPUQueueTy::getUserCount, which
currently returns bool: that collapses the count to 0 or 1, which upsets
the occupancy measurement in assignNextQueue.
A new test checks that work is queued appropriately across hardware
queues.
Assisted-By: Claude
Record the info of functions defaulted outside class templates
A function defaulted outside its class template returned from
SetDeclDefaulted before it recorded the floating-point features in
effect at its definition. Its instantiation then had no info to reuse
and took the features in effect at its point of instantiation instead,
which also crashed codegen when those were strict but the function was
not.
Always record the info for such a pattern, so that its instantiation
reuses it. Also don't record it twice for a postfix operator defaulted
under non-default floating-point features: its info, including those
features, is recorded along with the lookup of its prefix operator.
[clang][C23] Delay thread storage recovery for constexpr diagnostics (#236758)
When a thread storage specifier conflicts with another storage class,
DeclSpec clears it before diagnosing a C23 constexpr conflict. The
second diagnostic then reports "unspecified" and loses the specifier's
source range.
For a block-scope declaration:
Before:
```
a:2:22: error: cannot combine with previous 'register' declaration specifier
2 | constexpr register _Thread_local int x = 1;
| ~~~~~~~~ ^
a:2:3: error: cannot combine with previous 'unspecified' declaration specifier
2 | constexpr register _Thread_local int x = 1;
| ^
2 errors generated.
```
[13 lines not shown]
[Offload][AMDGPU] Return the real user count from getUserCount
This patch fixes the return type of AMDGPUQueueTy::getUserCount, which
currently returns bool: that collapses the count to 0 or 1, which upsets
the occupancy measurement in assignNextQueue.
A new test checks that work is queued appropriately across hardware
queues.
Assisted-By: Claude
[clang][Sema][NFC] Consolidate checking for vector reduction builtins (#238663)
Share argument conversion, element type extraction, and result type
assignment across the single-argument reduction builtins. Preserve each
builtin's element type restrictions and diagnostics, and reuse
getVectorElementType for fixed-size and sizeless vectors.
[NFC][OpenMP] Track Fortran OpenMP support status only in the Flang docs (#240917)
The Clang OpenMP support page had a "Fortran Status" column in its 5.2,
6.0 and 6.1 tables that was not kept up to date with the Flang page. For
OpenMP 5.2 alone it disagreed with flang/docs/OpenMPSupport.md on 13
rows (e.g. "if clause on teams", "otherwise clause" and "pure procedure
support" were listed as unclaimed for Fortran but are done in Flang).
Make the Flang page the only place Fortran status is recorded. The Clang
page now covers Clang (C/C++) and the LLVM OpenMP runtimes, whose status
applies to both languages.
[Offload][AMDGPU] Return the HSA queue as a queue's native handle (#241300)
Implement getNativeQueueHandle (introduced by #234186) for AMDGPU, so
that olGetQueueInfo can report OL_QUEUE_INFO_NATIVE_HANDLE for an AMDGPU
queue instead of UNSUPPORTED. The handle is the hsa_queue_t the queue's
stream is bound to; a stream is bound on first use, so querying binds
one if necessary. Several streams may share an HSA queue, in which case
their queues report the same handle.
Assisted-By: Claude
[libc] Use a syscall wrapper for symlinkat (#241205)
This PR move symlinkat behind the centralized syscall wrappers,
following libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for symlink (#241204)
This PR move symlink behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for linkat (#241203)
This PR move linkat behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.
[libc] Use a syscall wrapper for getsid (#241202)
This PR move getsid behind the centralized syscall wrappers, following
libc/docs/dev/syscall_wrapper_refactor.md.