|
LLVM
3.7.0
|
MCSubtargetInfo - Generic base class for all target subtargets. More...
#include <MCSubtargetInfo.h>
Public Member Functions | |
| MCSubtargetInfo (const MCSubtargetInfo &)=default | |
| MCSubtargetInfo (const Triple &TT, StringRef CPU, StringRef FS, ArrayRef< SubtargetFeatureKV > PF, ArrayRef< SubtargetFeatureKV > PD, const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA, const InstrStage *IS, const unsigned *OC, const unsigned *FP) | |
| const Triple & | getTargetTriple () const |
| getTargetTriple - Return the target triple string. More... | |
| StringRef | getCPU () const |
| getCPU - Return the CPU string. More... | |
| const FeatureBitset & | getFeatureBits () const |
| getFeatureBits - Return the feature bits. More... | |
| void | setFeatureBits (const FeatureBitset &FeatureBits_) |
| setFeatureBits - Set the feature bits. More... | |
| void | setDefaultFeatures (StringRef CPU) |
| Set the features to the default for the given CPU. More... | |
| FeatureBitset | ToggleFeature (uint64_t FB) |
| ToggleFeature - Toggle a feature and returns the re-computed feature bits. More... | |
| FeatureBitset | ToggleFeature (const FeatureBitset &FB) |
| ToggleFeature - Toggle a feature and returns the re-computed feature bits. More... | |
| FeatureBitset | ToggleFeature (StringRef FS) |
| ToggleFeature - Toggle a set of features and returns the re-computed feature bits. More... | |
| FeatureBitset | ApplyFeatureFlag (StringRef FS) |
| Apply a feature flag and return the re-computed feature bits, including all feature bits implied by the flag. More... | |
| const MCSchedModel & | getSchedModelForCPU (StringRef CPU) const |
| getSchedModelForCPU - Get the machine model of a CPU. More... | |
| const MCSchedModel & | getSchedModel () const |
| Get the machine model for this subtarget's CPU. More... | |
| const MCWriteProcResEntry * | getWriteProcResBegin (const MCSchedClassDesc *SC) const |
| Return an iterator at the first process resource consumed by the given scheduling class. More... | |
| const MCWriteProcResEntry * | getWriteProcResEnd (const MCSchedClassDesc *SC) const |
| const MCWriteLatencyEntry * | getWriteLatencyEntry (const MCSchedClassDesc *SC, unsigned DefIdx) const |
| int | getReadAdvanceCycles (const MCSchedClassDesc *SC, unsigned UseIdx, unsigned WriteResID) const |
| InstrItineraryData | getInstrItineraryForCPU (StringRef CPU) const |
| getInstrItineraryForCPU - Get scheduling itinerary of a CPU. More... | |
| void | initInstrItins (InstrItineraryData &InstrItins) const |
| Initialize an InstrItineraryData instance. More... | |
| bool | isCPUStringValid (StringRef CPU) const |
| Check whether the CPU string is valid. More... | |
Protected Member Functions | |
| void | InitMCProcessorInfo (StringRef CPU, StringRef FS) |
| Initialize the scheduling model and feature bits. More... | |
MCSubtargetInfo - Generic base class for all target subtargets.
Definition at line 29 of file MCSubtargetInfo.h.
|
default |
| MCSubtargetInfo::MCSubtargetInfo | ( | const Triple & | TT, |
| StringRef | CPU, | ||
| StringRef | FS, | ||
| ArrayRef< SubtargetFeatureKV > | PF, | ||
| ArrayRef< SubtargetFeatureKV > | PD, | ||
| const SubtargetInfoKV * | ProcSched, | ||
| const MCWriteProcResEntry * | WPR, | ||
| const MCWriteLatencyEntry * | WL, | ||
| const MCReadAdvanceEntry * | RA, | ||
| const InstrStage * | IS, | ||
| const unsigned * | OC, | ||
| const unsigned * | FP | ||
| ) |
Definition at line 39 of file MCSubtargetInfo.cpp.
References InitMCProcessorInfo().
| FeatureBitset MCSubtargetInfo::ApplyFeatureFlag | ( | StringRef | FS | ) |
Apply a feature flag and return the re-computed feature bits, including all feature bits implied by the flag.
Definition at line 71 of file MCSubtargetInfo.cpp.
References llvm::SubtargetFeatures::ApplyFeatureFlag(), and Features.
|
inline |
getCPU - Return the CPU string.
Definition at line 65 of file MCSubtargetInfo.h.
|
inline |
getFeatureBits - Return the feature bits.
Definition at line 71 of file MCSubtargetInfo.h.
Referenced by llvm::CreateX86AsmInstrumentation(), DecodeSETPANInstruction(), DecodeSystemPStateInstruction(), llvm::MipsTargetELFStreamer::finish(), getARMLoadDeprecationInfo(), getARMStoreDeprecationInfo(), llvm::MCInstrDesc::getDeprecatedInfo(), getITDeprecationInfo(), getMCRDeprecationInfo(), llvm::X86TTIImpl::hasCompatibleFunctionAttributes(), isThumb(), llvm::SparcInstPrinter::isV9(), llvm::MipsTargetELFStreamer::MipsTargetELFStreamer(), llvm::AArch64InstPrinter::printBarrierOption(), llvm::ARMInstPrinter::printInst(), llvm::X86ATTInstPrinter::printInst(), llvm::PPCInstPrinter::printInst(), llvm::ARMInstPrinter::printMemBOption(), llvm::AArch64InstPrinter::printMRSSystemRegister(), llvm::ARMInstPrinter::printMSRMaskOperand(), llvm::AArch64InstPrinter::printMSRSystemRegister(), llvm::AArch64InstPrinter::printPrefetchOp(), llvm::AArch64InstPrinter::printSystemPStateField(), and llvm::X86Disassembler::X86GenericDisassembler::X86GenericDisassembler().
| InstrItineraryData MCSubtargetInfo::getInstrItineraryForCPU | ( | StringRef | CPU | ) | const |
getInstrItineraryForCPU - Get scheduling itinerary of a CPU.
Definition at line 103 of file MCSubtargetInfo.cpp.
References getSchedModelForCPU().
Referenced by getItineraryLatency().
|
inline |
Definition at line 134 of file MCSubtargetInfo.h.
References I, llvm::MCSchedClassDesc::NumReadAdvanceEntries, and llvm::MCSchedClassDesc::ReadAdvanceIdx.
Referenced by llvm::TargetSchedModel::computeOperandLatency().
|
inline |
Get the machine model for this subtarget's CPU.
Definition at line 113 of file MCSubtargetInfo.h.
Referenced by llvm::TargetSubtargetInfo::enablePostRAScheduler(), getLatency(), llvm::HexagonMCInstrInfo::getUnits(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::getUnrollingPreferences(), initInstrItins(), llvm::MachineTraceMetrics::runOnMachineFunction(), and llvm::ScheduleDAGInstrs::ScheduleDAGInstrs().
| const MCSchedModel & MCSubtargetInfo::getSchedModelForCPU | ( | StringRef | CPU | ) | const |
getSchedModelForCPU - Get the machine model of a CPU.
Definition at line 77 of file MCSubtargetInfo.cpp.
References llvm::errs(), Found(), llvm::MCSchedModel::GetDefaultSchedModel(), llvm::SubtargetInfoKV::Key, and llvm::SubtargetInfoKV::Value.
Referenced by getInstrItineraryForCPU(), and InitMCProcessorInfo().
getTargetTriple - Return the target triple string.
Definition at line 62 of file MCSubtargetInfo.h.
Referenced by llvm::createAArch64ObjectTargetStreamer(), llvm::createARMObjectTargetStreamer(), createObjectTargetStreamer(), and llvm::CreateX86AsmInstrumentation().
|
inline |
Definition at line 126 of file MCSubtargetInfo.h.
References llvm::MCSchedClassDesc::WriteLatencyIdx.
Referenced by llvm::TargetSchedModel::computeOperandLatency(), and getLatency().
|
inline |
Return an iterator at the first process resource consumed by the given scheduling class.
Definition at line 117 of file MCSubtargetInfo.h.
References llvm::MCSchedClassDesc::WriteProcResIdx.
Referenced by llvm::TargetSchedModel::computeOutputLatency(), llvm::TargetSchedModel::getWriteProcResBegin(), and getWriteProcResEnd().
|
inline |
Definition at line 121 of file MCSubtargetInfo.h.
References getWriteProcResBegin(), and llvm::MCSchedClassDesc::NumWriteProcResEntries.
Referenced by llvm::TargetSchedModel::computeOutputLatency(), and llvm::TargetSchedModel::getWriteProcResEnd().
| void MCSubtargetInfo::initInstrItins | ( | InstrItineraryData & | InstrItins | ) | const |
Initialize an InstrItineraryData instance.
Definition at line 109 of file MCSubtargetInfo.cpp.
References getSchedModel().
Referenced by llvm::TargetSchedModel::init().
Initialize the scheduling model and feature bits.
FIXME: Find a way to stick this in the constructor, since it should only be called during initialization.
Definition at line 27 of file MCSubtargetInfo.cpp.
References llvm::StringRef::empty(), llvm::MCSchedModel::GetDefaultSchedModel(), getFeatures(), and getSchedModelForCPU().
Referenced by MCSubtargetInfo().
Check whether the CPU string is valid.
Definition at line 161 of file MCSubtargetInfo.h.
References Found().
| void MCSubtargetInfo::setDefaultFeatures | ( | StringRef | CPU | ) |
Set the features to the default for the given CPU.
Definition at line 35 of file MCSubtargetInfo.cpp.
References getFeatures().
|
inline |
setFeatureBits - Set the feature bits.
Definition at line 77 of file MCSubtargetInfo.h.
| FeatureBitset MCSubtargetInfo::ToggleFeature | ( | uint64_t | FB | ) |
ToggleFeature - Toggle a feature and returns the re-computed feature bits.
This version does not change the implied bits.
Definition at line 53 of file MCSubtargetInfo.cpp.
| FeatureBitset MCSubtargetInfo::ToggleFeature | ( | const FeatureBitset & | FB | ) |
ToggleFeature - Toggle a feature and returns the re-computed feature bits.
This version does not change the implied bits.
Definition at line 58 of file MCSubtargetInfo.cpp.
| FeatureBitset MCSubtargetInfo::ToggleFeature | ( | StringRef | FS | ) |
ToggleFeature - Toggle a set of features and returns the re-computed feature bits.
ToggleFeature - Toggle a feature and returns the re-computed feature bits.
This version will also change all implied bits.
Definition at line 65 of file MCSubtargetInfo.cpp.
References Features, and llvm::SubtargetFeatures::ToggleFeature().
1.8.6