[AMDGPU] Simplify async barrier replay warning checks
Check target eligibility when recording an arrival and skip recognition
when no arrivals are pending. Use the warning storage initializer as
the option default.
AI assisted.
[X86] combineAndnp - don't call SimplifyDemandedVectorElts on ANDNP(X,0)/ANDNP(-1,X) patterns (#248474)
Similar to #246154 and #247575 - trying to use
SimplifyDemandedVectorElts exposes the likelihood of
ANDNP(poison,0)/ANDNP(-1,poison) -> poison propagation and attempting to
use isGuaranteedNotToBeUndefOrPoison often fails with infinite loops due
to the recursion depth limits not detecting a FREEZE thats too deep.
[SLP]Do not group predecessor loads without copyable elements
Grouping single-predecessor loads into the user block when
-slp-copyable-elements=false feeds cross-block loads to gathered-load
vectorization, which fails legality and leaves a userless gather entry.
Fixes #249407
Pull-request: https://github.com/llvm/llvm-project/pull/249412
[CIR][flang][CMake] Migrate generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with actual library dependencies. Declare public header ownership
and keep source shards, bytecode and lowering tables private.
CIRLowering.inc is no longer generated by install-clang-headers; only
transform/lowering sources include it and each consumer lists
CIRLowering. clang_tablegen accepts PRIVATE_TARGET to create it without
registering a global Clang dependency, isolating its output from the
caller's TABLEGEN_OUTPUT. Use add_private_tablegen_target for bytecode
tables, source shards and FIR canonicalization patterns, keeping their
outputs out of later generation targets. Keep
CanonicalizationPatternsIncGen in flang-headers so the header install
still generates every installed .inc file. clangFrontendTool links CIR
libraries privately after creation to preserve LLVM component
visibility, reducing obj.clangInterpreter's prerequisite edges from 579
at the base to 535 and obj.clangFrontendTool's from 1710 to 888.
[21 lines not shown]
[MLIR][CMake] Stop depending on mlir-generic-headers by default
Remove the default mlir-generic-headers dependency from ordinary and
example libraries. Migrate generated-interface requirements to library
owners, including the 17 requirements that become necessary when the
generic default is removed. Keep the compatibility aggregate and
registrations.
MLIRIR also lists MLIRInferIntRangeInterfaceIncGen for Matchers.h. Add
the Transform/Interfaces generator ordering. MLIRDialectUtils uses the
ArithDialect owner for ReshapeOpsUtils.h. Forward MaskableOpInterface's
compile-only MaskingOpInterface dependency through the local helper so
directly compiled libraries receive a bridge too.
MLIRCAPIIR links MLIRInferTypeOpInterface privately. MLIRPass,
MLIRRewrite and MLIRRewritePDL drop their explicit DEPENDS
mlir-generic-headers.
Extend the release note, guide and aggregate-independence regression to
[3 lines not shown]
[MLIR][CMake] Stop depending on mlir-headers by default
Remove the default mlir-headers dependency from the dialect, conversion,
extension and translation library helpers. Keep the aggregate, its
registrations and explicit compatibility dependencies available;
mlir-generic-headers remains a default.
Replace redundant foreign generator edges with library links or
compile-only header owners. Add generator-to-generator ordering where
one generated header includes another. Keep requirements already covered
by generic headers or existing links. MLIRROCDLDialect, MLIRXeVMDialect
and MLIRSPIRVDialect retain private compile-only requirements on
MLIRGPUBase for GPU compilation attribute declarations.
MLIRRewrite drops its PDL generator dependencies; the PDL libraries it
links publish them. Remove redundant C API pass-generator dependencies.
Test aggregate independence for the dialect, conversion, extension and
translation helpers.
[6 lines not shown]
[CMake] Propagate generated headers through link dependencies
llvm_add_library made object libraries wait for whole PUBLIC link
providers to obtain generated headers. Publish marked DEPENDS generators
through the LLVM_GENERATED_HEADERS transitive compile property instead,
and order obj.<name> after the evaluated closure through a
<name>.headers bridge target. PRIVATE and transitive compile
requirements participate without compiling provider objects.
Use COMPILE_ONLY for another library's headers without its
implementation. Keep these items build-local, and create a bridge for
directly compiled libraries only when such an item is present.
llvm_add_generated_header_bridge covers items added later. Existing
Windows PCH variants also wait for the owner's bridge. Executables
compiled through obj.<tool> receive a bridge too, without linking their
object libraries to providers.
Shared libraries republish the interfaces of unkeyed links and
components hidden by shared mode. Explicit PRIVATE component
[39 lines not shown]
[MLIR][docs] Document the CMake infrastructure
Describe MLIR's TableGen, library, visibility, aggregation, installation
and generated-header conventions in one infrastructure guide. Explain
library owners, explicit generators, compile-only requirements and
add_private_tablegen_target for source-only generators.
Document raw-link bridge usage, generated-header ordering and
unsupported compile-only spellings. Describe the aggregate defaults as
they are today. Link the guide from CreatingADialect.md.
Assisted-by: Codex
[CIR][flang][CMake] Migrate generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with actual library dependencies. Declare public header ownership
and keep source shards, bytecode and lowering tables private.
CIRLowering.inc is no longer generated by install-clang-headers; only
transform/lowering sources include it and each consumer lists
CIRLowering. clang_tablegen accepts PRIVATE_TARGET to create it without
registering a global Clang dependency, isolating its output from the
caller's TABLEGEN_OUTPUT. Use add_private_tablegen_target for bytecode
tables, source shards and FIR canonicalization patterns, keeping their
outputs out of later generation targets. Keep
CanonicalizationPatternsIncGen in flang-headers so the header install
still generates every installed .inc file. clangFrontendTool links CIR
libraries privately after creation to preserve LLVM component
visibility, reducing obj.clangInterpreter's prerequisite edges from 579
at the base to 535 and obj.clangFrontendTool's from 1710 to 888.
[21 lines not shown]
[MLIR][CMake] Stop depending on mlir-generic-headers by default
Remove the default mlir-generic-headers dependency from ordinary and
example libraries. Migrate generated-interface requirements to library
owners, including the 17 requirements that become necessary when the
generic default is removed. Keep the compatibility aggregate and
registrations.
MLIRIR also lists MLIRInferIntRangeInterfaceIncGen for Matchers.h. Add
the Transform/Interfaces generator ordering. MLIRDialectUtils uses the
ArithDialect owner for ReshapeOpsUtils.h. Forward MaskableOpInterface's
compile-only MaskingOpInterface dependency through the local helper so
directly compiled libraries receive a bridge too.
MLIRCAPIIR links MLIRInferTypeOpInterface privately. MLIRPass,
MLIRRewrite and MLIRRewritePDL drop their explicit DEPENDS
mlir-generic-headers.
Extend the release note, guide and aggregate-independence regression to
[3 lines not shown]
[MLIR][docs] Document the CMake infrastructure
Describe MLIR's TableGen, library, visibility, aggregation, installation
and generated-header conventions in one infrastructure guide. Explain
library owners, explicit generators, compile-only requirements and
add_private_tablegen_target for source-only generators.
Document raw-link bridge usage, generated-header ordering and
unsupported compile-only spellings. Describe the aggregate defaults as
they are today. Link the guide from CreatingADialect.md.
Assisted-by: Codex
[MLIR][CMake] Stop depending on mlir-headers by default
Remove the default mlir-headers dependency from the dialect, conversion,
extension and translation library helpers. Keep the aggregate, its
registrations and explicit compatibility dependencies available;
mlir-generic-headers remains a default.
Replace redundant foreign generator edges with library links or
compile-only header owners. Add generator-to-generator ordering where
one generated header includes another. Keep requirements already covered
by generic headers or existing links. MLIRROCDLDialect, MLIRXeVMDialect
and MLIRSPIRVDialect retain private compile-only requirements on
MLIRGPUBase for GPU compilation attribute declarations.
MLIRRewrite drops its PDL generator dependencies; the PDL libraries it
links publish them. Remove redundant C API pass-generator dependencies.
Test aggregate independence for the dialect, conversion, extension and
translation helpers.
[6 lines not shown]
[CMake] Propagate generated headers through link dependencies
llvm_add_library made object libraries wait for whole PUBLIC link
providers to obtain generated headers. Publish marked DEPENDS generators
through the LLVM_GENERATED_HEADERS transitive compile property instead,
and order obj.<name> after the evaluated closure through a
<name>.headers bridge target. PRIVATE and transitive compile
requirements participate without compiling provider objects.
Use COMPILE_ONLY for another library's headers without its
implementation. Keep these items build-local, and create a bridge for
directly compiled libraries only when such an item is present.
llvm_add_generated_header_bridge covers items added later. Existing
Windows PCH variants also wait for the owner's bridge. Executables
compiled through obj.<tool> receive a bridge too, without linking their
object libraries to providers.
Shared libraries republish the interfaces of unkeyed links and
components hidden by shared mode. Explicit PRIVATE component
[35 lines not shown]
[MachineScheduler] Don't constrain copies that cannot be coalesced (#244227)
CopyConstrain adds weak edges that order the other uses of a copy's
source before the copy. This shortens the source's live range, so that
register allocation can give both sides of the copy the same physical
register and turn it into a no-op.
That is only possible for copies that CoalescerPair accepts. A copy
between register banks (for example in AArch64 FPR to GPR fmov) can
not be eliminated in this way, but it was constrained all the same.
This introduces weak edges which the scheduler will try to satisfy.
This is not a NFC: the schedule of functions that contain such a copy
changes. Most of the test churn is just reordered instructions.
By removing these scheduling constraints we allow more flexibility for
other
heuristics, such as macro fusion.
[ExpandMemCmp] Enable IRBuilder GEP canonicalization (#249397)
While here, also switch to the CreatePtrAdd API, as that's what is
happening under the hood anyway.
Assisted-by: LLM
[CI] Check Linux premerge build dependencies with Ninja (#248842)
Run missingdeps after the Linux build and tests to detect missing
dependency paths to generated files.
Assisted-by: Codex
[X86] Add nounwind to remove cfi noise from codegen tests (#249392)
These tests have no use for control flow metadata and it just makes the
test less readable
[VPlan] Only treat i8 GEPs by the step as pointer IV increments (#249386)
getOptimizableIVOf treated any GEP of a pointer induction by its step
value as the IV increment. The pointer induction step is in bytes, so a
GEP with a wider source element type, e.g.
getelementptr i32, ptr %iv, i64 4 for a 4-byte step, adds a multiple of
the step and its exit value was wrongly computed as the IV end value.
Require an i8 GEP.
[CI] Check Linux premerge build dependencies with Ninja
Run missingdeps at the end of monolithic-linux.sh, after project checks
and both runtime reconfigurations, so compiler dependencies have been
recorded. Include the selected check targets alongside all.
Use start-group to give the check a named log section, and capture its
output in ninja_missingdeps.log for artifact collection. Keep the check
in the shared Linux build script rather than a GitHub-only workflow
step.
Validated shell syntax, workflow YAML, and a whole-script harness with
real Ninja dependency checks. The check runs after all build phases,
records diagnostics, fails for a missing generator dependency, and
passes when that dependency is declared.
Assisted-by: Codex
[VPlan] Fix crash on select-conditioned partial reductions. (#249385)
transformToPartialReduction cast the select of the reduction update and
phi to VPInstruction, but a select from the original loop is a
VPWidenRecipe. Use VPSingleDefRecipe instead, and insert the partial
reduction at the select, where its condition is defined.
[CIR][flang][CMake] Migrate generated-header dependencies
Replace CIR's mlir-headers dependencies and Flang's global MLIR library
lists with actual library dependencies. Declare public header ownership
and keep source shards, bytecode and lowering tables private.
CIRLowering.inc is no longer generated by install-clang-headers; only
transform/lowering sources include it and each consumer lists
CIRLowering. clang_tablegen accepts PRIVATE_TARGET to create it without
registering a global Clang dependency, isolating its output from the
caller's TABLEGEN_OUTPUT. Use add_private_tablegen_target for bytecode
tables, source shards and FIR canonicalization patterns, keeping their
outputs out of later generation targets. Keep
CanonicalizationPatternsIncGen in flang-headers so the header install
still generates every installed .inc file. clangFrontendTool links CIR
libraries privately after creation to preserve LLVM component
visibility, reducing obj.clangInterpreter's prerequisite edges from 579
at the base to 535 and obj.clangFrontendTool's from 1710 to 888.
[21 lines not shown]
[MLIR][CMake] Stop depending on mlir-headers by default
Remove the default mlir-headers dependency from the dialect, conversion,
extension and translation library helpers. Keep the aggregate, its
registrations and explicit compatibility dependencies available;
mlir-generic-headers remains a default.
Replace redundant foreign generator edges with library links or
compile-only header owners. Add generator-to-generator ordering where
one generated header includes another. Keep requirements already covered
by generic headers or existing links. MLIRROCDLDialect, MLIRXeVMDialect
and MLIRSPIRVDialect retain private compile-only requirements on
MLIRGPUBase for GPU compilation attribute declarations.
MLIRRewrite drops its PDL generator dependencies; the PDL libraries it
links publish them. Remove redundant C API pass-generator dependencies.
Test aggregate independence for the dialect, conversion, extension and
translation helpers.
[6 lines not shown]
[MLIR][CMake] Stop depending on mlir-generic-headers by default
Remove the default mlir-generic-headers dependency from ordinary and
example libraries. Migrate generated-interface requirements to library
owners, including the 17 requirements that become necessary when the
generic default is removed. Keep the compatibility aggregate and
registrations.
MLIRIR also lists MLIRInferIntRangeInterfaceIncGen for Matchers.h. Add
the Transform/Interfaces generator ordering. MLIRDialectUtils uses the
ArithDialect owner for ReshapeOpsUtils.h. Forward MaskableOpInterface's
compile-only MaskingOpInterface dependency through the local helper so
directly compiled libraries receive a bridge too.
MLIRCAPIIR links MLIRInferTypeOpInterface privately. MLIRPass,
MLIRRewrite and MLIRRewritePDL drop their explicit DEPENDS
mlir-generic-headers.
Extend the release note, guide and aggregate-independence regression to
[3 lines not shown]