[all-commits] [llvm/llvm-project] eb2cad: [DSE] Make isRemovable() for calls more robust (NFCI)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 17 11:53:51 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: eb2cad8329b0526b6b4e9deaf7187530012a64f1
      https://github.com/llvm/llvm-project/commit/eb2cad8329b0526b6b4e9deaf7187530012a64f1
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-17 (Fri, 17 Dec 2021)

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

  Log Message:
  -----------
  [DSE] Make isRemovable() for calls more robust (NFCI)

We can only drop calls if they have an analyzable write, the return
value is not used, they don't throw and they don't diverge. The last
two conditions were previously not checked, because all the libcalls
with analyzable writes already happened to satisfy those conditions
anyway. This may not be true for generalizations (with D115904 in mind).

No test changes because the necessary attributes are already inferred
for currently supported libcalls.

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




More information about the All-commits mailing list