Skip to content

Commit ec66c87

Browse files
[Scalar] Avoid repeated hash lookups (NFC) (#129468)
1 parent 0e5826e commit ec66c87

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Scalar/ConstantHoisting.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ static void findBestInsertionSet(DominatorTree &DT, BlockFrequencyInfo &BFI,
290290
BasicBlock *Parent = DT.getNode(Node)->getIDom()->getBlock();
291291
// Initially, ParentInsertPts is empty and ParentPtsFreq is 0. Every child
292292
// will update its parent's ParentInsertPts and ParentPtsFreq.
293-
auto &ParentInsertPts = InsertPtsMap[Parent].first;
294-
BlockFrequency &ParentPtsFreq = InsertPtsMap[Parent].second;
293+
auto &[ParentInsertPts, ParentPtsFreq] = InsertPtsMap[Parent];
295294
// Choose to insert in Node or in subtree of Node.
296295
// Don't hoist to EHPad because we may not find a proper place to insert
297296
// in EHPad.

0 commit comments

Comments
 (0)