[PATCH] D61105: [MS] Emit S_HEAPALLOCSITE debug info in SelectionDAG

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 15:01:04 PDT 2019


rnk added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:1638-1640
+    if (CodeViewHeapAllocSites.find(Node) == CodeViewHeapAllocSites.end())
+      return nullptr;
+    return CodeViewHeapAllocSites[Node];
----------------
You should avoid doing two hash lookups: put the result of .find in a variable, and then return the value from the map iterator (`Iter->second`).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61105/new/

https://reviews.llvm.org/D61105





More information about the llvm-commits mailing list