llvm::MemProfilerPass

Public interface to the memory profiler pass for instrumenting code to profile memory accesses.

Synopsis

Declared in <llvm/Transforms/Instrumentation/MemProfInstrumentation.h>

class MemProfilerPass
    : public RequiredPassInfoMixin<MemProfilerPass>

Description

The profiler itself is a function pass that works by inserting various calls to the MemProfiler runtime library functions. The runtime library essentially replaces malloc() and free() with custom implementations that record data about the allocations.

Base Classes

NameDescription
RequiredPassInfoMixin<MemProfilerPass>A CRTP mix-in for passes that should not be skipped.

Member Functions

NameDescription
MemProfilerPass [constructor]Construct a MemProfiler function pass.
run Run MemProfiler instrumentation over the function.

Static Member Functions

NameDescription
isRequired Return true; required passes cannot be skipped.