[all-commits] [llvm/llvm-project] 72e0b5: [ConstraintSys] Solve sub-system with variables ne...

Florian Hahn via All-commits all-commits at lists.llvm.org
Mon Jul 20 01:30:09 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72e0b55f9b1fd69030d7e9853a708bfd2fba36ec
      https://github.com/llvm/llvm-project/commit/72e0b55f9b1fd69030d7e9853a708bfd2fba36ec
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2026-07-20 (Mon, 20 Jul 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/ConstraintSystem.h
    M llvm/lib/Analysis/ConstraintSystem.cpp
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/gep-arithmetic-signed-predicates.ll

  Log Message:
  -----------
  [ConstraintSys] Solve sub-system with variables needed for query (#210432)

Update ConstraintSystem to only solve the sub-system containing all
variables relevant to a given query.

The sub-system contains the transitive closure of all variables in rows
involving the variables in the constraint to prove.

The iterative collection loop only needs very few iterations to
complete. The pruned system can significantly speed up Fourier–Motzkin
elimination and reduce the cost of copying the system.

This helps to notably decrease compile-time in cases when there are
larger numbers of variables & rows (especially during (Thin)LTO).

Highlights include
 * stage1-ReleaseThinLTO: -0.16%
 * stage1-ReleaseLTO-g: -0.19%
 * stage1-aarch64-O3: -0.04%


https://llvm-compile-time-tracker.com/compare.php?from=1f2772f8e26beb909c2a559f1fb08697e3e06909&to=77fbe7926609da96a193254e44efd1d6f8a097de&stat=instructions%3Au

Note that we will now stop to simplify conditions in code we proved
dead/unreachable earlier; previously, unrelated constraints in the
system that form contradictions would allow proving any unrelated fact.
After pruning, unrelated facts will no longer contribute.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list