[all-commits] [llvm/llvm-project] 6c25c5: [ConstraintElim] Track and simplify conditions at ...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jun 27 09:28:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c25c58a4d7caa0337d36bb8c41546f2002130d1
      https://github.com/llvm/llvm-project/commit/6c25c58a4d7caa0337d36bb8c41546f2002130d1
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/and-implied-by-operands.ll
    M llvm/test/Transforms/ConstraintElimination/assumes.ll
    M llvm/test/Transforms/ConstraintElimination/cond-used-in-phi.ll
    M llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis-crashes.ll
    M llvm/test/Transforms/ConstraintElimination/uses-in-different-blocks.ll

  Log Message:
  -----------
  [ConstraintElim] Track and simplify conditions at use.

This patch updates ConstraintElimination to track uses of conditions in
the worklist. This allows simplifying conditions using the context that
holds directly at the condition, instead of where the condition is
defined.

This allows us to catch more cases in practice: there are multiple
code-size changes for CTMark while compile-time remains unchanged:
https://llvm-compile-time-tracker.com/compare.php?from=4b020cca9363bebab4643f89cfa92ab2fcc7976c&to=7a6e84b8f029713c137814cd46eec775d24a54a1&stat=instructions:u

This should help to simplify D151799.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D153660




More information about the All-commits mailing list