diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-01 01:33:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-01 01:33:21 +0000 |
commit | 9576645a848b23fddc24b4d5285168a7cfe64c24 (patch) | |
tree | 4f9a5b0e231732a54e2a295724d60237abd0705a /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | bb7ac52e0288ff88cacd2577137cf64955a643c6 (diff) | |
download | bcm5719-llvm-9576645a848b23fddc24b4d5285168a7cfe64c24.tar.gz bcm5719-llvm-9576645a848b23fddc24b4d5285168a7cfe64c24.zip |
Don't use operator[] here, because it's not desirable to insert a default
value if the search fails.
llvm-svn: 107368
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 40995849238..8cf279a8acf 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -6127,8 +6127,11 @@ SelectionDAGBuilder::HandlePHINodesInSuccessorBlocks(const BasicBlock *LLVMBB) { } Reg = RegOut; } else { - Reg = FuncInfo.ValueMap[PHIOp]; - if (Reg == 0) { + DenseMap<const Value *, unsigned>::iterator I = + FuncInfo.ValueMap.find(PHIOp); + if (I != FuncInfo.ValueMap.end()) + Reg = I->second; + else { assert(isa<AllocaInst>(PHIOp) && FuncInfo.StaticAllocaMap.count(cast<AllocaInst>(PHIOp)) && "Didn't codegen value into a register!??"); |