diff options
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h')
-rw-r--r-- | contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h b/contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h index b70850fd64d7..e44321b4af66 100644 --- a/contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h +++ b/contrib/llvm-project/llvm/include/llvm/IR/PassTimingInfo.h @@ -17,11 +17,13 @@ #include "llvm/ADT/Any.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Timer.h" -#include "llvm/Support/TypeName.h" #include <memory> +#include <utility> + namespace llvm { class Pass; @@ -36,11 +38,6 @@ void reportAndResetTimings(raw_ostream *OutStream = nullptr); /// Request the timer for this legacy-pass-manager's pass instance. Timer *getPassTimer(Pass *); -/// If the user specifies the -time-passes argument on an LLVM tool command line -/// then the value of this boolean will be true, otherwise false. -/// This is the storage for the -time-passes option. -extern bool TimePassesIsEnabled; - /// This class implements -time-passes functionality for new pass manager. /// It provides the pass-instrumentation callbacks that measure the pass /// execution time. They collect timing info into individual timers as @@ -68,9 +65,11 @@ class TimePassesHandler { raw_ostream *OutStream = nullptr; bool Enabled; + bool PerRun; public: - TimePassesHandler(bool Enabled = TimePassesIsEnabled); + TimePassesHandler(); + TimePassesHandler(bool Enabled, bool PerRun = false); /// Destructor handles the print action if it has not been handled before. ~TimePassesHandler() { print(); } @@ -98,7 +97,7 @@ private: void stopTimer(StringRef PassID); // Implementation of pass instrumentation callbacks. - bool runBeforePass(StringRef PassID); + void runBeforePass(StringRef PassID); void runAfterPass(StringRef PassID); }; |