summaryrefslogtreecommitdiff
path: root/lib/CodeGen/VirtRegMap.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-18 22:03:18 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-02-18 22:03:18 +0000
commitba05c01dabc40373760a20c874103fc58d4377f0 (patch)
tree487731548cc0b61e10b46c9f2c2120148658f9fc /lib/CodeGen/VirtRegMap.h
parentd8c87888a71c4433d76b48bca6c3e03a17890648 (diff)
downloadllvm-ba05c01dabc40373760a20c874103fc58d4377f0.tar.gz
llvm-ba05c01dabc40373760a20c874103fc58d4377f0.tar.bz2
llvm-ba05c01dabc40373760a20c874103fc58d4377f0.tar.xz
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
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r--lib/CodeGen/VirtRegMap.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index cbc96bbd4f..a43ac5fc82 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -35,6 +35,7 @@ namespace llvm {
class TargetInstrInfo;
class TargetRegisterInfo;
class raw_ostream;
+ class SlotIndexes;
class VirtRegMap : public MachineFunctionPass {
public:
@@ -493,6 +494,13 @@ namespace llvm {
return 0;
}
+ /// rewrite - Rewrite all instructions in MF to use only physical registers
+ /// by mapping all virtual register operands to their assigned physical
+ /// registers.
+ ///
+ /// @param Indexes Optionally remove deleted instructions from indexes.
+ void rewrite(SlotIndexes *Indexes);
+
void print(raw_ostream &OS, const Module* M = 0) const;
void dump() const;
};