2017-02-09 06:23:19 +08:00
|
|
|
//===- MCSubtargetInfo.cpp - Subtarget Information ------------------------===//
|
2011-07-02 04:45:01 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2011-07-02 04:45:01 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2017-06-06 19:49:48 +08:00
|
|
|
#include "llvm/MC/MCSubtargetInfo.h"
|
2017-02-09 06:23:19 +08:00
|
|
|
#include "llvm/ADT/ArrayRef.h"
|
2011-07-02 04:45:01 +08:00
|
|
|
#include "llvm/ADT/StringRef.h"
|
2012-12-04 00:50:05 +08:00
|
|
|
#include "llvm/MC/MCInstrItineraries.h"
|
2017-02-09 06:23:19 +08:00
|
|
|
#include "llvm/MC/MCSchedule.h"
|
2012-12-04 00:50:05 +08:00
|
|
|
#include "llvm/MC/SubtargetFeature.h"
|
2019-03-06 02:54:30 +08:00
|
|
|
#include "llvm/Support/Format.h"
|
2011-07-02 04:45:01 +08:00
|
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
#include <algorithm>
|
2017-02-09 06:23:19 +08:00
|
|
|
#include <cassert>
|
|
|
|
#include <cstring>
|
2011-07-02 04:45:01 +08:00
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
2019-03-06 02:54:30 +08:00
|
|
|
/// Find KV in array using binary search.
|
2019-03-06 02:54:34 +08:00
|
|
|
template <typename T>
|
|
|
|
static const T *Find(StringRef S, ArrayRef<T> A) {
|
2019-03-06 02:54:30 +08:00
|
|
|
// Binary search the array
|
2019-06-21 13:40:31 +08:00
|
|
|
auto F = llvm::lower_bound(A, S);
|
2019-03-06 02:54:30 +08:00
|
|
|
// If not found then return NULL
|
|
|
|
if (F == A.end() || StringRef(F->Key) != S) return nullptr;
|
|
|
|
// Return the found array item
|
|
|
|
return F;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// For each feature that is (transitively) implied by this feature, set it.
|
|
|
|
static
|
|
|
|
void SetImpliedBits(FeatureBitset &Bits, const FeatureBitset &Implies,
|
|
|
|
ArrayRef<SubtargetFeatureKV> FeatureTable) {
|
|
|
|
// OR the Implies bits in outside the loop. This allows the Implies for CPUs
|
|
|
|
// which might imply features not in FeatureTable to use this.
|
|
|
|
Bits |= Implies;
|
|
|
|
for (const SubtargetFeatureKV &FE : FeatureTable)
|
|
|
|
if (Implies.test(FE.Value))
|
|
|
|
SetImpliedBits(Bits, FE.Implies.getAsBitset(), FeatureTable);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// For each feature that (transitively) implies this feature, clear it.
|
|
|
|
static
|
|
|
|
void ClearImpliedBits(FeatureBitset &Bits, unsigned Value,
|
|
|
|
ArrayRef<SubtargetFeatureKV> FeatureTable) {
|
|
|
|
for (const SubtargetFeatureKV &FE : FeatureTable) {
|
|
|
|
if (FE.Implies.getAsBitset().test(Value)) {
|
|
|
|
Bits.reset(FE.Value);
|
|
|
|
ClearImpliedBits(Bits, FE.Value, FeatureTable);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ApplyFeatureFlag(FeatureBitset &Bits, StringRef Feature,
|
|
|
|
ArrayRef<SubtargetFeatureKV> FeatureTable) {
|
|
|
|
assert(SubtargetFeatures::hasFlag(Feature) &&
|
|
|
|
"Feature flags should start with '+' or '-'");
|
|
|
|
|
|
|
|
// Find feature in table.
|
|
|
|
const SubtargetFeatureKV *FeatureEntry =
|
|
|
|
Find(SubtargetFeatures::StripFlag(Feature), FeatureTable);
|
|
|
|
// If there is a match
|
|
|
|
if (FeatureEntry) {
|
|
|
|
// Enable/disable feature in bits
|
|
|
|
if (SubtargetFeatures::isEnabled(Feature)) {
|
|
|
|
Bits.set(FeatureEntry->Value);
|
|
|
|
|
|
|
|
// For each feature that this implies, set it.
|
|
|
|
SetImpliedBits(Bits, FeatureEntry->Implies.getAsBitset(), FeatureTable);
|
|
|
|
} else {
|
|
|
|
Bits.reset(FeatureEntry->Value);
|
|
|
|
|
|
|
|
// For each feature that implies this, clear it.
|
|
|
|
ClearImpliedBits(Bits, FeatureEntry->Value, FeatureTable);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
errs() << "'" << Feature << "' is not a recognized feature for this target"
|
|
|
|
<< " (ignoring feature)\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Return the length of the longest entry in the table.
|
2019-03-06 02:54:34 +08:00
|
|
|
template <typename T>
|
|
|
|
static size_t getLongestEntryLength(ArrayRef<T> Table) {
|
2019-03-06 02:54:30 +08:00
|
|
|
size_t MaxLen = 0;
|
|
|
|
for (auto &I : Table)
|
|
|
|
MaxLen = std::max(MaxLen, std::strlen(I.Key));
|
|
|
|
return MaxLen;
|
|
|
|
}
|
|
|
|
|
2019-06-15 05:42:21 +08:00
|
|
|
/// Display help for feature and mcpu choices.
|
2019-03-06 02:54:34 +08:00
|
|
|
static void Help(ArrayRef<SubtargetSubTypeKV> CPUTable,
|
2019-03-06 02:54:30 +08:00
|
|
|
ArrayRef<SubtargetFeatureKV> FeatTable) {
|
2019-06-15 05:42:21 +08:00
|
|
|
// the static variable ensures that the help information only gets
|
|
|
|
// printed once even though a target machine creates multiple subtargets
|
|
|
|
static bool PrintOnce = false;
|
|
|
|
if (PrintOnce) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2019-03-06 02:54:30 +08:00
|
|
|
// Determine the length of the longest CPU and Feature entries.
|
|
|
|
unsigned MaxCPULen = getLongestEntryLength(CPUTable);
|
|
|
|
unsigned MaxFeatLen = getLongestEntryLength(FeatTable);
|
|
|
|
|
|
|
|
// Print the CPU table.
|
|
|
|
errs() << "Available CPUs for this target:\n\n";
|
|
|
|
for (auto &CPU : CPUTable)
|
2019-03-06 02:54:34 +08:00
|
|
|
errs() << format(" %-*s - Select the %s processor.\n", MaxCPULen, CPU.Key,
|
|
|
|
CPU.Key);
|
2019-03-06 02:54:30 +08:00
|
|
|
errs() << '\n';
|
|
|
|
|
|
|
|
// Print the Feature table.
|
|
|
|
errs() << "Available features for this target:\n\n";
|
|
|
|
for (auto &Feature : FeatTable)
|
|
|
|
errs() << format(" %-*s - %s.\n", MaxFeatLen, Feature.Key, Feature.Desc);
|
|
|
|
errs() << '\n';
|
|
|
|
|
|
|
|
errs() << "Use +feature to enable a feature, or -feature to disable it.\n"
|
|
|
|
"For example, llc -mcpu=mycpu -mattr=+feature1,-feature2\n";
|
2019-06-15 05:42:21 +08:00
|
|
|
|
|
|
|
PrintOnce = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Display help for mcpu choices only
|
|
|
|
static void cpuHelp(ArrayRef<SubtargetSubTypeKV> CPUTable) {
|
|
|
|
// the static variable ensures that the help information only gets
|
|
|
|
// printed once even though a target machine creates multiple subtargets
|
|
|
|
static bool PrintOnce = false;
|
|
|
|
if (PrintOnce) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Print the CPU table.
|
|
|
|
errs() << "Available CPUs for this target:\n\n";
|
|
|
|
for (auto &CPU : CPUTable)
|
|
|
|
errs() << "\t" << CPU.Key << "\n";
|
|
|
|
errs() << '\n';
|
|
|
|
|
|
|
|
errs() << "Use -mcpu or -mtune to specify the target's processor.\n"
|
|
|
|
"For example, clang --target=aarch64-unknown-linux-gui "
|
|
|
|
"-mcpu=cortex-a35\n";
|
|
|
|
|
|
|
|
PrintOnce = true;
|
2019-03-06 02:54:30 +08:00
|
|
|
}
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
static FeatureBitset getFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS,
|
2019-03-06 02:54:34 +08:00
|
|
|
ArrayRef<SubtargetSubTypeKV> ProcDesc,
|
2015-07-11 06:52:15 +08:00
|
|
|
ArrayRef<SubtargetFeatureKV> ProcFeatures) {
|
2012-09-18 13:33:15 +08:00
|
|
|
SubtargetFeatures Features(FS);
|
2019-03-06 02:54:30 +08:00
|
|
|
|
|
|
|
if (ProcDesc.empty() || ProcFeatures.empty())
|
|
|
|
return FeatureBitset();
|
|
|
|
|
2020-04-13 19:46:41 +08:00
|
|
|
assert(llvm::is_sorted(ProcDesc) && "CPU table is not sorted");
|
|
|
|
assert(llvm::is_sorted(ProcFeatures) && "CPU features table is not sorted");
|
2019-03-06 02:54:30 +08:00
|
|
|
// Resulting bits
|
|
|
|
FeatureBitset Bits;
|
|
|
|
|
|
|
|
// Check if help is needed
|
|
|
|
if (CPU == "help")
|
|
|
|
Help(ProcDesc, ProcFeatures);
|
|
|
|
|
|
|
|
// Find CPU entry if CPU name is specified.
|
|
|
|
else if (!CPU.empty()) {
|
2019-03-06 02:54:34 +08:00
|
|
|
const SubtargetSubTypeKV *CPUEntry = Find(CPU, ProcDesc);
|
2019-03-06 02:54:30 +08:00
|
|
|
|
|
|
|
// If there is a match
|
|
|
|
if (CPUEntry) {
|
|
|
|
// Set the features implied by this CPU feature, if any.
|
|
|
|
SetImpliedBits(Bits, CPUEntry->Implies.getAsBitset(), ProcFeatures);
|
|
|
|
} else {
|
|
|
|
errs() << "'" << CPU << "' is not a recognized processor for this target"
|
|
|
|
<< " (ignoring processor)\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
if (!TuneCPU.empty()) {
|
|
|
|
const SubtargetSubTypeKV *CPUEntry = Find(TuneCPU, ProcDesc);
|
|
|
|
|
|
|
|
// If there is a match
|
|
|
|
if (CPUEntry) {
|
|
|
|
// Set the features implied by this CPU feature, if any.
|
|
|
|
SetImpliedBits(Bits, CPUEntry->TuneImplies.getAsBitset(), ProcFeatures);
|
|
|
|
} else if (TuneCPU != CPU) {
|
|
|
|
errs() << "'" << TuneCPU << "' is not a recognized processor for this "
|
|
|
|
<< "target (ignoring processor)\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-06 02:54:30 +08:00
|
|
|
// Iterate through each feature
|
|
|
|
for (const std::string &Feature : Features.getFeatures()) {
|
|
|
|
// Check for help
|
|
|
|
if (Feature == "+help")
|
|
|
|
Help(ProcDesc, ProcFeatures);
|
2020-03-25 00:42:22 +08:00
|
|
|
else if (Feature == "+cpuhelp")
|
2019-06-15 05:42:21 +08:00
|
|
|
cpuHelp(ProcDesc);
|
2019-03-06 02:54:30 +08:00
|
|
|
else
|
|
|
|
ApplyFeatureFlag(Bits, Feature, ProcFeatures);
|
|
|
|
}
|
|
|
|
|
|
|
|
return Bits;
|
2015-07-11 06:52:15 +08:00
|
|
|
}
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
void MCSubtargetInfo::InitMCProcessorInfo(StringRef CPU, StringRef TuneCPU,
|
|
|
|
StringRef FS) {
|
|
|
|
FeatureBits = getFeatures(CPU, TuneCPU, FS, ProcDesc, ProcFeatures);
|
2021-03-24 23:52:10 +08:00
|
|
|
FeatureString = std::string(FS);
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
if (!TuneCPU.empty())
|
|
|
|
CPUSchedModel = &getSchedModelForCPU(TuneCPU);
|
2012-09-18 13:33:15 +08:00
|
|
|
else
|
2015-07-11 06:13:43 +08:00
|
|
|
CPUSchedModel = &MCSchedModel::GetDefaultSchedModel();
|
2012-09-18 13:33:15 +08:00
|
|
|
}
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
void MCSubtargetInfo::setDefaultFeatures(StringRef CPU, StringRef TuneCPU,
|
|
|
|
StringRef FS) {
|
|
|
|
FeatureBits = getFeatures(CPU, TuneCPU, FS, ProcDesc, ProcFeatures);
|
2021-03-24 23:52:10 +08:00
|
|
|
FeatureString = std::string(FS);
|
2015-07-11 06:52:15 +08:00
|
|
|
}
|
|
|
|
|
2020-08-15 05:56:54 +08:00
|
|
|
MCSubtargetInfo::MCSubtargetInfo(const Triple &TT, StringRef C, StringRef TC,
|
|
|
|
StringRef FS, ArrayRef<SubtargetFeatureKV> PF,
|
2020-01-29 03:23:46 +08:00
|
|
|
ArrayRef<SubtargetSubTypeKV> PD,
|
|
|
|
const MCWriteProcResEntry *WPR,
|
|
|
|
const MCWriteLatencyEntry *WL,
|
|
|
|
const MCReadAdvanceEntry *RA,
|
|
|
|
const InstrStage *IS, const unsigned *OC,
|
|
|
|
const unsigned *FP)
|
2020-08-15 05:56:54 +08:00
|
|
|
: TargetTriple(TT), CPU(std::string(C)), TuneCPU(std::string(TC)),
|
|
|
|
ProcFeatures(PF), ProcDesc(PD), WriteProcResTable(WPR),
|
|
|
|
WriteLatencyTable(WL), ReadAdvanceTable(RA), Stages(IS),
|
|
|
|
OperandCycles(OC), ForwardingPaths(FP) {
|
|
|
|
InitMCProcessorInfo(CPU, TuneCPU, FS);
|
2011-07-07 15:07:08 +08:00
|
|
|
}
|
|
|
|
|
2015-05-26 18:47:10 +08:00
|
|
|
FeatureBitset MCSubtargetInfo::ToggleFeature(uint64_t FB) {
|
|
|
|
FeatureBits.flip(FB);
|
|
|
|
return FeatureBits;
|
|
|
|
}
|
|
|
|
|
|
|
|
FeatureBitset MCSubtargetInfo::ToggleFeature(const FeatureBitset &FB) {
|
2011-07-09 13:47:46 +08:00
|
|
|
FeatureBits ^= FB;
|
|
|
|
return FeatureBits;
|
|
|
|
}
|
|
|
|
|
[ARM] Replace fp-only-sp and d16 with fp64 and d32.
Those two subtarget features were awkward because their semantics are
reversed: each one indicates the _lack_ of support for something in
the architecture, rather than the presence. As a consequence, you
don't get the behavior you want if you combine two sets of feature
bits.
Each SubtargetFeature for an FP architecture version now comes in four
versions, one for each combination of those options. So you can still
say (for example) '+vfp2' in a feature string and it will mean what
it's always meant, but there's a new string '+vfp2d16sp' meaning the
version without those extra options.
A lot of this change is just mechanically replacing positive checks
for the old features with negative checks for the new ones. But one
more interesting change is that I've rearranged getFPUFeatures() so
that the main FPU feature is appended to the output list *before*
rather than after the features derived from the Restriction field, so
that -fp64 and -d32 can override defaults added by the main feature.
Reviewers: dmgreen, samparker, SjoerdMeijer
Subscribers: srhines, javed.absar, eraman, kristof.beyls, hiraditya, zzheng, Petar.Avramovic, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D60691
llvm-svn: 361845
2019-05-29 00:13:20 +08:00
|
|
|
FeatureBitset MCSubtargetInfo::SetFeatureBitsTransitively(
|
|
|
|
const FeatureBitset &FB) {
|
|
|
|
SetImpliedBits(FeatureBits, FB, ProcFeatures);
|
|
|
|
return FeatureBits;
|
|
|
|
}
|
|
|
|
|
|
|
|
FeatureBitset MCSubtargetInfo::ClearFeatureBitsTransitively(
|
|
|
|
const FeatureBitset &FB) {
|
|
|
|
for (unsigned I = 0, E = FB.size(); I < E; I++) {
|
|
|
|
if (FB[I]) {
|
|
|
|
FeatureBits.reset(I);
|
|
|
|
ClearImpliedBits(FeatureBits, I, ProcFeatures);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return FeatureBits;
|
|
|
|
}
|
|
|
|
|
2019-03-06 02:54:30 +08:00
|
|
|
FeatureBitset MCSubtargetInfo::ToggleFeature(StringRef Feature) {
|
|
|
|
// Find feature in table.
|
|
|
|
const SubtargetFeatureKV *FeatureEntry =
|
|
|
|
Find(SubtargetFeatures::StripFlag(Feature), ProcFeatures);
|
|
|
|
// If there is a match
|
|
|
|
if (FeatureEntry) {
|
|
|
|
if (FeatureBits.test(FeatureEntry->Value)) {
|
|
|
|
FeatureBits.reset(FeatureEntry->Value);
|
|
|
|
// For each feature that implies this, clear it.
|
|
|
|
ClearImpliedBits(FeatureBits, FeatureEntry->Value, ProcFeatures);
|
|
|
|
} else {
|
|
|
|
FeatureBits.set(FeatureEntry->Value);
|
|
|
|
|
|
|
|
// For each feature that this implies, set it.
|
|
|
|
SetImpliedBits(FeatureBits, FeatureEntry->Implies.getAsBitset(),
|
|
|
|
ProcFeatures);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
errs() << "'" << Feature << "' is not a recognized feature for this target"
|
|
|
|
<< " (ignoring feature)\n";
|
|
|
|
}
|
|
|
|
|
2011-07-09 13:47:46 +08:00
|
|
|
return FeatureBits;
|
|
|
|
}
|
|
|
|
|
2015-06-05 21:29:24 +08:00
|
|
|
FeatureBitset MCSubtargetInfo::ApplyFeatureFlag(StringRef FS) {
|
2019-03-06 02:54:30 +08:00
|
|
|
::ApplyFeatureFlag(FeatureBits, FS, ProcFeatures);
|
2015-06-05 21:29:24 +08:00
|
|
|
return FeatureBits;
|
|
|
|
}
|
2011-07-09 13:47:46 +08:00
|
|
|
|
2017-09-15 04:44:20 +08:00
|
|
|
bool MCSubtargetInfo::checkFeatures(StringRef FS) const {
|
|
|
|
SubtargetFeatures T(FS);
|
|
|
|
FeatureBitset Set, All;
|
|
|
|
for (std::string F : T.getFeatures()) {
|
2019-03-06 02:54:30 +08:00
|
|
|
::ApplyFeatureFlag(Set, F, ProcFeatures);
|
2017-09-15 04:44:20 +08:00
|
|
|
if (F[0] == '-')
|
|
|
|
F[0] = '+';
|
2019-03-06 02:54:30 +08:00
|
|
|
::ApplyFeatureFlag(All, F, ProcFeatures);
|
2017-09-15 04:44:20 +08:00
|
|
|
}
|
|
|
|
return (FeatureBits & All) == Set;
|
|
|
|
}
|
|
|
|
|
2015-07-11 06:13:43 +08:00
|
|
|
const MCSchedModel &MCSubtargetInfo::getSchedModelForCPU(StringRef CPU) const {
|
2020-04-13 19:46:41 +08:00
|
|
|
assert(llvm::is_sorted(ProcDesc) &&
|
2015-10-18 00:37:11 +08:00
|
|
|
"Processor machine model table is not sorted");
|
2011-07-02 04:45:01 +08:00
|
|
|
|
|
|
|
// Find entry
|
2019-03-06 02:54:38 +08:00
|
|
|
const SubtargetSubTypeKV *CPUEntry = Find(CPU, ProcDesc);
|
|
|
|
|
|
|
|
if (!CPUEntry) {
|
2015-04-02 12:27:50 +08:00
|
|
|
if (CPU != "help") // Don't error if the user asked for help.
|
|
|
|
errs() << "'" << CPU
|
|
|
|
<< "' is not a recognized processor for this target"
|
|
|
|
<< " (ignoring processor)\n";
|
2014-09-03 01:43:54 +08:00
|
|
|
return MCSchedModel::GetDefaultSchedModel();
|
2014-01-26 00:56:18 +08:00
|
|
|
}
|
2019-03-06 02:54:38 +08:00
|
|
|
assert(CPUEntry->SchedModel && "Missing processor SchedModel value");
|
|
|
|
return *CPUEntry->SchedModel;
|
2012-07-07 12:00:00 +08:00
|
|
|
}
|
2011-07-02 04:45:01 +08:00
|
|
|
|
2012-07-07 12:00:00 +08:00
|
|
|
InstrItineraryData
|
|
|
|
MCSubtargetInfo::getInstrItineraryForCPU(StringRef CPU) const {
|
2017-09-27 20:48:48 +08:00
|
|
|
const MCSchedModel &SchedModel = getSchedModelForCPU(CPU);
|
2012-07-07 12:00:00 +08:00
|
|
|
return InstrItineraryData(SchedModel, Stages, OperandCycles, ForwardingPaths);
|
2011-07-02 04:45:01 +08:00
|
|
|
}
|
2012-09-15 04:26:46 +08:00
|
|
|
|
|
|
|
void MCSubtargetInfo::initInstrItins(InstrItineraryData &InstrItins) const {
|
2015-07-11 06:13:43 +08:00
|
|
|
InstrItins = InstrItineraryData(getSchedModel(), Stages, OperandCycles,
|
|
|
|
ForwardingPaths);
|
2012-09-15 04:26:46 +08:00
|
|
|
}
|
2019-10-10 03:51:48 +08:00
|
|
|
|
|
|
|
Optional<unsigned> MCSubtargetInfo::getCacheSize(unsigned Level) const {
|
|
|
|
return Optional<unsigned>();
|
|
|
|
}
|
|
|
|
|
|
|
|
Optional<unsigned>
|
|
|
|
MCSubtargetInfo::getCacheAssociativity(unsigned Level) const {
|
|
|
|
return Optional<unsigned>();
|
|
|
|
}
|
|
|
|
|
|
|
|
Optional<unsigned> MCSubtargetInfo::getCacheLineSize(unsigned Level) const {
|
|
|
|
return Optional<unsigned>();
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned MCSubtargetInfo::getPrefetchDistance() const {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned MCSubtargetInfo::getMaxPrefetchIterationsAhead() const {
|
|
|
|
return UINT_MAX;
|
|
|
|
}
|
|
|
|
|
2019-10-31 23:05:58 +08:00
|
|
|
bool MCSubtargetInfo::enableWritePrefetching() const {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
unsigned MCSubtargetInfo::getMinPrefetchStride(unsigned NumMemAccesses,
|
|
|
|
unsigned NumStridedMemAccesses,
|
|
|
|
unsigned NumPrefetches,
|
|
|
|
bool HasCall) const {
|
2019-10-10 03:51:48 +08:00
|
|
|
return 1;
|
|
|
|
}
|