aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineSSAUpdater.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-05-04 23:18:19 +0000
committerBob Wilson <bob.wilson@apple.com>2010-05-04 23:18:19 +0000
commit4aad88d1fd88413029dd05255306b07cb19396ee (patch)
treebbb590fd0da0108b276685a885a29d59db935ec1 /include/llvm/CodeGen/MachineSSAUpdater.h
parentd2760d1cba46e60011b04be70a4da047a21542ff (diff)
Combine the implementations of the core part of the SSAUpdater and
MachineSSAUpdater to avoid duplicating all the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineSSAUpdater.h')
-rw-r--r--include/llvm/CodeGen/MachineSSAUpdater.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/include/llvm/CodeGen/MachineSSAUpdater.h b/include/llvm/CodeGen/MachineSSAUpdater.h
index 979ef0113b..cbb45a7127 100644
--- a/include/llvm/CodeGen/MachineSSAUpdater.h
+++ b/include/llvm/CodeGen/MachineSSAUpdater.h
@@ -23,6 +23,7 @@ namespace llvm {
class TargetInstrInfo;
class TargetRegisterClass;
template<typename T> class SmallVectorImpl;
+ template<typename T> class SSAUpdaterTraits;
class BumpPtrAllocator;
/// MachineSSAUpdater - This class updates SSA form for a set of virtual
@@ -30,9 +31,7 @@ namespace llvm {
/// or another unstructured transformation wants to rewrite a set of uses of one
/// vreg with uses of a set of vregs.
class MachineSSAUpdater {
-public:
- class BBInfo;
- typedef SmallVectorImpl<BBInfo*> BlockListTy;
+ friend class SSAUpdaterTraits<MachineSSAUpdater>;
private:
/// AvailableVals - This keeps track of which value to use on a per-block
@@ -40,11 +39,6 @@ private:
//typedef DenseMap<MachineBasicBlock*, unsigned > AvailableValsTy;
void *AV;
- /// BBMap - The GetValueAtEndOfBlock method maintains this mapping from
- /// basic blocks to BBInfo structures.
- /// typedef DenseMap<MachineBasicBlock*, BBInfo*> BBMapTy;
- void *BM;
-
/// VR - Current virtual register whose uses are being updated.
unsigned VR;
@@ -111,14 +105,6 @@ public:
private:
void ReplaceRegWith(unsigned OldReg, unsigned NewReg);
unsigned GetValueAtEndOfBlockInternal(MachineBasicBlock *BB);
- void BuildBlockList(MachineBasicBlock *BB, BlockListTy *BlockList,
- BumpPtrAllocator *Allocator);
- void FindDominators(BlockListTy *BlockList);
- void FindPHIPlacement(BlockListTy *BlockList);
- void FindAvailableVals(BlockListTy *BlockList);
- void FindExistingPHI(MachineBasicBlock *BB, BlockListTy *BlockList);
- bool CheckIfPHIMatches(MachineInstr *PHI);
- void RecordMatchingPHI(MachineInstr *PHI);
void operator=(const MachineSSAUpdater&); // DO NOT IMPLEMENT
MachineSSAUpdater(const MachineSSAUpdater&); // DO NOT IMPLEMENT