[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-16 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision. labath added a comment. This revision is now accepted and ready to land. Ok, this is something we can talk about. dwarf parsing is a big bottle neck, so spending some time to optimize that (and even sacrifice some readability/mantainability/etc. if needed) is

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Dmitry Antipov via Phabricator via lldb-commits
dmantipov updated this revision to Diff 291894. dmantipov added a comment. OK let's reduce it to minimum minimorum. As for the profiling, l can see possible improvement around DWARFAttributes::Append() - inlining even at -O2 and eliminating extra constructor call makes 10.61% intern-state

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D87675#2273831 , @dmantipov wrote: > Use std::pair rather than an ad-hoc two-member trivial structures. Since > std::pair provides the default constructor to initialize both members, no > extra C++ glue is required for

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Dmitry Antipov via Phabricator via lldb-commits
dmantipov updated this revision to Diff 291870. dmantipov added a comment. Use std::pair rather than an ad-hoc two-member trivial structures. Since std::pair provides the default constructor to initialize both members, no extra C++ glue is required for emplace_back()'ing the pairs into

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Using emplacement instead of construction is a good idea, where it makes sense. However, I am not convinced that adding constructors to otherwise-trivial structures is worth it. These structures are usually trivially copyable and/or movable and so an emplacement does

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Dmitry Antipov via Phabricator via lldb-commits
dmantipov updated this revision to Diff 291838. dmantipov added a comment. Minor style adjustments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87675/new/ https://reviews.llvm.org/D87675 Files: lldb/include/lldb/Symbol/Function.h

[Lldb-commits] [PATCH] D87675: [lldb/DWARF] Refactor to prefer emplace_back() vs. push_back()

2020-09-15 Thread Dmitry Antipov via Phabricator via lldb-commits
dmantipov created this revision. dmantipov added reviewers: labath, jankratochvil, teemperor. dmantipov added a project: LLDB. Herald added subscribers: lldb-commits, JDevlieghere. Herald added a reviewer: shafik. dmantipov requested review of this revision. Prefer emplace_back() over push_back()