[llvm-branch-commits] [llvm] [BOLT][NFC] Move CallGraph from Passes to Core (PR #96922)
shaw young via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 27 16:32:56 PDT 2024
https://github.com/shawbyoung updated https://github.com/llvm/llvm-project/pull/96922
>From 84a2f69e71372891e2721552b10e0105b9430257 Mon Sep 17 00:00:00 2001
From: shawbyoung <shawbyoung at gmail.com>
Date: Thu, 27 Jun 2024 09:28:22 -0700
Subject: [PATCH 1/2] Updated file headers
Created using spr 1.3.4
---
bolt/include/bolt/Core/BinaryFunctionCallGraph.h | 2 +-
bolt/include/bolt/Core/CallGraph.h | 2 +-
bolt/include/bolt/Core/CallGraphWalker.h | 2 +-
bolt/lib/Core/BinaryFunctionCallGraph.cpp | 2 +-
bolt/lib/Core/CallGraph.cpp | 2 +-
bolt/lib/Core/CallGraphWalker.cpp | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/bolt/include/bolt/Core/BinaryFunctionCallGraph.h b/bolt/include/bolt/Core/BinaryFunctionCallGraph.h
index 4579c33985254..4ff5b1b94c5e5 100644
--- a/bolt/include/bolt/Core/BinaryFunctionCallGraph.h
+++ b/bolt/include/bolt/Core/BinaryFunctionCallGraph.h
@@ -1,4 +1,4 @@
-//===- bolt/Passes/CallGraph.h ----------------------------------*- C++ -*-===//
+//===- bolt/Core/CallGraph.h ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/bolt/include/bolt/Core/CallGraph.h b/bolt/include/bolt/Core/CallGraph.h
index bdbc50bb78e87..2fc18e61afcaa 100644
--- a/bolt/include/bolt/Core/CallGraph.h
+++ b/bolt/include/bolt/Core/CallGraph.h
@@ -1,4 +1,4 @@
-//===- bolt/Passes/CallGraph.h ----------------------------------*- C++ -*-===//
+//===- bolt/Core/CallGraph.h ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/bolt/include/bolt/Core/CallGraphWalker.h b/bolt/include/bolt/Core/CallGraphWalker.h
index ac45644be362f..b0a73aee14369 100644
--- a/bolt/include/bolt/Core/CallGraphWalker.h
+++ b/bolt/include/bolt/Core/CallGraphWalker.h
@@ -1,4 +1,4 @@
-//===- bolt/Passes/CallGraphWalker.h ----------------------------*- C++ -*-===//
+//===- bolt/Core/CallGraphWalker.h ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/bolt/lib/Core/BinaryFunctionCallGraph.cpp b/bolt/lib/Core/BinaryFunctionCallGraph.cpp
index 86a31188c854a..b4b7897aa426a 100644
--- a/bolt/lib/Core/BinaryFunctionCallGraph.cpp
+++ b/bolt/lib/Core/BinaryFunctionCallGraph.cpp
@@ -1,4 +1,4 @@
-//===- bolt/Passes/BinaryFunctionCallGraph.cpp ----------------------------===//
+//===- bolt/Core/BinaryFunctionCallGraph.cpp ----------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/bolt/lib/Core/CallGraph.cpp b/bolt/lib/Core/CallGraph.cpp
index a7ea64fbbcf58..5f6bd11e9e97a 100644
--- a/bolt/lib/Core/CallGraph.cpp
+++ b/bolt/lib/Core/CallGraph.cpp
@@ -1,4 +1,4 @@
-//===- bolt/Passes/CallGraph.cpp ------------------------------------------===//
+//===- bolt/Core/CallGraph.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/bolt/lib/Core/CallGraphWalker.cpp b/bolt/lib/Core/CallGraphWalker.cpp
index 9d0087f79d17f..cbfa178d8e068 100644
--- a/bolt/lib/Core/CallGraphWalker.cpp
+++ b/bolt/lib/Core/CallGraphWalker.cpp
@@ -1,4 +1,4 @@
-//===- bolt/Passes/CallGraphWalker.cpp ------------------------------------===//
+//===- bolt/Core/CallGraphWalker.cpp ------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
>From 1980f9bafd39ec84e71d71bd6a50d3368e1dbbe4 Mon Sep 17 00:00:00 2001
From: shawbyoung <shawbyoung at gmail.com>
Date: Thu, 27 Jun 2024 11:27:43 -0700
Subject: [PATCH 2/2] clang-format
Created using spr 1.3.4
---
bolt/lib/Core/CallGraph.cpp | 14 +++++++-------
bolt/lib/Passes/FrameAnalysis.cpp | 2 +-
bolt/lib/Passes/FrameOptimizer.cpp | 2 +-
bolt/lib/Passes/RegReAssign.cpp | 2 +-
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/bolt/lib/Core/CallGraph.cpp b/bolt/lib/Core/CallGraph.cpp
index 5f6bd11e9e97a..f1d52737bf556 100644
--- a/bolt/lib/Core/CallGraph.cpp
+++ b/bolt/lib/Core/CallGraph.cpp
@@ -15,11 +15,11 @@
#define DEBUG_TYPE "callgraph"
#if defined(__x86_64__) && !defined(_MSC_VER)
-# if (!defined USE_SSECRC)
-# define USE_SSECRC
-# endif
+#if (!defined USE_SSECRC)
+#define USE_SSECRC
+#endif
#else
-# undef USE_SSECRC
+#undef USE_SSECRC
#endif
static LLVM_ATTRIBUTE_UNUSED inline size_t hash_int64_fallback(int64_t k) {
@@ -50,7 +50,7 @@ static inline size_t hash_int64_pair(int64_t k1, int64_t k2) {
// crc32 is commutative, so we need to perturb k1 so that (k1, k2) hashes
// differently from (k2, k1).
k1 += k1;
- __asm("crc32q %1, %0\n" : "+r" (k1) : "rm"(k2));
+ __asm("crc32q %1, %0\n" : "+r"(k1) : "rm"(k2));
return k1;
#else
return (hash_int64(k1) << 1) ^ hash_int64(k2);
@@ -118,5 +118,5 @@ void CallGraph::adjustArcWeights() {
}
}
-}
-}
+} // namespace bolt
+} // namespace llvm
diff --git a/bolt/lib/Passes/FrameAnalysis.cpp b/bolt/lib/Passes/FrameAnalysis.cpp
index e624e68663ed0..e027fc0403cd9 100644
--- a/bolt/lib/Passes/FrameAnalysis.cpp
+++ b/bolt/lib/Passes/FrameAnalysis.cpp
@@ -11,8 +11,8 @@
//===----------------------------------------------------------------------===//
#include "bolt/Passes/FrameAnalysis.h"
-#include "bolt/Core/ParallelUtilities.h"
#include "bolt/Core/CallGraphWalker.h"
+#include "bolt/Core/ParallelUtilities.h"
#include "llvm/MC/MCRegisterInfo.h"
#include "llvm/Support/Timer.h"
#include <fstream>
diff --git a/bolt/lib/Passes/FrameOptimizer.cpp b/bolt/lib/Passes/FrameOptimizer.cpp
index 3395321f579f7..1c0f9555f9eb9 100644
--- a/bolt/lib/Passes/FrameOptimizer.cpp
+++ b/bolt/lib/Passes/FrameOptimizer.cpp
@@ -11,8 +11,8 @@
//===----------------------------------------------------------------------===//
#include "bolt/Passes/FrameOptimizer.h"
-#include "bolt/Core/ParallelUtilities.h"
#include "bolt/Core/BinaryFunctionCallGraph.h"
+#include "bolt/Core/ParallelUtilities.h"
#include "bolt/Passes/DataflowInfoManager.h"
#include "bolt/Passes/ShrinkWrapping.h"
#include "bolt/Passes/StackAvailableExpressions.h"
diff --git a/bolt/lib/Passes/RegReAssign.cpp b/bolt/lib/Passes/RegReAssign.cpp
index 7478803cab7ce..60349f18b11d3 100644
--- a/bolt/lib/Passes/RegReAssign.cpp
+++ b/bolt/lib/Passes/RegReAssign.cpp
@@ -11,8 +11,8 @@
//===----------------------------------------------------------------------===//
#include "bolt/Passes/RegReAssign.h"
-#include "bolt/Core/MCPlus.h"
#include "bolt/Core/BinaryFunctionCallGraph.h"
+#include "bolt/Core/MCPlus.h"
#include "bolt/Passes/DataflowAnalysis.h"
#include "bolt/Passes/DataflowInfoManager.h"
#include "bolt/Utils/Utils.h"
More information about the llvm-branch-commits
mailing list