[llvm] 577f316 - [ORC] Simplify some ExecutorAddr uses by removing getValue and formatv.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 17:11:31 PDT 2023


Author: Lang Hames
Date: 2023-03-31T17:11:25-07:00
New Revision: 577f316c71900717231e6970681e0c894c6e7bf6

URL: https://github.com/llvm/llvm-project/commit/577f316c71900717231e6970681e0c894c6e7bf6
DIFF: https://github.com/llvm/llvm-project/commit/577f316c71900717231e6970681e0c894c6e7bf6.diff

LOG: [ORC] Simplify some ExecutorAddr uses by removing getValue and formatv.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp b/llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
index 624408e0a14d..fd8329c8958a 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;


        


More information about the llvm-commits mailing list