Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions llvm/include/llvm/SYCLPostLink/ModuleSplitter.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,13 @@ getDeviceCodeSplitter(ModuleDesc &&MD, IRSplitMode Mode, bool IROutputOnly,
bool EmitOnlyKernelsAsEntryPoints,
bool AllowDeviceImageDependencies);

#ifndef NDEBUG
void dumpEntryPoints(const EntryPointSet &C, const char *Msg = "", int Tab = 0);
void dumpEntryPoints(const Module &M, bool OnlyKernelsAreEntryPoints = false,
const char *Msg = "", int Tab = 0);
#endif // NDEBUG
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void dumpEntryPoints(const EntryPointSet &C,
const char *Msg = "", int Tab = 0);
LLVM_DUMP_METHOD void dumpEntryPoints(const Module &M,
bool OnlyKernelsAreEntryPoints = false,
const char *Msg = "", int Tab = 0);
#endif

struct SplitModule {
std::string ModuleFilePath;
Expand Down
16 changes: 1 addition & 15 deletions llvm/lib/SYCLPostLink/ESIMDPostSplitProcessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,6 @@
#include <string>
#include <vector>

#ifdef NDEBUG
#define DUMP_ENTRY_POINTS(...)
#else
constexpr int DebugESIMDPostSplit = 0;

#define DUMP_ENTRY_POINTS(...) \
if (DebugESIMDPostSplit > 0) { \
llvm::module_split::dumpEntryPoints(__VA_ARGS__); \
}
#endif // NDEBUG

using namespace llvm;
using namespace llvm::module_split;

Expand Down Expand Up @@ -134,11 +123,9 @@ llvm::sycl::handleESIMD(ModuleDesc MDesc,

SplitOccurred |= Result.size() > 1;

for (ModuleDesc &MD : Result) {
DUMP_ENTRY_POINTS(MD.entries(), MD.Name.c_str(), 4);
for (ModuleDesc &MD : Result)
if (Options.LowerESIMD && MD.isESIMD())
Modified |= lowerESIMDConstructs(MD, Options);
}

if (Options.SplitESIMD || Result.size() == 1)
return std::move(Result);
Expand All @@ -164,7 +151,6 @@ llvm::sycl::handleESIMD(ModuleDesc MDesc,
Linked.rebuildEntryPoints(Names);
Result.clear();
Result.emplace_back(std::move(Linked));
DUMP_ENTRY_POINTS(Result.back().entries(), Result.back().Name.c_str(), 4);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking that we don't need this anymore, not even under the appropriate ifdefs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use LLVM_DEBUG(...) for that. I just don't know whether anyone really needs that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with removing it, just wanted to make sure it was intended.

Modified = true;

return std::move(Result);
Expand Down
Loading