diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-18 22:03:18 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-02-18 22:03:18 +0000 |
| commit | 5bfec69b1d3c5e57db530e325f1a7fd19bf0fea4 (patch) | |
| tree | dee9b2df66a57a030534b7546fe9b2cf1ece1205 /llvm/lib/CodeGen/RegAllocGreedy.cpp | |
| parent | 4e81890d36133252ffb2309d723c761c71c86f79 (diff) | |
| download | bcm5719-llvm-5bfec69b1d3c5e57db530e325f1a7fd19bf0fea4.tar.gz bcm5719-llvm-5bfec69b1d3c5e57db530e325f1a7fd19bf0fea4.zip | |
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.
llvm-svn: 125967
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocGreedy.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocGreedy.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index 7c35ceb1f56..c4080aef860 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -21,7 +21,6 @@ #include "SpillPlacement.h" #include "SplitKit.h" #include "VirtRegMap.h" -#include "VirtRegRewriter.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Function.h" @@ -1273,8 +1272,7 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) { // Run rewriter { NamedRegionTimer T("Rewriter", TimerGroupName, TimePassesIsEnabled); - std::auto_ptr<VirtRegRewriter> rewriter(createVirtRegRewriter()); - rewriter->runOnMachineFunction(*MF, *VRM, LIS); + VRM->rewrite(Indexes); } // The pass output is in VirtRegMap. Release all the transient data. |

