[Clang][Modules] Ensure global diagnostic overrides are respected in system modules (#180684)
When a template is instantiated from a system module, the
location-specific
diagnostic state (from 'Diag.GetDiagStateForLoc(Loc)') often has
'SuppressSystemWarnings' set to true because the location itself is
within
a system header defined by the module map.
Clang provides mechanisms like 'AllowWarningInSystemHeaders' RAII
(used for deprecated warnings in 'SemaAvailability.cpp') that are
intended
to temporarily override this suppression. Previously, this was done by
modifying the current diagnostic state's 'SuppressSystemWarnings' bit.
However, since 'getDiagnosticSeverity' checks the state associated with
the
diagnostic's location, this current-state override was ignored for code
inside system modules.
[30 lines not shown]
[SafeStack] Use ptrmask instead of ptrtoint+and+inttoptr (#181649)
Use the provenance-preserving ptrmask intrinsic instead of
ptrtoint+and+inttoptr for pointer alignment.
[AMDGPU] Add missing comma between export target and first export data (#181641)
The new format matches the official ISA spec and ensures the
disassembler prints 'export mrt0, v0, off, off, off' instead of 'export
mrt0 v0, off, off, off'.
No functional encoding changes; printing/AsmString only.
[OMPIRBuilder] Hoist alloca's to entry blocks of compiler-emitted GPU reduction functions (#181359)
Fixes a bug in GPU reductions when `-O0` was used to compile GPU
reductions. There were invalid memory accesses at runtime for the
following example:
```fortran
program test_array_reduction()
integer :: red_array(1)
integer :: i
red_array = 0
!$omp target teams distribute parallel do reduction(+:red_array)
do i = 1, 100
red_array(1) = red_array(1) + 4422
end do
!$omp end target teams distribute parallel do
[9 lines not shown]
[mlir][sparse][nfc] replace sparse_tensor.pointers in docs (#181636)
The `-sparse-tensor-conversion` and `-sparse-tensor-codegen`
descriptions use `sparse_tensor.pointers` which doesn't exist. It
was renamed to `sparse_tensor.positions`.
[tsan] Only init AdaptiveDelay if enabled (#181757)
In #178836, while refactoring from a virtual class design to a
non-virtual design, the logic ended up such that AdaptiveDelayImpl was
always constructed, even if the adaptive delay feature was not enabled.
Adaptive delay itself was always disabled if the flag was off, this just
prevents the ctor from running at all.
@dvyukov
[lldb][windows] deactivate unicode tests on Windows (#181698)
https://github.com/llvm/llvm-project/pull/181143 introduced a regression
in Windows build bots, which is due to some Unicode characters not being
rendered properly.
The proper fix is to be able to configure the characters that are
rendered, and to force them to be ascii characters.
[OMPIRBuilder] Hoist alloca's to entry blocks of compiler-emitted GPU reduction functions
Fixes a bug in GPU reductions when `-O0` was used to compile GPU
reductions. There were invalid memory accesses at runtime for the
following example:
```fortran
program test_array_reduction()
integer :: red_array(1)
integer :: i
red_array = 0
!$omp target teams distribute parallel do reduction(+:red_array)
do i = 1, 100
red_array(1) = red_array(1) + 4422
end do
!$omp end target teams distribute parallel do
[10 lines not shown]
[mlir][x86vector] Shuffle BF16 vector.contract output for Flat layout. (#174590)
This patch shuffles the output of a `bf16` type `non-vnni` packed
`vector.contract` operation (`flat` layout). The output of the
contraction operation is shuffle to match the `flat` layout, before get
stored in the `acc` matrix.
Following this transform schedule, the `vector.contract` will be lowered
to one of the following operations:
- x86vector::DotBF16Op with `B` matrix shuffled to compensate the `flat`
layout (supported as part of this PR), or
- vector.fma with loads + broadcast using `bf16` packed operations
(supported as part of this PR).
[libc] Add basic support for building SPIR-V libraries (#181049)
This is to add support to build libc for building with spirv backend,
for use with OpenMP kernels
[lldb][macOS] Index shared cache files by UUID & filename (#180874)
The shared cache index only had accessors for getting a file from a
shared cache by filename. In some environments like iOS Simulator, a
filename can be either the actual realpath name of the framework in an
SDK or simulator runtime install location, or rooted on / like
/System/LibraryFrameworks/SwiftUI.framework. Because the searches for
binaries were by filename, this divergence would be a problem. However,
searching for binaries by the binary's UUID can remove that ambiguity.
I changed HostInfoMacOSX's store of SharedCacheImageInfo's to have a
std::vector of all of the SharedCacheImageInfo's in a shared cache. Then
I create a mapping of filename-to-SharedCacheImageInfo* and a mapping of
UUID-to-SharedCacheImageInfo*, both pointing into the now-frozen
std::vector. I added a HostInfo::GetSharedCacheImageInfo method to fetch
an entry by shared-cache UUID + file UUID, in addition to the previous
shared-cache UUID + filename.
Have HostInfoMacOSX store the filenames it gets from the libdyld SPI in
[7 lines not shown]
[ADT] Remove misleading is_const check in MutableArrayRef constructor (#181758)
The `std::negation<std::is_const<C>>` check here seems semantically
inaccurate; we should care about whether the container provides mutable
element access, not the constness of the container itself. This was
already being checked but was previously being dropped prior to the
change from `const C&` to `C&` in
https://github.com/llvm/llvm-project/pull/181190. That was sufficient in
itself to fix the referenced issue
https://github.com/llvm/llvm-project/issues/181176
---------
Signed-off-by: Eric Feng <Eric.Feng at amd.com>
[libc] Fix move destruction double-freeing ports after move to RAII
Summary:
Recently I changed the interface to use RAII to close the ports. This
exposed a problem where the default move constructor was invoked in the
optional wrapping, this caused the destructor to fire twice on the
server, obviously causing havok. This PR changes the move destructor to
be deleted so this never happens again. Now everything is constructed
once and only references are allowed. The optional class had to be
fixed to properly set in_use so we run the destructor properly as well.