[all-commits] [llvm/llvm-project] 327557: [JumpThreading] Put a limit on the PHI nodes when ...

Usman Nadeem via All-commits all-commits at lists.llvm.org
Mon Oct 31 15:52:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32755786e02083980e177841bda30560dddf7685
      https://github.com/llvm/llvm-project/commit/32755786e02083980e177841bda30560dddf7685
  Author: Usman Nadeem <mnadeem at quicinc.com>
  Date:   2022-10-31 (Mon, 31 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp

  Log Message:
  -----------
  [JumpThreading] Put a limit on the PHI nodes when duplicating a BB.

Do not duplicate a BB if it has a lot of PHI nodes.
If a threadable chain is too long then the number of duplicated PHI nodes
can add up, leading to a substantial increase in compile time when rewriting
the SSA.

Fixes https://github.com/llvm/llvm-project/issues/58203
Differential Revision: https://reviews.llvm.org/D136716

The threshold of 76 in this patch is reasonably high and reduces the compile
time of cldwat2m_macro.f90 in SPEC2017/cam4 from 80+min to <2min.

Change-Id: I153c89a8e0d89b206a5193dc1b908c67e320717e




More information about the All-commits mailing list