[llvm] 9c0a349 - Revert "[SuffixTree] Add suffix tree statistics"
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Fri May 12 17:10:07 PDT 2023
Author: Jessica Paquette
Date: 2023-05-12T17:09:26-07:00
New Revision: 9c0a349788d3dee8fb7bd4c6ade58163f4985b52
URL: https://github.com/llvm/llvm-project/commit/9c0a349788d3dee8fb7bd4c6ade58163f4985b52
DIFF: https://github.com/llvm/llvm-project/commit/9c0a349788d3dee8fb7bd4c6ade58163f4985b52.diff
LOG: Revert "[SuffixTree] Add suffix tree statistics"
This reverts commit d3a6a05b1f95564f2c66f885a83cf0dbe1a004a9.
Some bots don't like it.
Boo.
Added:
Modified:
llvm/include/llvm/Support/SuffixTree.h
llvm/lib/Support/SuffixTree.cpp
Removed:
llvm/test/CodeGen/AArch64/machine-outliner-stats.mir
################################################################################
diff --git a/llvm/include/llvm/Support/SuffixTree.h b/llvm/include/llvm/Support/SuffixTree.h
index 27d551ad7858..4940fbbf308d 100644
--- a/llvm/include/llvm/Support/SuffixTree.h
+++ b/llvm/include/llvm/Support/SuffixTree.h
@@ -33,17 +33,10 @@
#define LLVM_SUPPORT_SUFFIXTREE_H
#include "llvm/ADT/ArrayRef.h"
-#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/SuffixTreeNode.h"
-#define DEBUG_TYPE "suffix-tree"
namespace llvm {
-// Statistics for the number of nodes allocated. Useful for estimating tree
-// memory usage.
-STATISTIC(NumLeafNodesAllocated, "Leaf nodes allocated");
-STATISTIC(NumInternalNodesAllocated, "Internal nodes allocated");
-
class SuffixTree {
public:
/// Each element is an integer representing an instruction in the module.
@@ -203,5 +196,5 @@ class SuffixTree {
};
} // namespace llvm
-#undef DEBUG_TYPE
+
#endif // LLVM_SUPPORT_SUFFIXTREE_H
diff --git a/llvm/lib/Support/SuffixTree.cpp b/llvm/lib/Support/SuffixTree.cpp
index 03d4abd096c3..eaa653078e09 100644
--- a/llvm/lib/Support/SuffixTree.cpp
+++ b/llvm/lib/Support/SuffixTree.cpp
@@ -54,7 +54,6 @@ SuffixTreeNode *SuffixTree::insertLeaf(SuffixTreeInternalNode &Parent,
auto *N = new (LeafNodeAllocator.Allocate())
SuffixTreeLeafNode(StartIdx, &LeafEndIdx);
Parent.Children[Edge] = N;
- ++NumLeafNodesAllocated;
return N;
}
@@ -69,7 +68,6 @@ SuffixTree::insertInternalNode(SuffixTreeInternalNode *Parent,
SuffixTreeInternalNode(StartIdx, EndIdx, Root);
if (Parent)
Parent->Children[Edge] = N;
- ++NumInternalNodesAllocated;
return N;
}
diff --git a/llvm/test/CodeGen/AArch64/machine-outliner-stats.mir b/llvm/test/CodeGen/AArch64/machine-outliner-stats.mir
deleted file mode 100644
index f8c69ff5388f..000000000000
--- a/llvm/test/CodeGen/AArch64/machine-outliner-stats.mir
+++ /dev/null
@@ -1,33 +0,0 @@
-# RUN: llc %s -mtriple aarch64 -stats -run-pass=machine-outliner -o /dev/null 2>&1 | FileCheck %s
-# REQUIRES: asserts
-
-# Check that we can collect both outliner and suffix tree statistics.
-#
-# For the suffix tree, we should get
-# - 1 leaf per suffix
-# - 2 internal nodes, 1 for the root and 1 for the duplicate instruction
-
-# CHECK: 1 machine-outliner - Unoutlinable instructions mapped + number of sentinel values
-# CHECK-NEXT: 8 machine-outliner - Outlinable instructions mapped
-# CHECK-NEXT: 1 machine-outliner - Sentinel values inserted during mapping
-# CHECK-NEXT: 9 machine-outliner - Total number of instructions mapped and saved to mapping vector
-# CHECK-NEXT: 2 suffix-tree - Internal nodes allocated
-# CHECK-NEXT: 9 suffix-tree - Leaf nodes allocated
-
-...
----
-name: fn
-tracksRegLiveness: true
-machineFunctionInfo:
- hasRedZone: false
-body: |
- bb.0:
- liveins: $x9
- $x9 = ADDXri $x9, 16, 1
- $x9 = ADDXri $x9, 16, 2
- $x9 = ADDXri $x9, 16, 3
- $x9 = ADDXri $x9, 16, 4
- $x9 = ADDXri $x9, 16, 5
- $x9 = ADDXri $x9, 16, 6
- $x9 = ADDXri $x9, 16, 1
- RET undef $x9
More information about the llvm-commits
mailing list