[all-commits] [llvm/llvm-project] 49ab76: [DagCombine] Increase depth by number of operands ...

Alina Sbirlea via All-commits all-commits at lists.llvm.org
Wed Feb 9 13:35:27 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49ab760090514dcbf84bd9dc7429146c4ca578ef
      https://github.com/llvm/llvm-project/commit/49ab760090514dcbf84bd9dc7429146c4ca578ef
  Author: Alina Sbirlea <asbirlea at google.com>
  Date:   2022-02-09 (Wed, 09 Feb 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

  Log Message:
  -----------
  [DagCombine] Increase depth by number of operands to avoid a pathological compile time.

We're hitting a pathological compile-time case, profiled to be in
DagCombiner::visitTokenFactor and many inserts into a SmallPtrSet.
It looks like one of the paths around findBetterNeighborChains is not
capped and leads to this.

This patch resolves the issue. Looking for feedback if this solution
looks reasonable.

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




More information about the All-commits mailing list