From: Owen Anderson Date: Mon, 5 Feb 2007 02:39:47 +0000 (+0000) Subject: Use DenseMap for pointer->pointer maps. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=93235181d643bd928fce5d93f20e58e66db0d5cd;p=oota-llvm.git Use DenseMap for pointer->pointer maps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33897 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Utils/LCSSA.cpp b/lib/Transforms/Utils/LCSSA.cpp index 554dcbcec22..1d1783f5f49 100644 --- a/lib/Transforms/Utils/LCSSA.cpp +++ b/lib/Transforms/Utils/LCSSA.cpp @@ -33,13 +33,13 @@ #include "llvm/Pass.h" #include "llvm/Function.h" #include "llvm/Instructions.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/CFG.h" #include -#include using namespace llvm; STATISTIC(NumLCSSA, "Number of live out of a loop variables"); @@ -71,7 +71,7 @@ namespace { SetVector getLoopValuesUsedOutsideLoop(Loop *L); Value *GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis); + DenseMap &Phis); /// inLoop - returns true if the given block is within the current loop const bool inLoop(BasicBlock* B) { @@ -139,7 +139,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 Phis; + DenseMap Phis; DominatorTree::Node *InstrNode = DT->getNode(Instr->getParent()); @@ -226,7 +226,7 @@ SetVector LCSSA::getLoopValuesUsedOutsideLoop(Loop *L) { /// GetValueForBlock - Get the value to use within the specified basic block. /// available values are in Phis. Value *LCSSA::GetValueForBlock(DominatorTree::Node *BB, Instruction *OrigInst, - std::map &Phis) { + DenseMap &Phis) { // If there is no dominator info for this BB, it is unreachable. if (BB == 0) return UndefValue::get(OrigInst->getType());