[all-commits] [llvm/llvm-project] 273e74: [LCSSA] Cache the loop exit blocks across recursiv...

Teresa Johnson via All-commits all-commits at lists.llvm.org
Tue Jul 30 15:34:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 273e74b4458fa0d11cafb31b5b2164a8d2006541
      https://github.com/llvm/llvm-project/commit/273e74b4458fa0d11cafb31b5b2164a8d2006541
  Author: Teresa Johnson <tejohnson at google.com>
  Date:   2024-07-30 (Tue, 30 Jul 2024)

  Changed paths:
    M llvm/lib/Transforms/Utils/LCSSA.cpp

  Log Message:
  -----------
  [LCSSA] Cache the loop exit blocks across recursive analysis (NFC) (#101087)

The computation of loop exit blocks recently showed up as a huge compile
time cost for a large file. This computation was already being cached
during an invocation of formLCSSAForInstructions, but can also be cached
across callers formLCSSA and formLCSSARecursively (the latter was what
was being invoked in the examined case).

Since each of these functions has an external entry point invoked from
other passes, doing so required refactoring each into a worker mechanism
that takes a LoopExitBlocks map, and the externally callable version
that declares the map. That way we can pass it down from the outermost
formLCSSARecursively.

This reduced the time spent in the LCSSA pass from ~110s to ~1s.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list