mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-26 05:18:46 +00:00
[MCSchedule] Simplify and remove a C++20-deprecated is_pod call. NFC
This commit is contained in:
parent
44dc1e0baa
commit
9810fe1a91
@ -46,7 +46,7 @@ class TargetSchedModel {
|
||||
unsigned computeInstrLatency(const MCSchedClassDesc &SCDesc) const;
|
||||
|
||||
public:
|
||||
TargetSchedModel() : SchedModel(MCSchedModel::GetDefaultSchedModel()) {}
|
||||
TargetSchedModel() : SchedModel(MCSchedModel::Default) {}
|
||||
|
||||
/// Initialize the machine model for instruction scheduling.
|
||||
///
|
||||
|
@ -110,8 +110,8 @@ struct InstrItinerary {
|
||||
class InstrItineraryData {
|
||||
public:
|
||||
MCSchedModel SchedModel =
|
||||
MCSchedModel::GetDefaultSchedModel(); ///< Basic machine properties.
|
||||
const InstrStage *Stages = nullptr; ///< Array of stages selected
|
||||
MCSchedModel::Default; ///< Basic machine properties.
|
||||
const InstrStage *Stages = nullptr; ///< Array of stages selected
|
||||
const unsigned *OperandCycles = nullptr; ///< Array of operand cycles selected
|
||||
const unsigned *Forwardings = nullptr; ///< Array of pipeline forwarding paths
|
||||
const InstrItinerary *Itineraries =
|
||||
|
@ -390,7 +390,6 @@ struct MCSchedModel {
|
||||
unsigned WriteResourceIdx = 0);
|
||||
|
||||
/// Returns the default initialized model.
|
||||
static const MCSchedModel &GetDefaultSchedModel() { return Default; }
|
||||
static const MCSchedModel Default;
|
||||
};
|
||||
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
static_assert(std::is_pod<MCSchedModel>::value,
|
||||
"We shouldn't have a static constructor here");
|
||||
static_assert(std::is_trivial_v<MCSchedModel>,
|
||||
"MCSchedModel is required to be a trivial type");
|
||||
const MCSchedModel MCSchedModel::Default = {DefaultIssueWidth,
|
||||
DefaultMicroOpBufferSize,
|
||||
DefaultLoopMicroOpBufferSize,
|
||||
@ -30,7 +30,7 @@ const MCSchedModel MCSchedModel::Default = {DefaultIssueWidth,
|
||||
DefaultMispredictPenalty,
|
||||
false,
|
||||
true,
|
||||
false /*EnableIntervals*/,
|
||||
/*EnableIntervals=*/false,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
|
@ -214,7 +214,7 @@ void MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef TuneCPU,
|
||||
if (!TuneCPU.empty())
|
||||
CPUSchedModel = &getSchedModelForCPU(TuneCPU);
|
||||
else
|
||||
CPUSchedModel = &MCSchedModel::GetDefaultSchedModel();
|
||||
CPUSchedModel = &MCSchedModel::Default;
|
||||
}
|
||||
|
||||
void MCSubtargetInfo::setDefaultFeatures(StringRef CPU, StringRef TuneCPU,
|
||||
@ -319,7 +319,7 @@ const MCSchedModel &MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {
|
||||
errs() << "'" << CPU
|
||||
<< "' is not a recognized processor for this target"
|
||||
<< " (ignoring processor)\n";
|
||||
return MCSchedModel::GetDefaultSchedModel();
|
||||
return MCSchedModel::Default;
|
||||
}
|
||||
assert(CPUEntry->SchedModel && "Missing processor SchedModel value");
|
||||
return *CPUEntry->SchedModel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user