// Copyright Advanced Micro Devices, Inc., or its affiliates. // SPDX-License-Identifier: MIT #pragma once #include #include #include #include #include namespace rocRoller { namespace Scheduling { /** * MinNopsCost: Orders the instructions based on the number of Nops. */ class MinNopsCost : public Cost { public: MinNopsCost(ContextPtr); using Base = Cost; static const std::string Basename; inline static const std::string Name = "MinNopsCost"; /** * Returns true if `CostFunction` is MinNops */ static bool Match(Argument arg); /** * Return shared pointer of `MinNopsCost` built from context */ static std::shared_ptr Build(Argument arg); /** * Return Name of `MinNopsCost`, used for debugging purposes currently */ std::string name() const override; /** * Call operator orders the instructions. */ float cost(Instruction const& inst, InstructionStatus const& status) const override; }; } }