Go to the documentation of this file.
13 #ifndef LLVM_BITCODE_BITCODEWRITER_H
14 #define LLVM_BITCODE_BITCODEWRITER_H
28 class BitstreamWriter;
34 std::unique_ptr<BitstreamWriter> Stream;
42 bool WroteStrtab =
false, WroteSymtab =
false;
46 std::vector<Module *> Mods;
91 bool GenerateHash =
false,
ModuleHash *ModHash =
nullptr);
105 const std::map<std::string, GVSummaryMapTy> *ModuleToSummariesForIndex);
130 bool ShouldPreserveUseListOrder =
false,
132 bool GenerateHash =
false,
152 const std::map<std::string, GVSummaryMapTy>
153 *ModuleToSummariesForIndex =
nullptr);
166 const std::vector<uint8_t> &CmdArgs);
170 #endif // LLVM_BITCODE_BITCODEWRITER_H
This class represents lattice values for constants.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
void writeModule(const Module &M, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the buffer specified at construction time.
void writeIndex(const ModuleSummaryIndex *Index, const std::map< std::string, GVSummaryMapTy > *ModuleToSummariesForIndex)
void WriteIndexToFile(const ModuleSummaryIndex &Index, raw_ostream &Out, const std::map< std::string, GVSummaryMapTy > *ModuleToSummariesForIndex=nullptr)
Write the specified module summary index to the given raw output stream, where it will be written in ...
This class implements an extremely fast bulk output stream that can only output to a stream.
void EmbedBitcodeInModule(Module &M, MemoryBufferRef Buf, bool EmbedBitcode, bool EmbedCmdline, const std::vector< uint8_t > &CmdArgs)
If EmbedBitcode is set, save a copy of the llvm IR as data in the __LLVM,__bitcode section (....
Allocate memory in an ever growing pool, as if by bump-pointer.
void WriteThinLinkBitcodeToFile(const Module &M, raw_ostream &Out, const ModuleSummaryIndex &Index, const ModuleHash &ModHash)
Write the specified thin link bitcode file (i.e., the minimized bitcode file) to the given raw output...
A Module instance is used to store all the information related to an LLVM module.
void WriteBitcodeToFile(const Module &M, raw_ostream &Out, bool ShouldPreserveUseListOrder=false, const ModuleSummaryIndex *Index=nullptr, bool GenerateHash=false, ModuleHash *ModHash=nullptr)
Write the specified module to the specified raw output stream.
StringRef - Represent a constant reference to a string, i.e.
Machine Check Debug Module
static cl::opt< LTOBitcodeEmbedding > EmbedBitcode("lto-embed-bitcode", cl::init(LTOBitcodeEmbedding::DoNotEmbed), cl::values(clEnumValN(LTOBitcodeEmbedding::DoNotEmbed, "none", "Do not embed"), clEnumValN(LTOBitcodeEmbedding::EmbedOptimized, "optimized", "Embed after all optimization passes"), clEnumValN(LTOBitcodeEmbedding::EmbedPostMergePreOptimized, "post-merge-pre-opt", "Embed post merge, but before optimizations")), cl::desc("Embed LLVM bitcode in object files produced by LTO"))
void writeStrtab()
Write the bitcode file's string table.
Utility for building string tables with deduplicated suffixes.
void writeThinLinkBitcode(const Module &M, const ModuleSummaryIndex &Index, const ModuleHash &ModHash)
Write the specified thin link bitcode file (i.e., the minimized bitcode file) to the buffer specified...
void copyStrtab(StringRef Strtab)
Copy the string table for another module into this bitcode file.
A raw_ostream of a file for reading/writing/seeking.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
void writeSymtab()
Attempt to write a symbol table to the bitcode file.
BitcodeWriter(SmallVectorImpl< char > &Buffer, raw_fd_stream *FS=nullptr)
Create a BitcodeWriter that writes to Buffer.
std::array< uint32_t, 5 > ModuleHash
160 bits SHA1