[llvm] a7b8393 - [ORC] Don't waste time building empty replacement MaterializationUnits.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 11:03:59 PDT 2020
Author: Lang Hames
Date: 2020-03-19T11:02:56-07:00
New Revision: a7b8393ffea94d387f60d71ab5e1e026e1d00ffb
URL: https://github.com/llvm/llvm-project/commit/a7b8393ffea94d387f60d71ab5e1e026e1d00ffb
DIFF: https://github.com/llvm/llvm-project/commit/a7b8393ffea94d387f60d71ab5e1e026e1d00ffb.diff
LOG: [ORC] Don't waste time building empty replacement MaterializationUnits.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
index 3905ce9bf5ac..a8e88a9785c5 100644
--- a/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
@@ -165,10 +165,12 @@ void CompileOnDemandLayer::emit(MaterializationResponsibility R,
return;
}
- R.replace(reexports(PDR.getImplDylib(), std::move(NonCallables),
- JITDylibLookupFlags::MatchAllSymbols));
- R.replace(lazyReexports(LCTMgr, PDR.getISManager(), PDR.getImplDylib(),
- std::move(Callables), AliaseeImpls));
+ if (!NonCallables.empty())
+ R.replace(reexports(PDR.getImplDylib(), std::move(NonCallables),
+ JITDylibLookupFlags::MatchAllSymbols));
+ if (!Callables.empty())
+ R.replace(lazyReexports(LCTMgr, PDR.getISManager(), PDR.getImplDylib(),
+ std::move(Callables), AliaseeImpls));
}
CompileOnDemandLayer::PerDylibResources &
More information about the llvm-commits
mailing list