mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[ThinLTO] Make sure the Context used for the ThinLTO backend has all the appropriate options
An important performance setting on the LLVMContext for LTO is enableDebugTypeODRUniquing(), this adds an automatic merging of debug information in the context based on type ids. Also, the lto::Config includes a diagnostic handler that needs to be set on the Context, as well as the setDiscardValueNames() setting. llvm-svn: 279532
This commit is contained in:
parent
ea8274b8b0
commit
6dfb67d640
@ -468,7 +468,7 @@ public:
|
||||
const FunctionImporter::ImportMapTy &ImportList,
|
||||
const GVSummaryMapTy &DefinedGlobals,
|
||||
MapVector<StringRef, MemoryBufferRef> &ModuleMap) {
|
||||
LLVMContext BackendContext;
|
||||
LTOLLVMContext BackendContext(Conf);
|
||||
|
||||
ErrorOr<std::unique_ptr<Module>> MOrErr =
|
||||
parseBitcodeFile(MBRef, BackendContext);
|
||||
|
@ -271,6 +271,8 @@ Error lto::thinBackend(Config &Conf, unsigned Task, AddOutputFn AddOutput,
|
||||
return Error();
|
||||
|
||||
auto ModuleLoader = [&](StringRef Identifier) {
|
||||
assert(Mod.getContext().isODRUniquingDebugTypes() &&
|
||||
"ODR Type uniquing shoudl be enabled on the context");
|
||||
return std::move(getLazyBitcodeModule(MemoryBuffer::getMemBuffer(
|
||||
ModuleMap[Identifier], false),
|
||||
Mod.getContext(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user