[PATCH] D89187: [AMDGPU] Minimize number of s_mov generated by copyPhysReg
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 12 09:30:43 PDT 2020
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:645-653
+ // Peek ahead to check for registers immediately being overwritten.
+ // This is intended to eliminate duplicate register writes from
+ // pattern suchs as:
+ // $sgpr4_sgpr5_sgpr6_sgpr7 = COPY $sgpr28_sgpr29_sgpr30_sgpr31
+ // $sgpr4 = COPY killed $sgpr1
+ // $sgpr5 = COPY killed $sgpr2
+ SmallSet<Register, 4> OverwrittenSGPRs;
----------------
Can we do something earlier? I don't think copyPhysReg should be considering context beyond the given instruction
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89187/new/
https://reviews.llvm.org/D89187
More information about the llvm-commits
mailing list