[llvm] ea439bb - [Attributor][NFC] Track the number of created AAs in the statistics
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 21 13:24:12 PDT 2020
Author: Johannes Doerfert
Date: 2020-04-21T15:22:10-05:00
New Revision: ea439bbcbb41e81e0953b38463c95e95ea3ec4bf
URL: https://github.com/llvm/llvm-project/commit/ea439bbcbb41e81e0953b38463c95e95ea3ec4bf
DIFF: https://github.com/llvm/llvm-project/commit/ea439bbcbb41e81e0953b38463c95e95ea3ec4bf.diff
LOG: [Attributor][NFC] Track the number of created AAs in the statistics
Added:
Modified:
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index 2d63bc830982..1052dda05f47 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) \
More information about the llvm-commits
mailing list