|  | 
| 27 | 27 | #include <string> | 
| 28 | 28 | #include <vector> | 
| 29 | 29 | 
 | 
|  | 30 | +#ifdef NDEBUG | 
|  | 31 | +#define DUMP_ENTRY_POINTS(...) | 
|  | 32 | +#else | 
|  | 33 | +constexpr int DebugESIMDPostSplit = 0; | 
|  | 34 | + | 
|  | 35 | +#define DUMP_ENTRY_POINTS(...)                                                 \ | 
|  | 36 | +  if (DebugESIMDPostSplit > 0) {                                               \ | 
|  | 37 | +    llvm::module_split::dumpEntryPoints(__VA_ARGS__);                          \ | 
|  | 38 | +  } | 
|  | 39 | +#endif // NDEBUG | 
|  | 40 | + | 
| 30 | 41 | using namespace llvm; | 
| 31 | 42 | using namespace llvm::module_split; | 
| 32 | 43 | 
 | 
| @@ -124,9 +135,7 @@ llvm::sycl::handleESIMD(ModuleDesc MDesc, | 
| 124 | 135 |   SplitOccurred |= Result.size() > 1; | 
| 125 | 136 | 
 | 
| 126 | 137 |   for (ModuleDesc &MD : Result) { | 
| 127 |  | -#ifdef LLVM_ENABLE_DUMP | 
| 128 |  | -    dumpEntryPoints(MD.entries(), MD.Name.c_str(), 4); | 
| 129 |  | -#endif // LLVM_ENABLE_DUMP | 
|  | 138 | +    DUMP_ENTRY_POINTS(MD.entries(), MD.Name.c_str(), 4); | 
| 130 | 139 |     if (Options.LowerESIMD && MD.isESIMD()) | 
| 131 | 140 |       Modified |= lowerESIMDConstructs(MD, Options); | 
| 132 | 141 |   } | 
| @@ -155,9 +164,7 @@ llvm::sycl::handleESIMD(ModuleDesc MDesc, | 
| 155 | 164 |   Linked.rebuildEntryPoints(Names); | 
| 156 | 165 |   Result.clear(); | 
| 157 | 166 |   Result.emplace_back(std::move(Linked)); | 
| 158 |  | -#ifdef LLVM_ENABLE_DUMP | 
| 159 |  | -  dumpEntryPoints(Result.back().entries(), Result.back().Name.c_str(), 4); | 
| 160 |  | -#endif // LLVM_ENABLE_DUMP | 
|  | 167 | +  DUMP_ENTRY_POINTS(Result.back().entries(), Result.back().Name.c_str(), 4); | 
| 161 | 168 |   Modified = true; | 
| 162 | 169 | 
 | 
| 163 | 170 |   return std::move(Result); | 
|  | 
0 commit comments