[all-commits] [llvm/llvm-project] d03d3d: [DSE] Fall back to CFG scan for unreachable termin...

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Feb 16 06:07:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d03d3d7966d1efdcf0629f037ffee94317385b6b
      https://github.com/llvm/llvm-project/commit/d03d3d7966d1efdcf0629f037ffee94317385b6b
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-02-16 (Wed, 16 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/test/Transforms/DeadStoreElimination/multiblock-unreachable.ll

  Log Message:
  -----------
  [DSE] Fall back to CFG scan for unreachable terminators.

Blocks with UnreachableInst terminators are considered as root nodes in
the PDT. This pessimize DSE, if there are no aliasing reads from the
potentially dead store and the block with the unreachable terminator.

If any of the root nodes of the PDF has UnreachableInst as terminator,
fall back to the CFG scan, even the common dominator of all killing
blocks does not post-dominate the block with potentially dead store.

It looks like the compile-time impact for the extra scans is negligible.
https://llvm-compile-time-tracker.com/compare.php?from=779bbbf27fe631154bdfaac7a443f198d4654688&to=ac59945f1bec1c6a7d7f5590c8c69fd9c5369c53&stat=instructions

Fixes #53800.

Reviewed By: nikic

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




More information about the All-commits mailing list