[PeepholeOptimizer] Refactor optimizeUncoalescable logic
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 22 Jul 2015 21:30:16 +0000 (21:30 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 22 Jul 2015 21:30:16 +0000 (21:30 +0000)
commite7aafe5ecc3a639c52b14707af91c8b36db0826b
tree2bd00f2cce5a8271f9d72fee46e135a99b80eb16
parentb18e7bdac85c58f5b3389e579b3abe9e78ad3f9a
[PeepholeOptimizer] Refactor optimizeUncoalescable logic

Reapply r242294.

- 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.

rdar://problem/20404526

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

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