[polly] r258660 - BlockGenerators: Avoid redundant map lookup [NFC]
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 06:17:01 PST 2016
Author: grosser
Date: Sun Jan 24 08:16:59 2016
New Revision: 258660
URL: http://llvm.org/viewvc/llvm-project?rev=258660&view=rev
Log:
BlockGenerators: Avoid redundant map lookup [NFC]
Modified:
polly/trunk/lib/CodeGen/BlockGenerators.cpp
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=258660&r1=258659&r2=258660&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sun Jan 24 08:16:59 2016
@@ -338,8 +338,8 @@ Value *BlockGenerator::getOrCreateAlloca
auto Addr = Map[ScalarBase];
- if (GlobalMap.count(Addr))
- return GlobalMap[Addr];
+ if (auto NewAddr = GlobalMap.lookup(Addr))
+ return NewAddr;
return Addr;
}
More information about the llvm-commits
mailing list