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/RegAllocBasic.cpp | |
| parent | 4e81890d36133252ffb2309d723c761c71c86f79 (diff) | |
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/RegAllocBasic.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index 18a5a4545221..045c8db9dadb 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -18,7 +18,6 @@ #include "RenderMachineFunction.h" #include "Spiller.h" #include "VirtRegMap.h" -#include "VirtRegRewriter.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" @@ -510,8 +509,7 @@ bool RABasic::runOnMachineFunction(MachineFunction &mf) { #endif // !NDEBUG // Run rewriter - std::auto_ptr<VirtRegRewriter> rewriter(createVirtRegRewriter()); - rewriter->runOnMachineFunction(*MF, *VRM, LIS); + VRM->rewrite(LIS->getSlotIndexes()); // The pass output is in VirtRegMap. Release all the transient data. releaseMemory(); |
