[all-commits] [llvm/llvm-project] 6f9640: [RegAlloc] Add a complexity limit in growRegion() ...

vporpo via All-commits all-commits at lists.llvm.org
Thu Mar 3 11:34:51 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f9640d6a3d57eaa2d0467d94a7b87963fbe53d7
      https://github.com/llvm/llvm-project/commit/6f9640d6a3d57eaa2d0467d94a7b87963fbe53d7
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-03-03 (Thu, 03 Mar 2022)

  Changed paths:
    M llvm/lib/CodeGen/RegAllocGreedy.cpp

  Log Message:
  -----------
  [RegAlloc] Add a complexity limit in growRegion() to cap compilation time.

growRegion() does not scale in code with BBs with a very large number of edges.
In such code growRegion() becomes a compile-time bottleneck, consuming 60% of
the total compilation time.
This patch adds a limit to the complexity of growRegion() by incrementing a counter
in each iteration. We bail out once the limit is reached.

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




More information about the All-commits mailing list