search for: getlazymodule

Displaying 8 results from an estimated 8 matches for "getlazymodule".

2016 Oct 26
2
RFC: APIs for bitcode files containing multiple modules
...al reader APIs in ReaderWriter.h would have a member function on BitcodeReader. We would also have a next() member function which would move to the next module in the file. For example: BitcodeReader R(MBRef); Expected<bool> B = R.hasGlobalValueSummary(); std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the first module R.next(); std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the second module We'd continue to support the existing functional APIs in ReaderWriter.h for convenience in the common case where the bitcode file has a single module....
2016 Oct 26
0
RFC: APIs for bitcode files containing multiple modules
...aderWriter.h would have a member function on BitcodeReader. We would also have a next() member function which would move to the next module in the file. For example: > > BitcodeReader R(MBRef); > Expected<bool> B = R.hasGlobalValueSummary(); > std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the first module > R.next(); > std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the second module That makes the API quite stateful, you may have good implementation reason for this, but they’re not clear to me. I rather see the bitcode reader...
2016 Oct 26
2
RFC: APIs for bitcode files containing multiple modules
...gt; would have a member function on BitcodeReader. We would also have a next() > member function which would move to the next module in the file. For > example: > > BitcodeReader R(MBRef); > Expected<bool> B = R.hasGlobalValueSummary(); > std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the > first module > R.next(); > std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the > second module > > > > That makes the API quite stateful, you may have good implementation reason > for this, but they’re not clear to me...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...le in the file. For >> example: >> >> BitcodeReader R(MBRef); >> Expected<bool> B = R.hasGlobalValueSummary(); What's this used for? Would there be a "readGlobalValueSummary()" similar to function summaries? >> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the >> first module >> R.next(); >> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load the >> second module I'm very excited about the idea of storing multiple modules in a bitcode file, and the (thin)LTO and CFI goodness yo...
2016 Oct 28
2
RFC: APIs for bitcode files containing multiple modules
...balValueSummary()" > similar to function summaries? > There would be a getModuleSummaryIndex() which again would be similar to llvm::getModuleSummaryIndex(). Note that the module summary already covers all global values, not just functions. >> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the > >> first module > >> R.next(); > >> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load > the > >> second module > > I'm very excited about the idea of storing multiple modules in a > bitcode file...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...ilar to function summaries? > > > There would be a getModuleSummaryIndex() which again would be similar to > llvm::getModuleSummaryIndex(). Note that the module summary already covers > all global values, not just functions. > >> >> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the >> >> first module >> >> R.next(); >> >> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load >> >> the >> >> second module >> >> I'm very excited about the idea of storing mu...
2016 Oct 28
2
RFC: APIs for bitcode files containing multiple modules
...t;> >> >> There would be a getModuleSummaryIndex() which again would be similar to >> llvm::getModuleSummaryIndex(). Note that the module summary already covers >> all global values, not just functions. >> >>>>> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the >>>>> first module >>>>> R.next(); >>>>> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load >>>>> the >>>>> second module >>> >>> I'm very excited abou...
2016 Oct 28
0
RFC: APIs for bitcode files containing multiple modules
...t;>> There would be a getModuleSummaryIndex() which again would be similar to >>> llvm::getModuleSummaryIndex(). Note that the module summary already covers >>> all global values, not just functions. >>> >>>>>> std::unique_ptr<Module> M1 = R.getLazyModule(Ctx); // lazily load the >>>>>> first module >>>>>> R.next(); >>>>>> std::unique_ptr<Module> M2 = R.parseBitcodeFile(Ctx); // eagerly load >>>>>> the >>>>>> second module >>>> >>>&g...