LLVM API Documentation

llvm::SubtargetFeatures Class Reference

#include <SubtargetFeature.h>

Collaboration diagram for llvm::SubtargetFeatures:
[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 print (std::ostream *OS) const
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 74 of file SubtargetFeature.h.


Constructor & Destructor Documentation

SubtargetFeatures::SubtargetFeatures ( const std::string &  Initial = std::string()  )  [explicit]

Definition at line 172 of file SubtargetFeature.cpp.

References Split().


Member Function Documentation

std::string SubtargetFeatures::getString (  )  const

Features string accessors.

Definition at line 178 of file SubtargetFeature.cpp.

References Join().

Referenced by llvm::JIT::createJIT().

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

Definition at line 181 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 191 of file SubtargetFeature.cpp.

References llvm::LowercaseString().

Referenced by llvm::JIT::createJIT(), and 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 198 of file SubtargetFeature.cpp.

References setCPU().

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

Adding Features.

Adding features.

Definition at line 105 of file SubtargetFeature.cpp.

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

Referenced by llvm::JIT::createJIT().

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 242 of file SubtargetFeature.cpp.

References llvm::cerr(), ClearImpliedBits(), Find(), Help(), isEnabled(), SetImpliedBits(), StripFlag(), and llvm::SubtargetFeatureKV::Value.

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

Get info pointer.

Definition at line 321 of file SubtargetFeature.cpp.

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

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

Print feature string.

print - Print feature string.

Definition at line 346 of file SubtargetFeature.cpp.

Referenced by dump(), and print().

void llvm::SubtargetFeatures::print ( std::ostream *  OS  )  const [inline]

Definition at line 103 of file SubtargetFeature.h.

References print().

void SubtargetFeatures::dump (  )  const

dump - Dump feature info.

Definition at line 355 of file SubtargetFeature.cpp.

References llvm::cerr(), and print().


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