[PATCH] D47723: [CodeGen] print max throughput for 0-latency insts

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 4 09:33:28 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D47723#1121109, @andreadb wrote:

> Hey Sanjay,
>
> what if instead we change method MCSchedModel::getReciprocalThroughput? 
>  If we decide to always return a meaningful value for instructions that don't consume processor resources, then I think that we can get rid of Optional<>.
>  If an instruction is associated with an invalid scheduling class (i.e. `!SCDesc->isValid()`), then we should just return 1/IssueWidth.
>  If an instruction doesn't consume resources, then we should return N/IssueWidth (where N is the NumMicroOpcodes).
>
> I also prefer that we don't touch `getSchedInfoStr()`. My opinion is that adding extra logic to that method is going to make it difficult to get rid of it in the next future. Strictly speaking, the idea of adding that method to the subtarget was bad; there is no reason why the "profile string" should be returned by the subtarget!...  My wish is that we get rid of `getSchedInfoStr()` (as well as function `createSchedInfoStr`) in the near future.
>
> Not sure if this makes sense.


Yes, I think that all makes sense. I actually looked at the higher-level change first to remove the Optional<>, but I wasn't sure if we wanted to do that or just go with the quick hack for now. I'll have a look at fixing this better.


https://reviews.llvm.org/D47723





More information about the llvm-commits mailing list