[all-commits] [llvm/llvm-project] 23d45e: [MCP] Remove dead copies from basic blocks with su...

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Mar 28 14:44:10 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 23d45e55edb0ca4567f5876e7051ff4a649213df
      https://github.com/llvm/llvm-project/commit/23d45e55edb0ca4567f5876e7051ff4a649213df
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-03-28 (Thu, 28 Mar 2024)

  Changed paths:
    M llvm/lib/CodeGen/MachineCopyPropagation.cpp
    M llvm/test/CodeGen/AArch64/machine-cp-sub-reg.mir
    M llvm/test/CodeGen/AArch64/ragreedy-local-interval-cost.ll
    M llvm/test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
    M llvm/test/CodeGen/PowerPC/stack-restore-with-setjmp.ll
    M llvm/test/CodeGen/Thumb2/aligned-nonfallthrough.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-increment.ll
    M llvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll
    M llvm/test/CodeGen/Thumb2/mve-laneinterleaving-reduct.ll
    M llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll
    M llvm/test/CodeGen/Thumb2/mve-vldst4.ll
    M llvm/test/CodeGen/X86/optimize-max-0.ll
    M llvm/test/CodeGen/X86/tls-loads-control3.ll

  Log Message:
  -----------
  [MCP] Remove dead copies from basic blocks with successors. (#86973)

Previously we wouldn't remove dead copies from basic blocks with
successors. The comment said we didn't want to trust the live-in lists.
The comment is very old so I'm not sure if that's still a concern today.

This patch checks the live-in lists and removes copies from
MaybeDeadCopies if they are referenced by any live-ins in any
successors. We only do this if the tracksLiveness property is set. If
that property is not set, we retain the old behavior.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list