[all-commits] [llvm/llvm-project] b32b70: [ConstraintSystem] Use sparse representation for c...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Feb 16 06:45:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b32b7068ef8e6e9b34e7e85f5c1b76b01b28755a
      https://github.com/llvm/llvm-project/commit/b32b7068ef8e6e9b34e7e85f5c1b76b01b28755a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-02-16 (Thu, 16 Feb 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/ConstraintSystem.h
    M llvm/lib/Analysis/ConstraintSystem.cpp

  Log Message:
  -----------
  [ConstraintSystem] Use sparse representation for constraints. (NFC)

Update ConstraintSystem to use a sparse representation for entries in a
row. Most rows only contain a small number of variables, so the sparse
representation can result in significant speedups.

For a large test case from D135915, it halves the time spent in
ConstraintElimination.

To ensure this returns the same results as the old implementation in all
cases, I built a large set of projects with an extra assertion that it
produces the same result as the old implementation.




More information about the All-commits mailing list