make gvn marginally faster by reallocating the lastSeenLoad map for
each basic block. llvm-svn: 48660
This commit is contained in:
parent
181f72369f
commit
beb216da0a
|
@ -1287,6 +1287,7 @@ bool GVN::iterateOnFunction(Function &F) {
|
||||||
DominatorTree &DT = getAnalysis<DominatorTree>();
|
DominatorTree &DT = getAnalysis<DominatorTree>();
|
||||||
|
|
||||||
SmallVector<Instruction*, 4> toErase;
|
SmallVector<Instruction*, 4> toErase;
|
||||||
|
DenseMap<Value*, LoadInst*> lastSeenLoad;
|
||||||
|
|
||||||
// Top-down walk of the dominator tree
|
// Top-down walk of the dominator tree
|
||||||
for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
|
for (df_iterator<DomTreeNode*> DI = df_begin(DT.getRootNode()),
|
||||||
|
@ -1294,7 +1295,7 @@ bool GVN::iterateOnFunction(Function &F) {
|
||||||
|
|
||||||
// Get the set to update for this block
|
// Get the set to update for this block
|
||||||
ValueNumberedSet& currAvail = availableOut[DI->getBlock()];
|
ValueNumberedSet& currAvail = availableOut[DI->getBlock()];
|
||||||
DenseMap<Value*, LoadInst*> lastSeenLoad;
|
lastSeenLoad.clear();
|
||||||
|
|
||||||
BasicBlock* BB = DI->getBlock();
|
BasicBlock* BB = DI->getBlock();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue