Add VirtRegMap::rewrite() and use it in the new register allocators.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 Feb 2011 22:03:18 +0000 (22:03 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 18 Feb 2011 22:03:18 +0000 (22:03 +0000)
commitba05c01dabc40373760a20c874103fc58d4377f0
tree487731548cc0b61e10b46c9f2c2120148658f9fc
parentd8c87888a71c4433d76b48bca6c3e03a17890648
Add VirtRegMap::rewrite() and use it in the new register allocators.

The rewriter works almost identically to -rewriter=trivial, except it also
eliminates any identity copies.

This makes the new register allocators independent of VirtRegRewriter.cpp which
will be going away at the same time as RegAllocLinearScan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125967 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocBasic.cpp
lib/CodeGen/RegAllocGreedy.cpp
lib/CodeGen/VirtRegMap.cpp
lib/CodeGen/VirtRegMap.h