summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-11 09:24:14 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-11 09:24:14 +0200
commitf9b7f4221ef658e3716973b6c2e816af483513f2 (patch)
tree385391d0ff316a2755def88921ffe06519087cf3 /lib
parent216a19f9c117ed36f6b224125a7c5ef8015239be (diff)
parent30b015f044cd0157b68f5737321f685741c17423 (diff)
downloadllvm-f9b7f4221ef658e3716973b6c2e816af483513f2.tar.gz
llvm-f9b7f4221ef658e3716973b6c2e816af483513f2.tar.bz2
llvm-f9b7f4221ef658e3716973b6c2e816af483513f2.tar.xz
Merge branch 'release_33' of git://github.com/llvm-mirror/llvm into embtk-support-release-3.3
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 615c517449..f0d29c88a8 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -18,6 +18,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm/ADT/ValueMap.h"
#include "llvm/Analysis/DominatorInternals.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/InstructionSimplify.h"
@@ -88,7 +89,7 @@ namespace {
/// Keeps track of non-local addresses that have been sunk into a block.
/// This allows us to avoid inserting duplicate code for blocks with
/// multiple load/stores of the same address.
- DenseMap<Value*, Value*> SunkAddrs;
+ ValueMap<Value*, Value*> SunkAddrs;
/// ModifiedDT - If CFG is modified in anyway, dominator tree may need to
/// be updated.
@@ -1653,10 +1654,6 @@ bool CodeGenPrepare::OptimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
// start of the block.
CurInstIterator = BB->begin();
SunkAddrs.clear();
- } else {
- // This address is now available for reassignment, so erase the table
- // entry; we don't want to match some completely different instruction.
- SunkAddrs[Addr] = 0;
}
}
++NumMemoryInsts;