Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
30 changes: 16 additions & 14 deletions sycl-fusion/passes/kernel-fusion/SYCLSpecConstMaterializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,23 @@ void SYCLSpecConstMaterializer::populateUses(Argument *A) {
}

void SYCLSpecConstMaterializer::reportAndReset() {
if (LoadsToTypes.empty()) {
LLVM_DEBUG(dbgs() << "Did not find any loads from spec const buffer.\n");
} else {
LLVM_DEBUG(dbgs() << "Replaced: " << LoadsToTypes.size()
<< " loads from spec const buffer.\n");
LLVM_DEBUG(dbgs() << "Load to global variable mappings:\n");
for (auto &LTT : LoadsToTypes) {
LLVM_DEBUG(dbgs() << "\tLoad:\n");
LLVM_DEBUG(LTT.first->dump());
LLVM_DEBUG(dbgs() << "\tGlobal Variable:\n");
LLVM_DEBUG(TypesAndOffsetsToBlob[LTT.second]->dump());
LLVM_DEBUG(dbgs() << "\n");
LLVM_DEBUG({
if (LoadsToTypes.empty()) {
dbgs() << "Did not find any loads from spec const buffer.\n";
} else {
dbgs() << "Replaced: " << LoadsToTypes.size()
<< " loads from spec const buffer.\n";
dbgs() << "Load to global variable mappings:\n";
for (auto &LTT : LoadsToTypes) {
dbgs() << "\tLoad:\n";
LTT.first->dump();
dbgs() << "\tGlobal Variable:\n";
TypesAndOffsetsToBlob[LTT.second]->dump();
dbgs() << "\n";
}
}
}
LLVM_DEBUG(dbgs() << "\n\n");
dbgs() << "\n\n";
});

// Reset the state.
TypesAndOffsets.clear();
Expand Down
4 changes: 3 additions & 1 deletion sycl/source/detail/program_manager/program_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ isDeviceBinaryTypeSupported(const context &C,
return true;
}

static const char *getFormatStr(sycl::detail::pi::PiDeviceBinaryType Format) {
// getFormatStr is used for debug-printing, so it may be unused.
[[maybe_unused]] static const char *
getFormatStr(sycl::detail::pi::PiDeviceBinaryType Format) {
switch (Format) {
case PI_DEVICE_BINARY_TYPE_NONE:
return "none";
Expand Down