summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Job.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-07-28 21:45:50 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-07-28 21:45:50 +0000
commit3c235763e5b1ddb7db5ab01af08e0e9e9fb28967 (patch)
tree60dcee492955ae28ec97c03d10552d4256b5f60f /clang/lib/Driver/Job.cpp
parent9876946aee62bbe1e963200a0e55e2fd785c5a88 (diff)
downloadbcm5719-llvm-3c235763e5b1ddb7db5ab01af08e0e9e9fb28967.tar.gz
bcm5719-llvm-3c235763e5b1ddb7db5ab01af08e0e9e9fb28967.zip
[PeepholeOptimizer] Look through PHIs to find additional register sources
Reapply 243271 with more fixes; although we are not handling multiple sources with coalescable copies, we were not properly skipping this case. - 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: 243486
Diffstat (limited to 'clang/lib/Driver/Job.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud