LLVM  15.0.0git
LowerExpectIntrinsic.h
Go to the documentation of this file.
1 //===- LowerExpectIntrinsic.h - LowerExpectIntrinsic pass -------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 /// \file
9 ///
10 /// The header file for the LowerExpectIntrinsic pass as used by the new pass
11 /// manager.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_TRANSFORMS_SCALAR_LOWEREXPECTINTRINSIC_H
16 #define LLVM_TRANSFORMS_SCALAR_LOWEREXPECTINTRINSIC_H
17 
18 #include "llvm/IR/PassManager.h"
19 
20 namespace llvm {
21 
22 class Function;
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
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:152
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::LowerExpectIntrinsicPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)
Run the pass over the function.
Definition: LowerExpectIntrinsic.cpp:394
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:371
llvm::Function
Definition: Function.h:60
F
#define F(x, y, z)
Definition: MD5.cpp:55
llvm::LowerExpectIntrinsicPass
Definition: LowerExpectIntrinsic.h:24
PassManager.h
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:42
llvm::codeview::PublicSymFlags::Function
@ Function