[PATCH] D23408: AMDGPU/SI: Avoid creating unnecessary copies in the SIFixSGPRCopies pass

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 09:25:43 PDT 2016


tstellarAMD created this revision.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.

1. Don't try to copy values to and from the same register class.
2. Replace copies with of registers with immediate values with v_mov/s_mov
   instructions.

The main purpose of this change is to make MachineSink do a better job of
determining when it is beneficial to split a critical edge, since the pass
assumes that copies will become move instructions.

This prevents a regression in uniform-cfg.ll if we enable critical edge
splitting for AMDGPU.

https://reviews.llvm.org/D23408

Files:
  lib/Target/AMDGPU/SIInstrInfo.cpp
  lib/Target/AMDGPU/SIInstrInfo.h
  lib/Target/AMDGPU/SIRegisterInfo.cpp
  lib/Target/AMDGPU/SIRegisterInfo.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23408.67695.patch
Type: text/x-patch
Size: 6415 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160811/1bf6564c/attachment.bin>


More information about the llvm-commits mailing list