Skip to content

Commit

Permalink
[Attributor][NFC] Track the number of created AAs in the statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
jdoerfert committed Apr 21, 2020
1 parent c5794f7 commit ea439bb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Expand Up @@ -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:
Expand Down Expand Up @@ -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) \
Expand Down

0 comments on commit ea439bb

Please sign in to comment.