[all-commits] [llvm/llvm-project] 8f0466: [DSE] Unify & fix mem terminator location checks.

Florian Hahn via All-commits all-commits at lists.llvm.org
Sat Sep 26 05:54:55 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f0466edc0cb3782af4108bfe8840e2ad3de9b49
      https://github.com/llvm/llvm-project/commit/8f0466edc0cb3782af4108bfe8840e2ad3de9b49
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-09-26 (Sat, 26 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/test/Transforms/DeadStoreElimination/MSSA/lifetime.ll

  Log Message:
  -----------
  [DSE] Unify & fix mem terminator location checks.

When looking for memory defs killed by memory terminators the code
currently incorrectly ignores the size argument of llvm.lifetime.end.

This patch updates the code to use isMemTerminator and updates
isMemTerminator to use isOverwrite() to make sure locations that are
outside the range marked as dead by llvm.lifetime.end are not
considered. Note that isOverwrite is only used for llvm.lifetime.end,
because free-like functions make the whole underlying object dead.




More information about the All-commits mailing list