LLVM API Documentation

SubtargetFeature.cpp File Reference

#include "llvm/Target/SubtargetFeature.h"
#include "llvm/ADT/StringExtras.h"
#include <algorithm>
#include <cassert>
#include <cctype>
#include <iostream>

Include dependency graph for SubtargetFeature.cpp:

Go to the source code of this file.

Functions

static bool hasFlag (const std::string &Feature)
static std::string StripFlag (const std::string &Feature)
static bool isEnabled (const std::string &Feature)
static std::string PrependFlag (const std::string &Feature, bool IsEnabled)
static void Split (std::vector< std::string > &V, const std::string &S)
static std::string Join (const std::vector< std::string > &V)
template<typename T>
const TFind (const std::string &S, const T *A, size_t L)
 Find KV in array using binary search.
static size_t getLongestEntryLength (const SubtargetFeatureKV *Table, size_t Size)
static void Help (const SubtargetFeatureKV *CPUTable, size_t CPUTableSize, const SubtargetFeatureKV *FeatTable, size_t FeatTableSize)


Function Documentation

template<typename T>
const T* Find ( const std::string &  S,
const T A,
size_t  L 
)

Find KV in array using binary search.

Definition at line 114 of file SubtargetFeature.cpp.

References F, SPISD::Hi, and T.

Referenced by llvm::SubtargetFeatures::getBits(), and llvm::SubtargetFeatures::getInfo().

static size_t getLongestEntryLength ( const SubtargetFeatureKV Table,
size_t  Size 
) [static]

getLongestEntryLength - Return the length of the longest entry in the table.

Definition at line 130 of file SubtargetFeature.cpp.

Referenced by Help().

static bool hasFlag ( const std::string &  Feature  )  [inline, static]

hasFlag - Determine if a feature has a flag; '+' or '-'

Definition at line 28 of file SubtargetFeature.cpp.

Referenced by PrependFlag(), and StripFlag().

static void Help ( const SubtargetFeatureKV CPUTable,
size_t  CPUTableSize,
const SubtargetFeatureKV FeatTable,
size_t  FeatTableSize 
) [static]

Display help for feature choices.

Definition at line 140 of file SubtargetFeature.cpp.

References getLongestEntryLength().

Referenced by llvm::SubtargetFeatures::getBits().

static bool isEnabled ( const std::string &  Feature  )  [inline, static]

isEnabled - Return true if enable flag; '+'.

Definition at line 44 of file SubtargetFeature.cpp.

Referenced by llvm::SubtargetFeatures::getBits().

static std::string Join ( const std::vector< std::string > &  V  )  [static]

Join a vector of strings to a string with a comma separating each element.

Definition at line 84 of file SubtargetFeature.cpp.

Referenced by llvm::SubtargetFeatures::getString().

static std::string PrependFlag ( const std::string &  Feature,
bool  IsEnabled 
) [inline, static]

PrependFlag - Return a string with a prepended flag; '+' or '-'.

Definition at line 54 of file SubtargetFeature.cpp.

References hasFlag().

Referenced by llvm::SubtargetFeatures::AddFeature().

static void Split ( std::vector< std::string > &  V,
const std::string &  S 
) [static]

Split - Splits a string of comma separated items in to a vector of strings.

Definition at line 63 of file SubtargetFeature.cpp.

Referenced by HandleInlinedInvoke(), llvm::SubtargetFeatures::setString(), and llvm::SubtargetFeatures::SubtargetFeatures().

static std::string StripFlag ( const std::string &  Feature  )  [inline, static]

StripFlag - Return string stripped of flag.

Definition at line 38 of file SubtargetFeature.cpp.

References hasFlag().

Referenced by llvm::SubtargetFeatures::getBits().