[InstCombine] Signed saturation patterns
[llvm-complete.git] / include / llvm / Support / Signposts.h
blobb5a8c3d61e3ed74cde419407754d91b727b83aea
1 //===-- llvm/Support/Signposts.h - Interval debug annotations ---*- 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 //
10 /// \file Some OS's provide profilers that allow applications to provide custom
11 /// annotations to the profiler. For example, on Xcode 10 and later 'signposts'
12 /// can be emitted by the application and these will be rendered to the Points
13 /// of Interest track on the instruments timeline.
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_SUPPORT_SIGNPOSTS_H
18 #define LLVM_SUPPORT_SIGNPOSTS_H
20 namespace llvm {
21 class SignpostEmitterImpl;
22 class Timer;
24 /// Manages the emission of signposts into the recording method supported by
25 /// the OS.
26 class SignpostEmitter {
27 SignpostEmitterImpl *Impl;
29 public:
30 SignpostEmitter();
31 ~SignpostEmitter();
33 bool isEnabled() const;
35 /// Begin a signposted interval for the given timer.
36 void startTimerInterval(Timer *T);
37 /// End a signposted interval for the given timer.
38 void endTimerInterval(Timer *T);
41 } // end namespace llvm
43 #endif // ifndef LLVM_SUPPORT_SIGNPOSTS_H