2121#include " llvm/IR/PassManager.h"
2222#include " llvm/IR/PassManagerImpl.h"
2323#include " llvm/IRPrinter/IRPrintingPasses.h"
24+ #include " llvm/Support/Compiler.h"
2425#include " llvm/Support/Debug.h"
2526#include " llvm/Support/Error.h"
2627#include " llvm/Support/FileSystem.h"
3738
3839using namespace llvm ;
3940
40- #define DEBUG_TYPE " sycl_module_split "
41+ #define DEBUG_TYPE " sycl-module-split "
4142
4243static bool isKernel (const Function &F) {
4344 return F.getCallingConv () == CallingConv::SPIR_KERNEL ||
@@ -75,7 +76,8 @@ struct EntryPointGroup {
7576 EntryPointSet Functions = EntryPointSet())
7677 : GroupName(GroupName), Functions(std::move(Functions)) {}
7778
78- void dump () const {
79+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
80+ LLVM_DUMP_METHOD void dump () const {
7981 constexpr size_t INDENT = 4 ;
8082 dbgs ().indent (INDENT) << " ENTRY POINTS"
8183 << " " << GroupName << " {\n " ;
@@ -84,6 +86,7 @@ struct EntryPointGroup {
8486
8587 dbgs ().indent (INDENT) << " }\n " ;
8688 }
89+ #endif
8790};
8891
8992// / Annotates an llvm::Module with information necessary to perform and track
@@ -133,11 +136,13 @@ class ModuleDesc {
133136 return std::string (ST);
134137 }
135138
136- void dump () const {
139+ #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
140+ LLVM_DUMP_METHOD void dump () const {
137141 dbgs () << " ModuleDesc[" << M->getName () << " ] {\n " ;
138142 EntryPoints.dump ();
139143 dbgs () << " }\n " ;
140144 }
145+ #endif
141146};
142147
143148// Represents "dependency" or "use" graph of global objects (functions and
0 commit comments