From 577f316c71900717231e6970681e0c894c6e7bf6 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Fri, 31 Mar 2023 17:07:19 -0700 Subject: [PATCH] [ORC] Simplify some ExecutorAddr uses by removing getValue and formatv. --- llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp index 624408e..fd8329c 100644 --- a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp +++ b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp @@ -126,23 +126,22 @@ SimpleRemoteEPC::handleMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, case SimpleRemoteEPCOpcode::Setup: dbgs() << "Setup"; assert(SeqNo == 0 && "Non-zero SeqNo for Setup?"); - assert(TagAddr.getValue() == 0 && "Non-zero TagAddr for Setup?"); + assert(!TagAddr && "Non-zero TagAddr for Setup?"); break; case SimpleRemoteEPCOpcode::Hangup: dbgs() << "Hangup"; assert(SeqNo == 0 && "Non-zero SeqNo for Hangup?"); - assert(TagAddr.getValue() == 0 && "Non-zero TagAddr for Hangup?"); + assert(!TagAddr && "Non-zero TagAddr for Hangup?"); break; case SimpleRemoteEPCOpcode::Result: dbgs() << "Result"; - assert(TagAddr.getValue() == 0 && "Non-zero TagAddr for Result?"); + assert(!TagAddr && "Non-zero TagAddr for Result?"); break; case SimpleRemoteEPCOpcode::CallWrapper: dbgs() << "CallWrapper"; break; } - dbgs() << ", seqno = " << SeqNo - << ", tag-addr = " << formatv("{0:x}", TagAddr.getValue()) + dbgs() << ", seqno = " << SeqNo << ", tag-addr = " << TagAddr << ", arg-buffer = " << formatv("{0:x}", ArgBytes.size()) << " bytes\n"; }); @@ -227,11 +226,11 @@ Error SimpleRemoteEPC::sendMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, case SimpleRemoteEPCOpcode::Hangup: dbgs() << "Hangup"; assert(SeqNo == 0 && "Non-zero SeqNo for Hangup?"); - assert(TagAddr.getValue() == 0 && "Non-zero TagAddr for Hangup?"); + assert(!TagAddr && "Non-zero TagAddr for Hangup?"); break; case SimpleRemoteEPCOpcode::Result: dbgs() << "Result"; - assert(TagAddr.getValue() == 0 && "Non-zero TagAddr for Result?"); + assert(!TagAddr && "Non-zero TagAddr for Result?"); break; case SimpleRemoteEPCOpcode::CallWrapper: dbgs() << "CallWrapper"; @@ -239,8 +238,7 @@ Error SimpleRemoteEPC::sendMessage(SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, default: llvm_unreachable("Invalid opcode"); } - dbgs() << ", seqno = " << SeqNo - << ", tag-addr = " << formatv("{0:x}", TagAddr.getValue()) + dbgs() << ", seqno = " << SeqNo << ", tag-addr = " << TagAddr << ", arg-buffer = " << formatv("{0:x}", ArgBytes.size()) << " bytes\n"; }); @@ -319,8 +317,7 @@ Error SimpleRemoteEPC::setup(Setup S) { << " Page size: " << EI->PageSize << "\n" << " Bootstrap symbols:\n"; for (const auto &KV : EI->BootstrapSymbols) - dbgs() << " " << KV.first() << ": " - << formatv("{0:x16}", KV.second.getValue()) << "\n"; + dbgs() << " " << KV.first() << ": " << KV.second << "\n"; }); TargetTriple = Triple(EI->TargetTriple); PageSize = EI->PageSize; -- 2.7.4