LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
llvm::MCSubtargetInfo Class Reference

#include <MCSubtargetInfo.h>

Inheritance diagram for llvm::MCSubtargetInfo:
Inheritance graph
[legend]

Public Member Functions

void InitMCSubtargetInfo (StringRef TT, StringRef CPU, StringRef FS, const SubtargetFeatureKV *PF, const SubtargetFeatureKV *PD, const SubtargetInfoKV *ProcSched, const MCWriteProcResEntry *WPR, const MCWriteLatencyEntry *WL, const MCReadAdvanceEntry *RA, const InstrStage *IS, const unsigned *OC, const unsigned *FP, unsigned NF, unsigned NP)
 
StringRef getTargetTriple () const
 getTargetTriple - Return the target triple string. More...
 
uint64_t getFeatureBits () const
 
void InitMCProcessorInfo (StringRef CPU, StringRef FS)
 
void InitCPUSchedModel (StringRef CPU)
 InitCPUSchedModel - Recompute scheduling model based on CPU. More...
 
uint64_t ToggleFeature (uint64_t FB)
 
uint64_t ToggleFeature (StringRef FS)
 
const MCSchedModelgetSchedModelForCPU (StringRef CPU) const
 
const MCSchedModelgetSchedModel () const
 
const MCWriteProcResEntrygetWriteProcResBegin (const MCSchedClassDesc *SC) const
 
const MCWriteProcResEntrygetWriteProcResEnd (const MCSchedClassDesc *SC) const
 
const MCWriteLatencyEntrygetWriteLatencyEntry (const MCSchedClassDesc *SC, unsigned DefIdx) const
 
int getReadAdvanceCycles (const MCSchedClassDesc *SC, unsigned UseIdx, unsigned WriteResID) const
 
InstrItineraryData getInstrItineraryForCPU (StringRef CPU) const
 
void initInstrItins (InstrItineraryData &InstrItins) const
 Initialize an InstrItineraryData instance. More...
 

Detailed Description

MCSubtargetInfo - Generic base class for all target subtargets.

Definition at line 29 of file MCSubtargetInfo.h.

Member Function Documentation

uint64_t llvm::MCSubtargetInfo::getFeatureBits ( ) const
inline
InstrItineraryData MCSubtargetInfo::getInstrItineraryForCPU ( StringRef  CPU) const

getInstrItineraryForCPU - Get scheduling itinerary of a CPU.

Definition at line 112 of file MCSubtargetInfo.cpp.

References getSchedModelForCPU().

Referenced by getItineraryLatency().

int llvm::MCSubtargetInfo::getReadAdvanceCycles ( const MCSchedClassDesc SC,
unsigned  UseIdx,
unsigned  WriteResID 
) const
inline
const MCSchedModel* llvm::MCSubtargetInfo::getSchedModel ( ) const
inline

getSchedModel - Get the machine model for this subtarget's CPU.

Definition at line 92 of file MCSubtargetInfo.h.

Referenced by getLatency(), and llvm::ScheduleDAGInstrs::ScheduleDAGInstrs().

const MCSchedModel * MCSubtargetInfo::getSchedModelForCPU ( StringRef  CPU) const

getSchedModelForCPU - Get the machine model of a CPU.

Definition at line 88 of file MCSubtargetInfo.cpp.

References llvm::MCSchedModel::DefaultSchedModel, llvm::errs(), llvm::SubtargetInfoKV::Key, llvm::LibFunc::strcmp, and llvm::SubtargetInfoKV::Value.

Referenced by getInstrItineraryForCPU(), and InitCPUSchedModel().

StringRef llvm::MCSubtargetInfo::getTargetTriple ( ) const
inline

getTargetTriple - Return the target triple string.

Definition at line 61 of file MCSubtargetInfo.h.

Referenced by createPPCMCInstPrinter().

const MCWriteLatencyEntry* llvm::MCSubtargetInfo::getWriteLatencyEntry ( const MCSchedClassDesc SC,
unsigned  DefIdx 
) const
inline
const MCWriteProcResEntry* llvm::MCSubtargetInfo::getWriteProcResBegin ( const MCSchedClassDesc SC) const
inline

Return an iterator at the first process resource consumed by the given scheduling class.

Definition at line 96 of file MCSubtargetInfo.h.

References llvm::MCSchedClassDesc::WriteProcResIdx.

Referenced by llvm::TargetSchedModel::computeOutputLatency(), llvm::TargetSchedModel::getWriteProcResBegin(), and getWriteProcResEnd().

const MCWriteProcResEntry* llvm::MCSubtargetInfo::getWriteProcResEnd ( const MCSchedClassDesc SC) const
inline
void MCSubtargetInfo::InitCPUSchedModel ( StringRef  CPU)

InitCPUSchedModel - Recompute scheduling model based on CPU.

Definition at line 34 of file MCSubtargetInfo.cpp.

References llvm::MCSchedModel::DefaultSchedModel, llvm::StringRef::empty(), and getSchedModelForCPU().

Referenced by InitMCProcessorInfo().

void MCSubtargetInfo::initInstrItins ( InstrItineraryData InstrItins) const

Initialize an InstrItineraryData instance.

Definition at line 118 of file MCSubtargetInfo.cpp.

Referenced by llvm::TargetSchedModel::init().

void MCSubtargetInfo::InitMCProcessorInfo ( StringRef  CPU,
StringRef  FS 
)

InitMCProcessorInfo - Set or change the CPU (optionally supplemented with feature string). Recompute feature bits and scheduling model.

Definition at line 25 of file MCSubtargetInfo.cpp.

References llvm::SubtargetFeatures::getFeatureBits(), and InitCPUSchedModel().

Referenced by InitMCSubtargetInfo().

void MCSubtargetInfo::InitMCSubtargetInfo ( StringRef  TT,
StringRef  CPU,
StringRef  FS,
const SubtargetFeatureKV PF,
const SubtargetFeatureKV PD,
const SubtargetInfoKV ProcSched,
const MCWriteProcResEntry WPR,
const MCWriteLatencyEntry WL,
const MCReadAdvanceEntry RA,
const InstrStage IS,
const unsigned OC,
const unsigned FP,
unsigned  NF,
unsigned  NP 
)

Definition at line 42 of file MCSubtargetInfo.cpp.

References InitMCProcessorInfo(), and llvm::SystemZISD::OC.

uint64_t 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 72 of file MCSubtargetInfo.cpp.

uint64_t MCSubtargetInfo::ToggleFeature ( StringRef  FS)

ToggleFeature - Toggle a feature and returns the re-computed feature bits. This version will also change all implied bits.

Definition at line 79 of file MCSubtargetInfo.cpp.

References llvm::SubtargetFeatures::ToggleFeature().


The documentation for this class was generated from the following files: