[llvm] r342853 - [ORC] Add some debugging output to Core.h/Core.cpp
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 23 14:30:05 PDT 2018
Author: lhames
Date: Sun Sep 23 14:30:05 2018
New Revision: 342853
URL: http://llvm.org/viewvc/llvm-project?rev=342853&view=rev
Log:
[ORC] Add some debugging output to Core.h/Core.cpp
Core now logs when materialization units are dispatched or return to JITDylibs.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h?rev=342853&r1=342852&r2=342853&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/Core.h Sun Sep 23 14:30:05 2018
@@ -18,6 +18,7 @@
#include "llvm/ExecutionEngine/JITSymbol.h"
#include "llvm/ExecutionEngine/Orc/SymbolStringPool.h"
#include "llvm/IR/Module.h"
+#include "llvm/Support/Debug.h"
#include <list>
#include <map>
@@ -25,6 +26,8 @@
#include <set>
#include <vector>
+#define DEBUG_TYPE "orc"
+
namespace llvm {
namespace orc {
@@ -736,6 +739,8 @@ public:
/// Materialize the given unit.
void dispatchMaterialization(JITDylib &JD,
std::unique_ptr<MaterializationUnit> MU) {
+ LLVM_DEBUG(dbgs() << "For " << JD.getName() << " compiling "
+ << MU->getSymbols() << "\n");
DispatchMaterialization(JD, std::move(MU));
}
@@ -832,4 +837,6 @@ private:
} // End namespace orc
} // End namespace llvm
+#undef DEBUG_TYPE // "orc"
+
#endif // LLVM_EXECUTIONENGINE_ORC_CORE_H
Modified: llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp?rev=342853&r1=342852&r2=342853&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Orc/Core.cpp Sun Sep 23 14:30:05 2018
@@ -18,6 +18,8 @@
#include <future>
#endif
+#define DEBUG_TYPE "orc"
+
namespace llvm {
namespace orc {
@@ -334,6 +336,8 @@ void MaterializationResponsibility::repl
for (auto &KV : MU->getSymbols())
SymbolFlags.erase(KV.first);
+ LLVM_DEBUG(dbgs() << "For " << JD.getName() << " replacing " << MU->getSymbols() << "\n");
+
JD.replace(std::move(MU));
}
More information about the llvm-commits
mailing list