From: Evandro Menezes Date: Wed, 9 Jan 2019 23:57:15 +0000 (+0000) Subject: [llvm-mca] Display masks in hex X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb50ac5e3feb2b9c45f2c2e66a0798fb2ca3d277;p=llvm [llvm-mca] Display masks in hex Display the resources masks as hexadecimal. Otherwise, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350777 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/MCA/HardwareUnits/ResourceManager.cpp b/lib/MCA/HardwareUnits/ResourceManager.cpp index e3a0da2dafe..d05ec0045de 100644 --- a/lib/MCA/HardwareUnits/ResourceManager.cpp +++ b/lib/MCA/HardwareUnits/ResourceManager.cpp @@ -99,9 +99,9 @@ ResourceStateEvent ResourceState::isBufferAvailable() const { #ifndef NDEBUG void ResourceState::dump() const { - dbgs() << "MASK=" << format_hex(ResourceMask, 8) - << ", SZMASK=" << format_hex(ResourceSizeMask, 8) - << ", RDYMASK=" << format_hex(ReadyMask, 8) + dbgs() << "MASK=" << format_hex(ResourceMask, 16) + << ", SZMASK=" << format_hex(ResourceSizeMask, 16) + << ", RDYMASK=" << format_hex(ReadyMask, 16) << ", BufferSize=" << BufferSize << ", AvailableSlots=" << AvailableSlots << ", Reserved=" << Unavailable << '\n'; diff --git a/lib/MCA/InstrBuilder.cpp b/lib/MCA/InstrBuilder.cpp index 76881b0982f..2cfe154a902 100644 --- a/lib/MCA/InstrBuilder.cpp +++ b/lib/MCA/InstrBuilder.cpp @@ -178,9 +178,10 @@ static void initializeUsedResources(InstrDesc &ID, LLVM_DEBUG({ for (const std::pair &R : ID.Resources) - dbgs() << "\t\tMask=" << R.first << ", cy=" << R.second.size() << '\n'; + dbgs() << "\t\tMask=" << format_hex(R.first, 16) << ", " << + "cy=" << R.second.size() << '\n'; for (const uint64_t R : ID.Buffers) - dbgs() << "\t\tBuffer Mask=" << R << '\n'; + dbgs() << "\t\tBuffer Mask=" << format_hex(R, 16) << '\n'; }); }