[PATCH] D70720: [llvm-objdump] Display locations of variables alongside disassembly

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 23:03:27 PST 2019


MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1848
+
+        formatted_raw_ostream FOS(outs());
         PIP.printInst(*IP, Disassembled ? &Inst : nullptr,
----------------
The destructor of `formatted_raw_ostream` is very slow.

We cannot declare formatted_raw_ostream in the loop body. The formatted_raw_ostream ctor resets the underlying stream (`outs()`) to unbuffered. This may introduce a 4x slowdown. I once had caused a slowdown here, which was fixed by D64969.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70720





More information about the llvm-commits mailing list