[all-commits] [llvm/llvm-project] cd4aab: [Attributor] Liveness for values

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Oct 30 22:17:00 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cd4aab4a8ac43dd661f132fd940bc80828788fda
      https://github.com/llvm/llvm-project/commit/cd4aab4a8ac43dd661f132fd940bc80828788fda
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/FunctionAttrs/align.ll
    M llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll
    M llvm/test/Transforms/FunctionAttrs/arg_returned.ll
    M llvm/test/Transforms/FunctionAttrs/liveness.ll
    M llvm/test/Transforms/FunctionAttrs/misc.ll
    M llvm/test/Transforms/FunctionAttrs/new_attributes.ll
    M llvm/test/Transforms/FunctionAttrs/noalias_returned.ll
    M llvm/test/Transforms/FunctionAttrs/nonnull.ll

  Log Message:
  -----------
  [Attributor] Liveness for values

Summary:
This patch introduces liveness (AAIsDead) for all positions, thus for
all kinds of values. For now, we say an instruction is dead if it would
be removed assuming all users are dead. A call site return is different
as we just look at the users. If all call site returns have been
eliminated, the return values can return undef instead of their original
value, eliminating uses.

We try to recursively delete dead instructions now and we introduce a
simple check interface for use-traversal.

This is the idea tried out in D68626 but implemented in the right way.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list