[all-commits] [llvm/llvm-project] 72750f: [TrivialDeadness] Introduce API separating two dif...

annamthomas via All-commits all-commits at lists.llvm.org
Fri Dec 3 07:10:18 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 72750f00121eb10f27ccd62270e5695d9e3322a5
  Author: Anna Thomas <anna at azul.com>
  Date:   2021-12-03 (Fri, 03 Dec 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/Utils/Local.h
    M llvm/lib/Transforms/Utils/Local.cpp

  Log Message:
  [TrivialDeadness] Introduce API separating two different usages

The earlier usage of wouldInstructionBeTriviallyDead is based on the
assumption that the use_count of that instruction being checked will be
zero. This patch separates the API into two different ones:

1. The strictly conservative one where the instruction is trivially dead iff the uses are dead.
2. The slightly relaxed form, where an instruction is dead along paths where it is not used.

The second form can be used in identifying instructions that are valid
to sink down to uses (D109917).

Reviewed-By: reames
Differential Revision: https://reviews.llvm.org/D114647

More information about the All-commits mailing list