summaryrefslogtreecommitdiff
path: root/lib/Target/SparcV9/LiveVar/BBLiveVar.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-20 20:52:23 +0000
committerChris Lattner <sabre@nondot.org>2003-10-20 20:52:23 +0000
commite9d3c6b919570121d11bbc88cd03dea8b9a23837 (patch)
tree3668ac497ef8a66d4f2ab6e7a942205d53331d58 /lib/Target/SparcV9/LiveVar/BBLiveVar.h
parent5c288becabdc1b6b7d647c77c77311ad47aeda94 (diff)
downloadllvm-e9d3c6b919570121d11bbc88cd03dea8b9a23837.tar.gz
llvm-e9d3c6b919570121d11bbc88cd03dea8b9a23837.tar.bz2
llvm-e9d3c6b919570121d11bbc88cd03dea8b9a23837.tar.xz
Convert this code from using annotations to using a local map
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9310 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/LiveVar/BBLiveVar.h')
-rw-r--r--lib/Target/SparcV9/LiveVar/BBLiveVar.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/lib/Target/SparcV9/LiveVar/BBLiveVar.h b/lib/Target/SparcV9/LiveVar/BBLiveVar.h
index 88e99a804e..638b5aa8c6 100644
--- a/lib/Target/SparcV9/LiveVar/BBLiveVar.h
+++ b/lib/Target/SparcV9/LiveVar/BBLiveVar.h
@@ -9,8 +9,7 @@
#define LIVE_VAR_BB_H
#include "llvm/CodeGen/ValueSet.h"
-#include "Support/Annotation.h"
-#include <map>
+#include "Support/hash_map"
class BasicBlock;
class Value;
class MachineBasicBlock;
@@ -24,7 +23,7 @@ enum LiveVarDebugLevel_t {
extern LiveVarDebugLevel_t DEBUG_LV;
-class BBLiveVar : public Annotation {
+class BBLiveVar {
const BasicBlock &BB; // pointer to BasicBlock
MachineBasicBlock &MBB; // Pointer to MachineBasicBlock
unsigned POID; // Post-Order ID
@@ -36,7 +35,7 @@ class BBLiveVar : public Annotation {
// map that contains PredBB -> Phi arguments
// coming in on that edge. such uses have to be
// treated differently from ordinary uses.
- std::map<const BasicBlock *, ValueSet> PredToEdgeInSetMap;
+ hash_map<const BasicBlock *, ValueSet> PredToEdgeInSetMap;
// method to propagate an InSet to OutSet of a predecessor
bool setPropagate(ValueSet *OutSetOfPred,
@@ -50,14 +49,9 @@ class BBLiveVar : public Annotation {
void addUse(const Value *Op);
void calcDefUseSets(); // calculates the Def & Use sets for this BB
+public:
BBLiveVar(const BasicBlock &BB, MachineBasicBlock &MBB, unsigned POID);
- ~BBLiveVar() {} // make dtor private
- public:
- static BBLiveVar *CreateOnBB(const BasicBlock &BB, MachineBasicBlock &MBB,
- unsigned POID);
- static BBLiveVar *GetFromBB(const BasicBlock &BB);
- static void RemoveFromBB(const BasicBlock &BB);
inline bool isInSetChanged() const { return InSetChanged; }
inline bool isOutSetChanged() const { return OutSetChanged; }
@@ -69,7 +63,7 @@ class BBLiveVar : public Annotation {
bool applyTransferFunc(); // calcultes the In in terms of Out
// calculates Out set using In sets of the predecessors
- bool applyFlowFunc();
+ bool applyFlowFunc(hash_map<const BasicBlock*, BBLiveVar*> &BBLiveVarInfo);
inline const ValueSet &getOutSet() const { return OutSet; }
inline ValueSet &getOutSet() { return OutSet; }