summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-07-15 15:35:23 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-07-15 15:35:23 +0000
commitfadd4fef2ae0b728a270d80ecc9e4a377d970837 (patch)
tree8105c2e2e29727ad0d2f27bc870656299006b2cf /llvm/lib/Target/PowerPC/PPCISelLowering.cpp
parentbd68a095913f0132f07ed831f4318d6b7f5e2945 (diff)
downloadbcm5719-llvm-fadd4fef2ae0b728a270d80ecc9e4a377d970837.tar.gz
bcm5719-llvm-fadd4fef2ae0b728a270d80ecc9e4a377d970837.zip
Look through PHIs to find additional register sources
- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI instructions. - Add findNextSourceAndRewritePHI method to lookup into multiple sources returnted by the ValueTracker and rewrite PHIs with new sources. With these changes we can find more register sources and rewrite more copies to allow coaslescing of bitcast instructions. Hence, we eliminate unnecessary VR64 <-> GR64 copies in x86, but it could be extended to other archs by marking "isBitcast" on target specific instructions. The x86 example follows: A: psllq %mm1, %mm0 movd %mm0, %r9 jmp C B: por %mm1, %mm0 movd %mm0, %r9 jmp C C: movd %r9, %mm0 pshufw $238, %mm0, %mm0 Becomes: A: psllq %mm1, %mm0 jmp C B: por %mm1, %mm0 jmp C C: pshufw $238, %mm0, %mm0 Differential Revision: http://reviews.llvm.org/D11197 rdar://problem/20404526 llvm-svn: 242295
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud