To find the instruction in the block for a given ID, first a count and then a lookup was performed in the map, which is almost the same thing, thus doing double the work.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This doesn't look safe to me. lookup will return a default constructed value if an existing object doesn't exist and I'm pretty sure this will be 0. This is also a perfectly reasonable number for InstId to be, therefore providing the wrong MI when an instruction has been inserted as the first instruction in the block, without RDA knowing about it.
Comment Actions
Ok.
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
218 | Could just return MI here without going through F. |
llvm/lib/CodeGen/ReachingDefAnalysis.cpp | ||
---|---|---|
218 | yep, cheers, will change that before committing. |
Could just return MI here without going through F.