aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2003-08-12 23:39:08 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2003-08-12 23:39:08 +0000
commit906cd975df830020dc823820f1859732254a0443 (patch)
treea5a344ddb6bc983060b29dad2b9d18921235bf6b /include/llvm
parentfeb3298fca84eaae664281e04b23f1fbe7ade856 (diff)
downloadexternal_llvm-906cd975df830020dc823820f1859732254a0443.zip
external_llvm-906cd975df830020dc823820f1859732254a0443.tar.gz
external_llvm-906cd975df830020dc823820f1859732254a0443.tar.bz2
Make MInst2LVSetBI and MInst2LVSetAI be hash_maps instead of maps.
Add some comments and non-const methods to fix constness problems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/FunctionLiveVarInfo.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/include/llvm/CodeGen/FunctionLiveVarInfo.h b/include/llvm/CodeGen/FunctionLiveVarInfo.h
index 9120d8e..94db382 100644
--- a/include/llvm/CodeGen/FunctionLiveVarInfo.h
+++ b/include/llvm/CodeGen/FunctionLiveVarInfo.h
@@ -61,6 +61,7 @@
#ifndef FUNCTION_LIVE_VAR_INFO_H
#define FUNCTION_LIVE_VAR_INFO_H
+#include "Support/hash_map"
#include "llvm/Pass.h"
#include "llvm/CodeGen/ValueSet.h"
@@ -69,10 +70,12 @@ class MachineInstr;
class FunctionLiveVarInfo : public FunctionPass {
// Machine Instr to LiveVarSet Map for providing LVset BEFORE each inst
- std::map<const MachineInstr *, const ValueSet *> MInst2LVSetBI;
+ // These sets are owned by this map and will be freed in releaseMemory().
+ hash_map<const MachineInstr *, ValueSet *> MInst2LVSetBI;
- // Machine Instr to LiveVarSet Map for providing LVset AFTER each inst
- std::map<const MachineInstr *, const ValueSet *> MInst2LVSetAI;
+ // Machine Instr to LiveVarSet Map for providing LVset AFTER each inst.
+ // These sets are just pointers to sets in MInst2LVSetBI or BBLiveVar.
+ hash_map<const MachineInstr *, ValueSet *> MInst2LVSetAI;
// Stored Function that the data is computed with respect to
const Function *M;
@@ -104,11 +107,13 @@ public:
// --------- Functions to access analysis results -------------------
- // gets OutSet of a BB
+ // get OutSet of a BB
const ValueSet &getOutSetOfBB(const BasicBlock *BB) const;
+ ValueSet &getOutSetOfBB(const BasicBlock *BB) ;
- // gets InSet of a BB
+ // get InSet of a BB
const ValueSet &getInSetOfBB(const BasicBlock *BB) const;
+ ValueSet &getInSetOfBB(const BasicBlock *BB) ;
// gets the Live var set BEFORE an instruction.
// if BB is specified and the live var set has not yet been computed,