struct LowerExpectIntrinsicPass

Declaration

struct LowerExpectIntrinsicPass : public PassInfoMixin { /* full declaration omitted */ };

Description

A CRTP mix-in to automatically provide informational APIs needed for passes. This provides some boilerplate for types that are passes.

Declared at: llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h:24

Inherits from: PassInfoMixin

Method Overview

  • public llvm::PreservedAnalyses run(llvm::Function & F, llvm::FunctionAnalysisManager &)

Methods

ΒΆllvm::PreservedAnalyses run(
    llvm::Function& F,
    llvm::FunctionAnalysisManager&)

Description

Run the pass over the function. This will lower all of the expect intrinsic calls in this function into branch weight metadata. That metadata will subsequently feed the analysis of the probabilities and frequencies of the CFG. After running this pass, no more expect intrinsics remain, allowing the rest of the optimizer to ignore them.

Declared at: llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h:32

Parameters

llvm::Function& F
llvm::FunctionAnalysisManager&