[all-commits] [llvm/llvm-project] 96aaeb: [MachineCopyPropagation] Eliminate spillage copies...

bzEq via All-commits all-commits at lists.llvm.org
Tue Feb 7 19:34:38 PST 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 96aaebd12e734610fe0ef61329f99fdac253ef9f
  Author: Kai Luo <lkail at cn.ibm.com>
  Date:   2023-02-08 (Wed, 08 Feb 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetSubtargetInfo.h
    M llvm/lib/CodeGen/MachineCopyPropagation.cpp
    M llvm/lib/Target/PowerPC/PPCSubtarget.h
    A llvm/test/CodeGen/PowerPC/mcp-elim-eviction-chain.mir

  Log Message:
  [MachineCopyPropagation] Eliminate spillage copies that might be caused by eviction chain

Remove spill-reload like copy chains. For example
r0 = COPY r1
r1 = COPY r2
r2 = COPY r3
r3 = COPY r4
<def-use r4>
r4 = COPY r3
r3 = COPY r2
r2 = COPY r1
r1 = COPY r0
will be folded into
r0 = COPY r1
r1 = COPY r4
<def-use r4>
r4 = COPY r1
r1 = COPY r0

Reviewed By: qcolombet

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

More information about the All-commits mailing list