LLVM API Documentation

llvm::SubtargetFeatures Class Reference

#include <SubtargetFeature.h>

Collaboration diagram for llvm::SubtargetFeatures:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SubtargetFeatures (const std::string &Initial=std::string())
std::string getString () const
 Features string accessors.
void setString (const std::string &Initial)
void setCPU (const std::string &String)
 Set the CPU string. Replaces previous setting. Setting to "" clears CPU.
void setCPUIfNone (const std::string &String)
 Setting CPU string only if no string is set.
void AddFeature (const std::string &String, bool IsEnabled=true)
 Adding Features.
uint32_t getBits (const SubtargetFeatureKV *CPUTable, size_t CPUTableSize, const SubtargetFeatureKV *FeatureTable, size_t FeatureTableSize)
 Get feature bits.
void * getInfo (const SubtargetInfoKV *Table, size_t TableSize)
 Get info pointer.
void print (std::ostream &OS) const
 Print feature string.
void dump () const

Detailed Description

SubtargetFeatures - Manages the enabling and disabling of subtarget specific features. Features are encoded as a string of the form "cpu,+attr1,+attr2,-attr3,...,+attrN" A comma separates each feature from the next (all lowercase.) The first feature is always the CPU subtype (eg. pentiumm). If the CPU value is "generic" then the CPU subtype should be generic for the target. Each of the remaining features is prefixed with + or - indicating whether that feature should be enabled or disabled contrary to the cpu specification.

Definition at line 72 of file SubtargetFeature.h.


Constructor & Destructor Documentation

SubtargetFeatures::SubtargetFeatures ( const std::string &  Initial = std::string()  ) 

Definition at line 171 of file SubtargetFeature.cpp.

References Split().


Member Function Documentation

std::string SubtargetFeatures::getString (  )  const

Features string accessors.

Definition at line 177 of file SubtargetFeature.cpp.

References Join().

void SubtargetFeatures::setString ( const std::string &  Initial  ) 

Definition at line 180 of file SubtargetFeature.cpp.

References llvm::LowercaseString(), and Split().

void SubtargetFeatures::setCPU ( const std::string &  String  ) 

Set the CPU string. Replaces previous setting. Setting to "" clears CPU.

setCPU - Set the CPU string. Replaces previous setting. Setting to "" clears CPU.

Definition at line 190 of file SubtargetFeature.cpp.

References llvm::LowercaseString().

Referenced by setCPUIfNone().

void SubtargetFeatures::setCPUIfNone ( const std::string &  String  ) 

Setting CPU string only if no string is set.

setCPUIfNone - Setting CPU string only if no string is set.

Definition at line 197 of file SubtargetFeature.cpp.

References setCPU().

void SubtargetFeatures::AddFeature ( const std::string &  String,
bool  IsEnabled = true 
)

Adding Features.

Definition at line 104 of file SubtargetFeature.cpp.

References llvm::LowercaseString(), and PrependFlag().

uint32_t SubtargetFeatures::getBits ( const SubtargetFeatureKV CPUTable,
size_t  CPUTableSize,
const SubtargetFeatureKV FeatureTable,
size_t  FeatureTableSize 
)

Get feature bits.

getBits - Get feature bits.

Definition at line 204 of file SubtargetFeature.cpp.

References Bits, Find(), Help(), isEnabled(), StripFlag(), and llvm::SubtargetFeatureKV::Value.

void * SubtargetFeatures::getInfo ( const SubtargetInfoKV Table,
size_t  TableSize 
)

Get info pointer.

Definition at line 266 of file SubtargetFeature.cpp.

References Find(), and llvm::SubtargetInfoKV::Value.

void SubtargetFeatures::print ( std::ostream &  OS  )  const

Print feature string.

print - Print feature string.

Definition at line 291 of file SubtargetFeature.cpp.

Referenced by dump().

void SubtargetFeatures::dump (  )  const

dump - Dump feature info.

Definition at line 300 of file SubtargetFeature.cpp.

References print().


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