Refactor optimizeUncoalescable logic
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 15 Jul 2015 15:35:09 +0000 (15:35 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 15 Jul 2015 15:35:09 +0000 (15:35 +0000)
commit7c72a2254c47f576a40dd456521a969f0ec76f92
treef86ff4ad3cb7a08727828e4564f47007b51f8442
parent9226c071b0065918ce487872895f7dae35ce2382
Refactor optimizeUncoalescable logic

- Create a new CopyRewriter for Uncoalescable copy-like instructions
- Change the ValueTracker to return a ValueTrackerResult

This makes optimizeUncoalescable looks more like optimizeCoalescable and
use the CopyRewritter infrastructure.

This is also the preparation for looking up into PHI nodes in the
ValueTracker.

Differential Revision: http://reviews.llvm.org/D11195

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242294 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/PeepholeOptimizer.cpp