Skip to content

Commit

Permalink
[Analysis] Avoid repeated hash lookups (NFC) (#126402)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata authored Feb 9, 2025
1 parent d204724 commit 3ce96b9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Analysis/DependenceGraphBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,7 @@ template <class G> void AbstractDependenceGraphBuilder<G>::createDefUseEdges() {
Instruction *UI = dyn_cast<Instruction>(U);
if (!UI)
continue;
NodeType *DstNode = nullptr;
if (IMap.find(UI) != IMap.end())
DstNode = IMap.find(UI)->second;
NodeType *DstNode = IMap.lookup(UI);

// In the case of loops, the scope of the subgraph is all the
// basic blocks (and instructions within them) belonging to the loop. We
Expand Down

0 comments on commit 3ce96b9

Please sign in to comment.