[PATCH] D95692: [Pipeliner] Fixed optimization remarks and debug dumps Initiation Interval value

Brendon Cahoon via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 14 18:44:05 PST 2021


bcahoon accepted this revision.
bcahoon added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/CodeGen/MachinePipeliner.cpp:2126
   }
+  --II;
 
----------------
mamai wrote:
> bcahoon wrote:
> > Does this need to be decremented only if scheduledFound is true?
> > 
> > Another possibility is to use Schedule.getInitiationInterval() instead of II in the subsequent debug and remark messages.
> In fact, I am not sure what is the point to print the II when the schedule is not found. But, I think it is valid to decrement all the time, since the ++ is done right before exiting the loop, no matter if the schedule is found or not. It will represent the last II that was actually tried.
> 
> I thought of using a getInitiationInterval() function, but it doesn't exist. It was more simple to decrement the counter than to create a new getter function.
You're correct - it is valid to always decrement.  I still think it better to add and use a getInitiationInterval() function, and then change the scope of II so that it is limited to the loop.  But, it's more important that the correct valid is printed, so either approach is an improvment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95692



More information about the llvm-commits mailing list