[all-commits] [llvm/llvm-project] e1bae2: [SCCP] do not clean up dead blocks that have their...

Nick Desaulniers via All-commits all-commits at lists.llvm.org
Fri Mar 18 11:02:33 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e1bae23f6f2b35b9cfe249eab68209a00bacf8ee
      https://github.com/llvm/llvm-project/commit/e1bae23f6f2b35b9cfe249eab68209a00bacf8ee
  Author: Nick Desaulniers <ndesaulniers at google.com>
  Date:   2022-03-18 (Fri, 18 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp
    M llvm/test/Transforms/SCCP/dangling-block-address.ll

  Log Message:
  -----------
  [SCCP] do not clean up dead blocks that have their address taken

[SCCP] do not clean up dead blocks that have their address taken

Fixes a crash observed in IPSCCP.

Because the SCCPSolver has already internalized BlockAddresses as
Constants or ConstantExprs, we don't want to try to update their Values
in the ValueLatticeElement. Instead, continue to propagate these
BlockAddress Constants, continue converting BasicBlocks to unreachable,
but don't delete the "dead" BasicBlocks which happen to have their
address taken.  Leave replacing the BlockAddresses to another pass.

Fixes: https://github.com/llvm/llvm-project/issues/54238
Fixes: https://github.com/llvm/llvm-project/issues/54251

Reviewed By: nikic

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




More information about the All-commits mailing list