[AMDGPU] Fix `GCNRegPressureTest`'s super-class to ensure proper target initialization (#211030)
The typo made it so that all tests in the file would be skipped if no
other testsuite explicitly initialized the AMDGPU target (for example
when running `./unittests/Target/AMDGPU/AMDGPUTests
--gtest_filter=GCNRegPressureTest.*`). `AMDGPUCodeGenTestBase`
initializes the target so tests always run as long as LLVM is built with
the AMDGPU target.
[bazel] Only set LLVM_ENABLE_DIA_SDK in bazel build defs to zero if not set by build args (#210723)
Windows lldb build support via bazel is still a work in progress.
LLVM_ENABLE_DIA_SDK enables windows specific functionality. With it
hard-coded to 0 here, an override via build args via buck2 (internally
at Meta) of
'-DLLVM_ENABLE_DIA_SDK=1' had no effect. So modify this set of
configurations to allow that build arg to take precedence while avoiding
a larger amount of changes for windows/bazel lldb support (for now).
As cannot build with bazel locally, I will rely on CI to confirm lint
and building.
[mlir][openacc] Do not erase acc routine information early (#210813)
acc routine information is used in ACCCGToGPU to compute parallelism. If
the info is missing, predicated region might be wrong and lead to
deadlock.
Just keep them in ACCRountineToGPUFunc and they will be cleaned up later
in the pipeline.
workflows: Add missing checkouts when using validate-release-version (#210471)
We need to make sure all composite workflows we use are checked out
manually from th egit repo.
(cherry picked from commit 429c88d37f1f02e68ebc1fc7b0da4511ce6407e3)
math/saga: Fix nullptr error
saga-gis/src/tools/io/io_webservices/soilgrids.cpp:433:57: error:
invalid operands to binary expression ('bool' and 'std::nullptr_t')
bResult = Get_Variable(Variable, Distribution, Layer) != NULL;
The upstream fix will be released with the next bugfix version.
Reported by: package builders
[MemorySSA] Make getPreviousDef iterative to avoid stack overflow (#205159)
MemorySSAUpdater::getPreviousDefRecursive walked the CFG
predecessor-first
using native recursion (mutually recursive with getPreviousDefFromEnd).
On
functions with very deep control flow - e.g. long chains of blocks
produced
by large auto-generated kernels/shaders - the recursion depth scales
with the
number of blocks and can overflow the native stack.
Rewrite the walk as an explicit worklist of frames on the heap. Each
frame
tracks the block being processed and a resume stage so a child block's
result
can be folded back into its parent, exactly mirroring the previous
recursive
control flow. Behaviour is otherwise unchanged: cache lookups,
[13 lines not shown]
AMDGPU: Validate processor and features in TargetID parsing (#209304)
TargetID::parseTargetIDString previously only checked that the string
was structurally a 4-component triple followed by a processor field. It
accepted unrecognized processors and silently ignored malformed or
unsupported feature modifiers. Work towards improving validation so in
the future clang's copy of TargetID can be replaced.
Co-authored-by: Claude (Opus 4.8)
[mlir][SparseTensor] Reject sparse encoding on non-primary types (#209591)
SparseTensorConversion rewrite patterns assume element types are valid
primary types, but the dialect does not actually enforce this
restriction. This change makes it so that sparse tensor encodings
gracefully reject invalid primary types by verifying the encoding.
Closes #202787
Supersedes and closes #208913
ZTS: ensure zfs_channel_program_support test is installed
Sponsored-by: TrueNAS
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rob Norris <rob.norris at truenas.com>
Closes #18836
[analyzer] Fix crash in RegionStoreManager::bindArray from constructor array-to-pointer decay (#210649)
ProcessInitializer() strips implicit casts from a CXXCtorInitializer's
init expression via IgnoreImplicit(), then decides whether to treat the
initializer as a direct array-to-array member copy by checking
Init->getType()->isArrayType(). For a pointer member initialized via
array-to-pointer decay of a reference-to-array constructor parameter
(e.g. `Foo(T (&arr)[N]) : ptr_(arr) {}`), IgnoreImplicit() strips the
ArrayToPointerDecay cast, exposing the underlying array-typed
expression, so this check misfires even though the field itself is a
pointer, not an array. That branch fetches the raw region address of the
whole array, bypassing the normal decay logic (which produces an
ElementRegion), so the pointer member ends up holding the address of the
whole array typed as the array itself, instead of an ElementRegion at
index 0.
Later, dereferencing and storing through that mistyped pointer routes
into RegionStoreManager::bindArray() (instead of bindScalar()), which
unconditionally casts its Init value to nonloc::CompoundVal, asserting
[35 lines not shown]
[mlir][Analysis][Presburger] Remove redundant local vars after composition (#211023)
Call `removeRedundantLocalVars()` at the end of
`IntegerRelation::compose` to simplify existential constraints generated
when projecting out intermediate dimensions.
Removing redundant local vars also happens in
`IntegerRelation::mergeAndCompose` and `FlatAffineRelation::compose`.
When composing A->B with B->C, intermediate vars B are converted to
local existential variables. When performing multiple compositions, this
causes bloat of existential variables that impact later performance,
bounds checks, and emptiness checks.
Signed-off-by: Asra Ali <asraa at google.com>