[lldb][windows] fix late null check (#200822)
`process_sp` should be null checked before calling the
`HijackProcessEvents` method. This patch also removes 2 unused
variables.
[Clang][HIP] Guard declarations of cmath comparisons when using Microsoft's STL
In HIP, constexpr functions are treated as both, __host__ and
__device__.
A new version of the MS STL shipped with the build tools version 14.51.36231
has constexpr definitions for some cmath functions when the compiler in use is Clang.
These definitions conflict with the __device__ delcarations we provide in
the header wrappers.
This patch guards these declarations/definitions to use the ones coming
from the STL.
[mlir][nvgpu] Add roundtrip tests for warpgroup MMA operations (#199272)
Add roundtrip tests for the following NVGPU dialect operations:
- `nvgpu.warpgroup.mma.init.accumulator`
- `nvgpu.warpgroup.mma.store`
These operations were present in the dialect but lacked roundtrip
test coverage in `roundtrip.mlir`. The tests verify that operand
and result types survive the parser/printer roundtrip.
[IR] BlockAddress doesn't use BasicBlock (#200772)
BlockAddress is the only non-terminator user of a BasicBlock, and it
occurs very rarely. To speed up predecessor iteration, change
BlockAddress to no longer use its BasicBlock.
This should also make uselistorder_bb obsolete.
[flang] Add support for TYPEOF and CLASSOF type specifiers (#188804)
Implements parsing, semantics and lowering for the Fortran 2023 TYPEOF and CLASSOF type specifiers (R703). TYPEOF produces the declared type of a data-ref; CLASSOF produces a polymorphic version. Includes constraint
checks (C709–C713) and tests.
Semantics resolves TYPEOF/CLASSOF to the concrete underlying type in the symbol table, so no lowering code changes were needed. Added a lowering test to verify FIR/HLFIR generation works correctly for intrinsic types,
derived types, extended types, and polymorphic CLASSOF with allocatable/pointer.
Fixes - https://github.com/llvm/llvm-project/issues/185635
[Clang][HIP] Guard declarations of cmath comparisons when using Microsoft's STL
In HIP, constexpr functions are treated as both, __host__ and
__device__.
A new version of the MS STL shipped with the build tools version 14.51.36231
has constexpr definitions for some cmath functions when the compiler in use is Clang.
These definitions conflict with the __device__ delcarations we provide in
the header wrappers.
This patch guards these declarations/definitions to use the ones coming
from the STL.
[GlobalISel] Do not use recordsOperand() to check if a Combiner C++ predicate can be hoisted
The combiner does not use RecordNamedOperand, so assume that any operand is "recorded" in the sense
that can be used by a C++ predicate.
[clang][SemaCXX] Fix crash caused by unresolved overloaded function type when using `__builtin_bit_cast` (#200574)
Resolves #200112
By early checking for placeholder expressions, crash can be avoided for
unreachable builtin type when fetching type info.
[X86] Fold XOR of VGF2P8AFFINEQB and its source (#198448)
Adds a optimization to fold XORs between `vgf2p8affineqb` and its
source. That XOR can done through the existing affine transformation by
XORing its matrix with the identity matrix. This patch:
- Folds XOR between `vgf2p8affineqb` and its source.
- Only occurs when the matrix is constant, ensuring that it can't
increase the dependency chain.
- Doesn't occur if the affine is multi use, preventing an increase in
code size.
- Includes test coverage for both positive and negative cases.
Fixes #184061
[AMDGPU] Replace relaxed-buffer-oob-mode feature with module flag (#160922)
Remove AMDGPU subtarget feature toggle for relaxed buffer OOB handling
and replace it with two explicit LLVM module flags:
- amdgpu.buffer.oob.relaxed for untyped buffer instructions
- amdgpu.tbuffer.oob.relaxed for typed buffer instructions
Each flag is modeled as i32 with Max merge behavior and validated as a
tri-state value, where 0 means Any/default, 1 means Relaxed and 2 means Strict.
The absence of the module flag implies the default mode, which is currently treated
as Strict by the backend.
[flang][lowering] Implement component-wise initialization for derived types (#187465)
Currently, the compiler defaults to a full `memcpy` when initializing
derived types.
This patch introduces component-wise initialization for pointer /
allocatable components, avoiding unnecessary initialization data
generation and redundant copies.
Ineligible cases continue to use the existing `memcpy` initialization
path.
RFC: https://discourse.llvm.org/t/rfc-automatic-static-promotion-of-large-local-variables-in-flang/89539
Key changes:
- In `flang/lib/Lower/ConvertVariable.cpp`:
- Add `genDerivedTypeComponentInit` for component-wise derived type
initialization.
[11 lines not shown]
workflows/release-binaries: Install LLDB test deps (#199900)
lldb-api tests are hitting:
"/home/runner/work/llvm-project/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py",
line 12, in <module>
from packaging import version
ModuleNotFoundError: No module named 'packaging'
when building release binaries on Arm64/x86 Linux. Install deps before
running tests.
Fixes #176422.
[Clang] Profile the NNS of UnresolvedUsingType and CXXThisType correctly in concept hashing (#199617)
They were sometimes incorrect because the written type doesn't contain
an NNS which contains template parameters we're interested in.
No release note because the bug broke MS STL and I want to backport it
to the last 22.x release
Fixes https://github.com/llvm/llvm-project/issues/198663
[DA] Fix overflow in the Exact test (#200781)
In exactTestImpl, some computations using APInt could overflow, which
might lead to incorrect results.
This patch addresses the issue by replacing APInt with
OverflowSafeSignedAPInt, a class that is sensitive to overflow and
allows us to detect it properly.
Fixes #200766.
[GlobalISel] Do not depend on the RuleMatcher at MatchTable emission
Some PredicateMatchers/MatchAction/OperandRenderers relied on accessing
RuleMatcher at emission as a crutch.
Instead, make these classes collect all necessary information in the
constructor so the `emit` methods don't depend on RuleMatcher anymore.
The primary motivation for this is that I've been looking at ways to optimize the MatchTable better,
and the fact that Predicates/Actions/Renderers are not "pure" objects, in the sense that they keep
accessing a bunch of data all over the place even as late as emission, was a consistent pain.
This is NFCI. There are no changes to any of the match table for AMDGPU/AArch64 in this patch.
This patch has a bunch of noise due to function signature changes so I'll highlight the following interesting changes:
- `SameOperandMatcher` needed a bit of an update in its `canHoistOutsideOf` function. I had to rewrite it
but I think the end result is the same.
- `EraseInstAction` has been updated as well, and its users in both Combiner/ISel backends have been updated to.
Instead of ignoring this action if the Inst was already erased, it's now the responsibility of the
builder to never insert it in the first place. `BuildMIAction` had a small update because of that too.
[4 lines not shown]