[all-commits] [llvm/llvm-project] 4e62c6: [DSE] Eliminate stores at the end of the function.

Florian Hahn via All-commits all-commits at lists.llvm.org
Wed Jun 24 04:59:00 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e62c6359c7f9c0939c2a9072f8f1c41b2628412
      https://github.com/llvm/llvm-project/commit/4e62c6359c7f9c0939c2a9072f8f1c41b2628412
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-06-24 (Wed, 24 Jun 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/test/Transforms/DeadStoreElimination/MSSA/2011-09-06-EndOfFunction.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/libcalls.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/mda-with-dbg-values.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/memintrinsics.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-captures.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-exceptions.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-malloc-free.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-memintrinsics.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-multipath.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/multiblock-simple.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/operand-bundles.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/simple-todo.ll
    M llvm/test/Transforms/DeadStoreElimination/MSSA/simple.ll

  Log Message:
  -----------
  [DSE] Eliminate stores at the end of the function.

This patch add support for eliminating MemoryDefs that do not have any
aliasing users, which indicates that there are no reads/writes to the
memory location until the end of the function.

To eliminate such defs, we have to ensure that the underlying object is
not visible in the caller and does not escape via returning. We need a
separate check for that, as InvisibleToCaller does not consider returns.

Reviewers: dmgreen, rnk, efriedma, bryant, asbirlea, Tyker, george.burgess.iv

Reviewed By: asbirlea

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




More information about the All-commits mailing list