10 #ifndef LLVM_IR_MODULESUMMARYINDEXYAML_H
11 #define LLVM_IR_MODULESUMMARYINDEXYAML_H
72 std::vector<FunctionSummaryYaml> FSums;
79 auto &Elem = V[KeyInt];
80 for (
auto &FSum : FSums) {
83 Elem.push_back(llvm::make_unique<FunctionSummary>(
90 std::vector<FunctionSummaryYaml> FSums;
91 for (
auto &Sum :
P.second) {
92 if (
auto *FSum = dyn_cast<FunctionSummary>(Sum.get()))
103 io.
mapOptional(
"GlobalValueMap", index.GlobalValueMap);
std::enable_if< std::numeric_limits< T >::is_signed, bool >::type getAsInteger(unsigned Radix, T &Result) const
Parse the current string as an integer of the specified radix.
void mapOptional(const char *Key, T &Val)
Unsatisfiable type (i.e. no global has this type metadata)
std::map< GlobalValue::GUID, GlobalValueSummaryList > GlobalValueSummaryMapTy
Map from global value GUID to corresponding summary structures.
#define LLVM_YAML_IS_SEQUENCE_VECTOR(_type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence...
Kind
Specifies which kind of type check we should emit for this byte array.
virtual void setError(const Twine &)=0
std::vector< uint64_t > TypeTests
static void inputOne(IO &io, StringRef Key, GlobalValueSummaryMapTy &V)
#define LLVM_YAML_IS_STRING_MAP(_type)
Utility for declaring that std::map<std::string, _type> should be considered a YAML map...
static void output(IO &io, GlobalValueSummaryMapTy &V)
This class should be specialized by any type that needs to be converted to/from a YAML mapping...
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static std::string utostr(uint64_t X, bool isNeg=false)
Class to hold module path string table and global value map, and encapsulate methods for operating on...
static void mapping(IO &io, ModuleSummaryIndex &index)
void enumCase(T &Val, const char *Str, const T ConstVal)
This class should be specialized by any type that needs to be converted to/from a YAML mapping in the...
Single element (last example in "Short Inline Bit Vectors")
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
This class should be specialized by any integral type that converts to/from a YAML scalar where there...
static void mapping(IO &io, TypeTestResolution &res)
enum llvm::TypeTestResolution::Kind TheKind
Test a byte array (first example)
All-ones bit vector ("Eliminating Bit Vector Checks for All-Ones Bit Vectors") ...
Inlined bit vector ("Short Inline Bit Vectors")
unsigned SizeM1BitWidth
Range of size-1 expressed as a bit width.
static void mapping(IO &io, TypeIdSummary &summary)
static void mapping(IO &io, FunctionSummaryYaml &summary)
ModuleSummaryIndex.h This file contains the declarations the classes that hold the module index and s...
static void enumeration(IO &io, TypeTestResolution::Kind &value)
Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield.
StringRef - Represent a constant reference to a string, i.e.
void mapRequired(const char *Key, T &Val)