LLVM 19.0.0git
Public Types | Public Member Functions | Public Attributes | List of all members
llvm::BlockFrequencyInfoImplBase::Weight Struct Reference

Unscaled probability weight. More...

#include "llvm/Analysis/BlockFrequencyInfoImpl.h"

Public Types

enum  DistType { Local , Exit , Backedge }
 

Public Member Functions

 Weight ()=default
 
 Weight (DistType Type, BlockNode TargetNode, uint64_t Amount)
 

Public Attributes

DistType Type = Local
 
BlockNode TargetNode
 
uint64_t Amount = 0
 

Detailed Description

Unscaled probability weight.

Probability weight for an edge in the graph (including the successor/target node).

All edges in the original function are 32-bit. However, exit edges from loop packages are taken from 64-bit exit masses, so we need 64-bits of space in general.

In addition to the raw weight amount, Weight stores the type of the edge in the current context (i.e., the context of the loop being processed). Is this a local edge within the loop, an exit from the loop, or a backedge to the loop header?

Definition at line 366 of file BlockFrequencyInfoImpl.h.

Member Enumeration Documentation

◆ DistType

Enumerator
Local 
Exit 
Backedge 

Definition at line 367 of file BlockFrequencyInfoImpl.h.

Constructor & Destructor Documentation

◆ Weight() [1/2]

llvm::BlockFrequencyInfoImplBase::Weight::Weight ( )
default

◆ Weight() [2/2]

llvm::BlockFrequencyInfoImplBase::Weight::Weight ( DistType  Type,
BlockNode  TargetNode,
uint64_t  Amount 
)
inline

Definition at line 373 of file BlockFrequencyInfoImpl.h.

Member Data Documentation

◆ Amount

uint64_t llvm::BlockFrequencyInfoImplBase::Weight::Amount = 0

Definition at line 370 of file BlockFrequencyInfoImpl.h.

◆ TargetNode

BlockNode llvm::BlockFrequencyInfoImplBase::Weight::TargetNode

Definition at line 369 of file BlockFrequencyInfoImpl.h.

◆ Type

DistType llvm::BlockFrequencyInfoImplBase::Weight::Type = Local

Definition at line 368 of file BlockFrequencyInfoImpl.h.


The documentation for this struct was generated from the following file: