diff options
author | Owen Anderson <resistor@mac.com> | 2008-05-26 10:07:43 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-05-26 10:07:43 +0000 |
commit | 7c322f4eade0de60dccae49c21023aceff24d86b (patch) | |
tree | 46e841530df48c796fe57da711d5ebe57308531d /lib/Transforms/Utils | |
parent | c3852fcce9befe6f75438608b2b485b55d844815 (diff) | |
download | external_llvm-7c322f4eade0de60dccae49c21023aceff24d86b.zip external_llvm-7c322f4eade0de60dccae49c21023aceff24d86b.tar.gz external_llvm-7c322f4eade0de60dccae49c21023aceff24d86b.tar.bz2 |
Use a DenseMap instead of an std::map, speeding up the testcase in PR2368 by about a third.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51565 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r-- | lib/Transforms/Utils/LCSSA.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index 316784d..6277265 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -87,7 +87,7 @@ namespace { SetVector<Instruction*> &AffectedValues); Value *GetValueForBlock(DomTreeNode *BB, Instruction *OrigInst, - std::map<DomTreeNode*, Value*> &Phis); + DenseMap<DomTreeNode*, Value*> &Phis); /// inLoop - returns true if the given block is within the current loop bool inLoop(BasicBlock* B) { @@ -143,7 +143,7 @@ void LCSSA::ProcessInstruction(Instruction *Instr, ++NumLCSSA; // We are applying the transformation // Keep track of the blocks that have the value available already. - std::map<DomTreeNode*, Value*> Phis; + DenseMap<DomTreeNode*, Value*> Phis; DomTreeNode *InstrNode = DT->getNode(Instr->getParent()); @@ -247,7 +247,7 @@ void LCSSA::getLoopValuesUsedOutsideLoop(Loop *L, /// GetValueForBlock - Get the value to use within the specified basic block. /// available values are in Phis. Value *LCSSA::GetValueForBlock(DomTreeNode *BB, Instruction *OrigInst, - std::map<DomTreeNode*, Value*> &Phis) { + DenseMap<DomTreeNode*, Value*> &Phis) { // If there is no dominator info for this BB, it is unreachable. if (BB == 0) return UndefValue::get(OrigInst->getType()); |