summaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-02-17 19:13:56 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-02-17 19:13:56 +0000
commit1bf1691ed3bf4cb16ea221f062f1bb978fc8ea9d (patch)
treefd4ae94fb33e196f0a27ccc81b98af12bad4689c /lib/CodeGen/PHIElimination.h
parentf3047cdbd4b729015fd6b0f64cfc5a861a6f6a2c (diff)
downloadllvm-1bf1691ed3bf4cb16ea221f062f1bb978fc8ea9d.tar.gz
llvm-1bf1691ed3bf4cb16ea221f062f1bb978fc8ea9d.tar.bz2
llvm-1bf1691ed3bf4cb16ea221f062f1bb978fc8ea9d.tar.xz
Dead code elimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.h')
-rw-r--r--lib/CodeGen/PHIElimination.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/CodeGen/PHIElimination.h b/lib/CodeGen/PHIElimination.h
index f3ab9e27db..110721d01d 100644
--- a/lib/CodeGen/PHIElimination.h
+++ b/lib/CodeGen/PHIElimination.h
@@ -22,17 +22,10 @@ namespace llvm {
/// Lower PHI instructions to copies.
class PHIElimination : public MachineFunctionPass {
MachineRegisterInfo *MRI; // Machine register information
- private:
-
- typedef SmallSet<MachineBasicBlock*, 4> PHIKillList;
- typedef DenseMap<unsigned, PHIKillList> PHIKillMap;
typedef DenseMap<unsigned, MachineBasicBlock*> PHIDefMap;
public:
- typedef PHIKillList::iterator phi_kill_iterator;
- typedef PHIKillList::const_iterator const_phi_kill_iterator;
-
static char ID; // Pass identification, replacement for typeid
PHIElimination() : MachineFunctionPass(&ID) {}
@@ -46,32 +39,6 @@ namespace llvm {
return PHIDefs.count(vreg);
}
- /// Returns the block in which the PHI instruction which defined the
- /// given vreg used to reside.
- MachineBasicBlock* getPHIDefBlock(unsigned vreg) {
- PHIDefMap::iterator phiDefItr = PHIDefs.find(vreg);
- assert(phiDefItr != PHIDefs.end() && "vreg has no phi-def.");
- return phiDefItr->second;
- }
-
- /// Returns true if the given vreg was killed by a PHI instr.
- bool hasPHIKills(unsigned vreg) const {
- return PHIKills.count(vreg);
- }
-
- /// Returns an iterator over the BasicBlocks which contained PHI
- /// kills of this register prior to lowering.
- phi_kill_iterator phiKillsBegin(unsigned vreg) {
- PHIKillMap::iterator phiKillItr = PHIKills.find(vreg);
- assert(phiKillItr != PHIKills.end() && "vreg has no phi-kills.");
- return phiKillItr->second.begin();
- }
- phi_kill_iterator phiKillsEnd(unsigned vreg) {
- PHIKillMap::iterator phiKillItr = PHIKills.find(vreg);
- assert(phiKillItr != PHIKills.end() && "vreg has no phi-kills.");
- return phiKillItr->second.end();
- }
-
private:
/// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions
/// in predecessor basic blocks.
@@ -140,7 +107,6 @@ namespace llvm {
VRegPHIUse VRegPHIUseCount;
PHIDefMap PHIDefs;
- PHIKillMap PHIKills;
// Defs of PHI sources which are implicit_def.
SmallPtrSet<MachineInstr*, 4> ImpDefs;