[OpenMP][Offload] Revert format of changed messages (#171995)
Adjust format of some of the updated debug output to match the old format as there are a number of tests that rely on it.
This commit is contained in:
parent
eaf6d9a2ff
commit
8dd75fa473
@ -44,6 +44,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
#include "llvm/Support/circular_raw_ostream.h"
|
||||
|
||||
/// 32-Bit field data attributes controlling information presented to the user.
|
||||
@ -578,6 +579,12 @@ static inline odbg_ostream reportErrorStream() {
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
// Define default format for pointers
|
||||
static inline raw_ostream &operator<<(raw_ostream &Os, void *Ptr) {
|
||||
Os << ::llvm::format(DPxMOD, DPxPTR(Ptr));
|
||||
return Os;
|
||||
}
|
||||
|
||||
#else
|
||||
#define DP(...) \
|
||||
{ \
|
||||
|
||||
@ -25,7 +25,6 @@
|
||||
#include "Utils/ExponentialBackoff.h"
|
||||
|
||||
#include "llvm/Frontend/OpenMP/OMPConstants.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdint>
|
||||
@ -138,9 +137,9 @@ targetData(ident_t *Loc, int64_t DeviceId, int32_t ArgNum, void **ArgsBase,
|
||||
RegionTypeMsg);
|
||||
ODBG_OS(ODT_Kernel, [&](llvm::raw_ostream &Os) {
|
||||
for (int I = 0; I < ArgNum; ++I) {
|
||||
Os << "Entry " << llvm::format_decimal(I, 2) << ": Base=" << ArgsBase[I]
|
||||
Os << "Entry " << llvm::format("%2d", I) << ": Base=" << ArgsBase[I]
|
||||
<< ", Begin=" << Args[I] << ", Size=" << ArgSizes[I]
|
||||
<< ", Type=" << llvm::format_hex(ArgTypes[I], 8) << ", Name="
|
||||
<< ", Type=" << llvm::format("0x%" PRIx64, ArgTypes[I]) << ", Name="
|
||||
<< ((ArgNames) ? getNameFromMapping(ArgNames[I]) : "unknown") << "\n";
|
||||
}
|
||||
});
|
||||
@ -358,11 +357,11 @@ static inline int targetKernel(ident_t *Loc, int64_t DeviceId, int32_t NumTeams,
|
||||
|
||||
ODBG_OS(ODT_Kernel, [&](llvm::raw_ostream &Os) {
|
||||
for (uint32_t I = 0; I < KernelArgs->NumArgs; ++I) {
|
||||
Os << "Entry " << llvm::format_decimal(I, 2)
|
||||
Os << "Entry" << llvm::format("%2d", I)
|
||||
<< ": Base=" << KernelArgs->ArgBasePtrs[I]
|
||||
<< ", Begin=" << KernelArgs->ArgPtrs[I]
|
||||
<< ", Size=" << KernelArgs->ArgSizes[I]
|
||||
<< ", Type=" << llvm::format_hex(KernelArgs->ArgTypes[I], 8)
|
||||
<< ", Type=" << llvm::format("0x%" PRIx64, KernelArgs->ArgTypes[I])
|
||||
<< ", Name="
|
||||
<< (KernelArgs->ArgNames
|
||||
? getNameFromMapping(KernelArgs->ArgNames[I]).c_str()
|
||||
@ -508,7 +507,8 @@ EXTERN void __tgt_push_mapper_component(void *RtMapperHandle, void *Base,
|
||||
ODBG(ODT_Interface) << "__tgt_push_mapper_component(Handle=" << RtMapperHandle
|
||||
<< ") adds an entry (Base=" << Base << ", Begin=" << Begin
|
||||
<< ", Size=" << Size
|
||||
<< ", Type=" << llvm::format_hex(Type, 8) << ", Name="
|
||||
<< ", Type=" << llvm::format("0x%" PRIx64, Type)
|
||||
<< ", Name="
|
||||
<< ((Name) ? getNameFromMapping(Name) : "unknown") << ")";
|
||||
auto *MapperComponentsPtr = (struct MapperComponentsTy *)RtMapperHandle;
|
||||
MapperComponentsPtr->Components.push_back(
|
||||
|
||||
@ -1311,7 +1311,7 @@ static int targetDataNonContiguous(ident_t *Loc, DeviceTy &Device,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
char *Ptr = (char *)ArgsBase + Offset;
|
||||
void *Ptr = reinterpret_cast<void *>((char *)ArgsBase + Offset);
|
||||
ODBG(ODT_Mapping) << "Transfer of non-contiguous : host ptr " << Ptr
|
||||
<< " offset " << Offset << " len " << Size;
|
||||
Ret = targetDataContiguous(Loc, Device, ArgsBase, Ptr, Size, ArgType,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user