[llvm] [Analysis] Remove traces of BlockEdgesAdder (PR #147102)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 4 12:32:35 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/147102

This patch removes traces of BlockEdgesAdder, which was a workaround
for an ancient version of GCC removed by:

  commit c17e88f07e26247bf876bd7e8057dcd1b89d702c
  Author: Kazu Hirata <kazu at google.com>
  Date:   Tue Jul 1 10:42:29 2025 -0700


>From 5f377cc7e6f351745cec23a769881eba333ff5d4 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 3 Jul 2025 22:48:14 -0700
Subject: [PATCH] [Analysis] Remove traces of BlockEdgesAdder

This patch removes traces of BlockEdgesAdder, which was a workaround
for an ancient version of GCC removed by:

  commit c17e88f07e26247bf876bd7e8057dcd1b89d702c
  Author: Kazu Hirata <kazu at google.com>
  Date:   Tue Jul 1 10:42:29 2025 -0700
---
 llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h b/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
index d86760c4f9fe9..c9de5a4fa9213 100644
--- a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
+++ b/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h
@@ -72,9 +72,6 @@ namespace bfi_detail {
 
 struct IrreducibleGraph;
 
-// This is part of a workaround for a GCC 4.7 crash on lambdas.
-template <class BT> struct BlockEdgesAdder;
-
 /// Mass of a block.
 ///
 /// This class implements a sort of fixed-point fraction always between 0.0 and
@@ -843,9 +840,6 @@ void IrreducibleGraph::addEdges(const BlockNode &Node,
 ///         (Running this until fixed point would "solve" the geometric
 ///         series by simulation.)
 template <class BT> class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase {
-  // This is part of a workaround for a GCC 4.7 crash on lambdas.
-  friend struct bfi_detail::BlockEdgesAdder<BT>;
-
   using BlockT = typename bfi_detail::TypeMap<BT>::BlockT;
   using BlockKeyT = typename bfi_detail::TypeMap<BT>::BlockKeyT;
   using FunctionT = typename bfi_detail::TypeMap<BT>::FunctionT;



More information about the llvm-commits mailing list