[llvm] 665dd23 - [Utils] Simplify code with DenseMap::operator[] (NFC) (#114932)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 5 09:39:29 PST 2024
Author: Kazu Hirata
Date: 2024-11-05T09:39:26-08:00
New Revision: 665dd23a2a9e6a7694b80ad3f333327dc4fe00f5
URL: https://github.com/llvm/llvm-project/commit/665dd23a2a9e6a7694b80ad3f333327dc4fe00f5
DIFF: https://github.com/llvm/llvm-project/commit/665dd23a2a9e6a7694b80ad3f333327dc4fe00f5.diff
LOG: [Utils] Simplify code with DenseMap::operator[] (NFC) (#114932)
Added:
Modified:
llvm/lib/Transforms/Utils/LoopUnroll.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/LoopUnroll.cpp b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
index 448eff38f8bc2d..ad5670ae331765 100644
--- a/llvm/lib/Transforms/Utils/LoopUnroll.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUnroll.cpp
@@ -523,7 +523,7 @@ llvm::UnrollLoop(Loop *L, UnrollLoopOptions ULO, LoopInfo *LI,
if (!BI)
continue;
- ExitInfo &Info = ExitInfos.try_emplace(ExitingBlock).first->second;
+ ExitInfo &Info = ExitInfos[ExitingBlock];
Info.TripCount = SE->getSmallConstantTripCount(L, ExitingBlock);
Info.TripMultiple = SE->getSmallConstantTripMultiple(L, ExitingBlock);
if (Info.TripCount != 0) {
More information about the llvm-commits
mailing list