[all-commits] [llvm/llvm-project] 58a0e4: [instcombine] Allow sinking of calls with known wr...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Jan 5 10:37:38 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 58a0e449e175e9ae48632b4bda1df1fc87f81323
      https://github.com/llvm/llvm-project/commit/58a0e449e175e9ae48632b4bda1df1fc87f81323
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/sink_sideeffecting_instruction.ll

  Log Message:
  -----------
  [instcombine] Allow sinking of calls with known writes to uses

If we have a call whose only side effect is a write to a location which is known to be dead, we can sink said call to the users of the call's result value. This is analogous to the recent changes to delete said calls if unused, but framed as a sinking transform instead.

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




More information about the All-commits mailing list