[PATCH] D47246: [llvm-mca] Introduce the ExecuteStage (was originally the Scheduler class).

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 10:21:32 PDT 2018


mattd added inline comments.


================
Comment at: tools/llvm-mca/Scheduler.cpp:235-236
 
-bool Scheduler::canBeDispatched(const InstRef &IR) const {
+HWStallEvent::GenericEventType
+Scheduler::canBeDispatched(const InstRef &IR) const {
   HWStallEvent::GenericEventType Type = HWStallEvent::Invalid;
----------------
andreadb wrote:
> Could you change this method so that it returns a bool? I don't particularly like the fact that , as a consequence of this change, we now need a new value in the GenericEventType enum.
> You can make the enum an in/out argument to this method. If `canBeDispatched` returns false, then the `HWStallEvent::GenericEventType` contains the reason why dispatch failed.
Sounds good!  Alternatively, we could make canBeDispatched return `Optional<HWStallEvent::GenericEventType>`, but I'm happy with an in/out in this case, simple enough.  


https://reviews.llvm.org/D47246





More information about the llvm-commits mailing list