[PATCH] D49329: [llvm-mca] Turn InstructionTables into a Stage.

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 14 13:32:27 PDT 2018


mattd added inline comments.


================
Comment at: tools/llvm-mca/InstructionTables.h:40
   void addView(std::unique_ptr<View> V) {
+    addListener(V.get());
     Views.emplace_back(std::move(V));
----------------
mattd wrote:
> andreadb wrote:
> > mattd wrote:
> > > I'm working on a follow on patch to clean this addListener call up.
> > Hang on. 
> > You shouldn't have this method at all! Just use a PipelinePrinter to generate the report.
> I didn't consider a PipelinePrinter, I kept the InstructionTables  close to its original structure with its original Printer-like representation (addView/printReport/Views).  PipelinePrinter will remove the need for those bits, sorry for that. 
> 
> Note that  InstructionTables is now a Stage, with listeners.  We will still need to associate the events generated by the stage to the views.  This means we will need to make a call to addListener to IT.  If we don't do this, then the resource pressure view will not get any data.  
The code now relies on the addView in Pipeline to register the views to the pipeline's stages.  PipelinePrinter is definitely the way to go here, thanks for the suggestion.


https://reviews.llvm.org/D49329





More information about the llvm-commits mailing list