[PATCH] D73725: [DebugInfo] Avoid a quadratic-complexity corner case in LiveDebugValues

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 04:13:28 PST 2020


jmorse marked 4 inline comments as done.
jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/LexicalScopes.cpp:302
+         CurMBBIt != EndBBIt; CurMBBIt++)
+      MBBs.insert(&*CurMBBIt);
 }
----------------
aprantl wrote:
> And now that it's simplified, this looks like we should use something like `std::copy()` instead of a loop :-)
I don't think std::copy can be used, there needs to be some conversion between MBB references to MBB pointers. There might be some way of doing this automagically, possibly using std::decay, however my C++-fu is weak.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73725





More information about the llvm-commits mailing list