summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2016-01-07 23:38:45 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2016-01-07 23:38:45 +0000
commit117b1041669d02ec0edb194a9936c42fcf56952b (patch)
tree46dac4435355d4a1cd9bb248b008875f85a55520 /llvm/lib
parent9293fc4185bc737303f0114936ca9a7f467a7bcc (diff)
downloadbcm5719-llvm-117b1041669d02ec0edb194a9936c42fcf56952b.tar.gz
bcm5719-llvm-117b1041669d02ec0edb194a9936c42fcf56952b.zip
[LiveDebugValues] Replace several lines of code with operator[].
llvm-svn: 257114
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveDebugValues.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues.cpp b/llvm/lib/CodeGen/LiveDebugValues.cpp
index 98d30b95dd2..49d436c43b6 100644
--- a/llvm/lib/CodeGen/LiveDebugValues.cpp
+++ b/llvm/lib/CodeGen/LiveDebugValues.cpp
@@ -235,14 +235,7 @@ void LiveDebugValues::transferTerminatorInst(MachineInstr &MI,
if (OpenRanges.empty())
return;
- if (OutLocs.find(CurMBB) == OutLocs.end()) {
- // Create space for new Outgoing locs entries.
- VarLocList VLL;
- OutLocs.insert(std::make_pair(CurMBB, std::move(VLL)));
- }
- auto OL = OutLocs.find(CurMBB);
- assert(OL != OutLocs.end());
- VarLocList &VLL = OL->second;
+ VarLocList &VLL = OutLocs[CurMBB];
for (auto OR : OpenRanges) {
// Copy OpenRanges to OutLocs, if not already present.
@@ -305,14 +298,7 @@ void LiveDebugValues::join(MachineBasicBlock &MBB, VarLocInMBB &OutLocs,
if (InLocsT.empty())
return;
- if (InLocs.find(&MBB) == InLocs.end()) {
- // Create space for new Incoming locs entries.
- VarLocList VLL;
- InLocs.insert(std::make_pair(&MBB, std::move(VLL)));
- }
- auto IL = InLocs.find(&MBB);
- assert(IL != InLocs.end());
- VarLocList &ILL = IL->second;
+ VarLocList &ILL = InLocs[&MBB];
// Insert DBG_VALUE instructions, if not already inserted.
for (auto ILT : InLocsT) {
OpenPOWER on IntegriCloud