LLVM  8.0.0svn
LowerExpectIntrinsic.h
Go to the documentation of this file.
1 //===- LowerExpectIntrinsic.h - LowerExpectIntrinsic pass -------*- 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 /// The header file for the LowerExpectIntrinsic pass as used by the new pass
12 /// manager.
13 ///
14 //===----------------------------------------------------------------------===//
15 
16 #ifndef LLVM_TRANSFORMS_SCALAR_LOWEREXPECTINTRINSIC_H
17 #define LLVM_TRANSFORMS_SCALAR_LOWEREXPECTINTRINSIC_H
18 
19 #include "llvm/IR/Function.h"
20 #include "llvm/IR/PassManager.h"
21 
22 namespace llvm {
23 
24 struct LowerExpectIntrinsicPass : PassInfoMixin<LowerExpectIntrinsicPass> {
25  /// Run the pass over the function.
26  ///
27  /// This will lower all of the expect intrinsic calls in this function into
28  /// branch weight metadata. That metadata will subsequently feed the analysis
29  /// of the probabilities and frequencies of the CFG. After running this pass,
30  /// no more expect intrinsics remain, allowing the rest of the optimizer to
31  /// ignore them.
33 };
34 
35 }
36 
37 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
F(f)
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
Run the pass over the function.
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:366
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:154
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.