Go to the documentation of this file.
32 bool ShouldPreserveUseListOrder;
33 bool EmitSummaryIndex;
42 explicit WriteBitcodePass(
raw_ostream &o,
bool ShouldPreserveUseListOrder,
43 bool EmitSummaryIndex,
bool EmitModuleHash)
45 ShouldPreserveUseListOrder(ShouldPreserveUseListOrder),
46 EmitSummaryIndex(EmitSummaryIndex), EmitModuleHash(EmitModuleHash) {
50 StringRef getPassName()
const override {
return "Bitcode Writer"; }
52 bool runOnModule(
Module &M)
override {
55 ? &(getAnalysis<ModuleSummaryIndexWrapperPass>().getIndex())
77 bool ShouldPreserveUseListOrder,
78 bool EmitSummaryIndex,
bool EmitModuleHash) {
79 return new WriteBitcodePass(Str, ShouldPreserveUseListOrder,
80 EmitSummaryIndex, EmitModuleHash);
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
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
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Error write(MCStreamer &Out, ArrayRef< std::string > Inputs)
Analysis pass to provide the ModuleSummaryIndex object.
ModulePass * createBitcodeWriterPass(raw_ostream &Str, bool ShouldPreserveUseListOrder=false, bool EmitSummaryIndex=false, bool EmitModuleHash=false)
Create and return a pass that writes the module to the specified ostream.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
void initializeWriteBitcodePassPass(PassRegistry &)
Represent the analysis usage information of a pass.
INITIALIZE_PASS_BEGIN(WriteBitcodePass, "write-bitcode", "Write Bitcode", false, true) INITIALIZE_PASS_END(WriteBitcodePass
This class implements an extremely fast bulk output stream that can only output to a stream.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
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.
void setPreservesAll()
Set by analyses that do not transform their input at all.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
Run the bitcode writer pass, and output the module to the selected output stream.
Pass interface - Implemented by all 'passes'.
Class to hold module path string table and global value map, and encapsulate methods for operating on...
A container for analyses that lazily runs them and caches their results.
AnalysisUsage & addRequired()
Legacy wrapper pass to provide the ModuleSummaryIndex object.
bool isBitcodeWriterPass(Pass *P)
Check whether a pass is a BitcodeWriterPass.