[PATCH] D73866: [RDA] getInstFromId: find instructions. NFC.
Sjoerd Meijer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 06:18:00 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG93b0536fd2af: [RDA] getInstFromId: find instructions. NFC. (authored by SjoerdMeijer).
Changed prior to commit:
https://reviews.llvm.org/D73866?vs=242843&id=242891#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73866/new/
https://reviews.llvm.org/D73866
Files:
llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
llvm/lib/CodeGen/ReachingDefAnalysis.cpp
Index: llvm/lib/CodeGen/ReachingDefAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/ReachingDefAnalysis.cpp
+++ llvm/lib/CodeGen/ReachingDefAnalysis.cpp
@@ -215,9 +215,11 @@
return nullptr;
for (auto &MI : *MBB) {
- if (InstIds.count(&MI) && InstIds.lookup(&MI) == InstId)
+ auto F = InstIds.find(&MI);
+ if (F != InstIds.end() && F->second == InstId)
return &MI;
}
+
return nullptr;
}
Index: llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
===================================================================
--- llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
+++ llvm/include/llvm/CodeGen/ReachingDefAnalysis.h
@@ -55,7 +55,7 @@
/// The first instruction in each basic block is 0.
int CurInstr;
- /// Maps instructions to their instruction Ids, relative to the begining of
+ /// Maps instructions to their instruction Ids, relative to the beginning of
/// their basic blocks.
DenseMap<MachineInstr *, int> InstIds;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73866.242891.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200206/0107c128/attachment.bin>
More information about the llvm-commits
mailing list