Andrew Scull | 0372a57 | 2018-11-16 15:47:06 +0000 | [diff] [blame] | 1 | //===- StandardInstrumentations.h ------------------------------*- C++ -*--===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | /// \file |
| 10 | /// |
| 11 | /// This header defines a class that provides bookkeeping for all standard |
| 12 | /// (i.e in-tree) pass instrumentations. |
| 13 | /// |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | |
| 16 | #ifndef LLVM_PASSES_STANDARDINSTRUMENTATIONS_H |
| 17 | #define LLVM_PASSES_STANDARDINSTRUMENTATIONS_H |
| 18 | |
| 19 | #include "llvm/IR/PassInstrumentation.h" |
| 20 | #include "llvm/IR/PassTimingInfo.h" |
| 21 | |
| 22 | namespace llvm { |
| 23 | |
| 24 | /// This class provides an interface to register all the standard pass |
| 25 | /// instrumentations and manages their state (if any). |
| 26 | class StandardInstrumentations { |
| 27 | TimePassesHandler TimePasses; |
| 28 | |
| 29 | public: |
| 30 | StandardInstrumentations() = default; |
| 31 | |
| 32 | void registerCallbacks(PassInstrumentationCallbacks &PIC); |
| 33 | }; |
| 34 | } // namespace llvm |
| 35 | |
| 36 | #endif |