[llvm] [BOLT][NFC] Remove dead initialization code (PR #92952)
Heewon Cho via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 11:45:04 PDT 2024
https://github.com/Pribess updated https://github.com/llvm/llvm-project/pull/92952
>From 6e0ea7bac6623306e71438ff9b3e8cc20d8688fe Mon Sep 17 00:00:00 2001
From: Heewon Cho <heewon6752 at gmail.com>
Date: Wed, 22 May 2024 03:42:33 +0900
Subject: [PATCH] [BOLT][NFC] Remove dead initialization code
---
bolt/runtime/instr.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/bolt/runtime/instr.cpp b/bolt/runtime/instr.cpp
index 16e0bbd55f90b..d1f8a216badcf 100644
--- a/bolt/runtime/instr.cpp
+++ b/bolt/runtime/instr.cpp
@@ -1245,7 +1245,6 @@ void Graph::computeEdgeFrequencies(const uint64_t *Counters,
continue;
assert(SpanningTreeNodes[Cur].NumInEdges == 1, "must have 1 parent");
- const uint32_t Parent = SpanningTreeNodes[Cur].InEdges[0].Node;
const uint32_t ParentEdge = SpanningTreeNodes[Cur].InEdges[0].ID;
// Calculate parent edge freq.
@@ -1464,9 +1463,8 @@ void visitCallFlowEntry(CallFlowHashTable::MapEntry &Entry, int FD,
int openProfile() {
// Build the profile name string by appending our PID
char Buf[BufSize];
- char *Ptr = Buf;
uint64_t PID = __getpid();
- Ptr = strCopy(Buf, __bolt_instr_filename, BufSize);
+ char *Ptr = strCopy(Buf, __bolt_instr_filename, BufSize);
if (__bolt_instr_use_pid) {
Ptr = strCopy(Ptr, ".", BufSize - (Ptr - Buf + 1));
Ptr = intToStr(Ptr, PID, 10);
More information about the llvm-commits
mailing list