Skip to content

Commit e2438ce

Browse files
[BPF] Avoid repeated map lookups (NFC) (llvm#131494)
1 parent 8705e48 commit e2438ce

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,9 @@ Value *BPFAbstractMemberAccess::computeBaseAndAccessKey(CallInst *Call,
836836
// Put the access chain into a stack with the top as the head of the chain.
837837
while (Call) {
838838
CallStack.push(std::make_pair(Call, CInfo));
839-
CInfo = AIChain[Call].second;
840-
Call = AIChain[Call].first;
839+
auto &Chain = AIChain[Call];
840+
CInfo = Chain.second;
841+
Call = Chain.first;
841842
}
842843

843844
// The access offset from the base of the head of chain is also

0 commit comments

Comments
 (0)