[PATCH] D86390: [llvm-mca][NFC] Refactor instruction printing
    Roman Lebedev via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Aug 21 23:13:08 PDT 2020
    
    
  
lebedev.ri added a comment.
I believe this is going to regress normal codepath in terms of avoidable memory allocations.
================
Comment at: llvm/tools/llvm-mca/Views/InstructionInfoView.cpp:23-24
   raw_string_ostream TempStream(Buffer);
-  std::string Instruction;
-  raw_string_ostream InstrStream(Instruction);
 
----------------
I believe this change is going to cause many new allocations.
================
Comment at: llvm/tools/llvm-mca/Views/ResourcePressureView.cpp:154-155
 
-  std::string Instruction;
-  raw_string_ostream InstrStream(Instruction);
-
----------------
Same.
================
Comment at: llvm/tools/llvm-mca/Views/TimelineView.cpp:186-187
-  // Use a different string stream for printing instructions.
-  std::string Instruction;
-  raw_string_ostream InstrStream(Instruction);
-
----------------
Same
================
Comment at: llvm/tools/llvm-mca/Views/TimelineView.cpp:295-297
-  // Use a different string stream for the instruction.
-  std::string Instruction;
-  raw_string_ostream InstrStream(Instruction);
----------------
Same
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86390/new/
https://reviews.llvm.org/D86390
    
    
More information about the llvm-commits
mailing list