aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2020-04-16 20:32:06 -0500
committerJohannes Doerfert <johannes@jdoerfert.de>2020-04-21 15:22:10 -0500
commitea439bbcbb41e81e0953b38463c95e95ea3ec4bf (patch)
tree5175ea95297fc47a2c617c71486cae8a0d4fe704
parentc5794f77eb4a863f1b540222a82e6476f8892767 (diff)
downloadllvm-ea439bbcbb41e81e0953b38463c95e95ea3ec4bf.zip
llvm-ea439bbcbb41e81e0953b38463c95e95ea3ec4bf.tar.gz
llvm-ea439bbcbb41e81e0953b38463c95e95ea3ec4bf.tar.bz2
[Attributor][NFC] Track the number of created AAs in the statistics
-rw-r--r--llvm/lib/Transforms/IPO/AttributorAttributes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 2d63bc8..1052dda 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -40,6 +40,8 @@ static cl::opt<bool> ManifestInternal(
static cl::opt<int> MaxHeapToStackSize("max-heap-to-stack-size", cl::init(128),
cl::Hidden);
+STATISTIC(NumAAs, "Number of abstract attributes created");
+
// Some helper macros to deal with statistics tracking.
//
// Usage:
@@ -6995,6 +6997,7 @@ const char AAValueConstantRange::ID = 0;
#define SWITCH_PK_CREATE(CLASS, IRP, PK, SUFFIX) \
case IRPosition::PK: \
AA = new (A.Allocator) CLASS##SUFFIX(IRP, A); \
+ ++NumAAs; \
break;
#define CREATE_FUNCTION_ABSTRACT_ATTRIBUTE_FOR_POSITION(CLASS) \