LLVM  14.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::BlockFrequencyInfoImplBase::WorkingData Struct Reference

Index of loop information. More...

#include "llvm/Analysis/BlockFrequencyInfoImpl.h"

Collaboration diagram for llvm::BlockFrequencyInfoImplBase::WorkingData:
Collaboration graph
[legend]

Public Member Functions

 WorkingData (const BlockNode &Node)
 
bool isLoopHeader () const
 
bool isDoubleLoopHeader () const
 
LoopDatagetContainingLoop () const
 
BlockNode getResolvedNode () const
 Resolve a node to its representative. More...
 
LoopDatagetPackagedLoop () const
 
BlockMassgetMass ()
 Get the appropriate mass for a node. More...
 
bool isPackaged () const
 Has ContainingLoop been packaged up? More...
 
bool isAPackage () const
 Has Loop been packaged up? More...
 
bool isADoublePackage () const
 Has Loop been packaged up twice? More...
 

Public Attributes

BlockNode Node
 This node. More...
 
LoopDataLoop = nullptr
 The loop this block is inside. More...
 
BlockMass Mass
 Mass distribution from the entry block. More...
 

Detailed Description

Index of loop information.

Definition at line 278 of file BlockFrequencyInfoImpl.h.

Constructor & Destructor Documentation

◆ WorkingData()

llvm::BlockFrequencyInfoImplBase::WorkingData::WorkingData ( const BlockNode Node)
inline

Definition at line 283 of file BlockFrequencyInfoImpl.h.

Member Function Documentation

◆ getContainingLoop()

LoopData* llvm::BlockFrequencyInfoImplBase::WorkingData::getContainingLoop ( ) const
inline

Definition at line 292 of file BlockFrequencyInfoImpl.h.

References isDoubleLoopHeader(), isLoopHeader(), and Loop.

◆ getMass()

BlockMass& llvm::BlockFrequencyInfoImplBase::WorkingData::getMass ( )
inline

Get the appropriate mass for a node.

Get appropriate mass for Node. If Node is a loop-header (whose loop has been packaged), returns the mass of its pseudo-node. If it's a node inside a packaged loop, it returns the loop's mass.

Definition at line 332 of file BlockFrequencyInfoImpl.h.

References isADoublePackage(), isAPackage(), and Mass.

◆ getPackagedLoop()

LoopData* llvm::BlockFrequencyInfoImplBase::WorkingData::getPackagedLoop ( ) const
inline

Definition at line 318 of file BlockFrequencyInfoImpl.h.

References Loop, and llvm::BlockFrequencyInfoImplBase::LoopData::Parent.

Referenced by getResolvedNode().

◆ getResolvedNode()

BlockNode llvm::BlockFrequencyInfoImplBase::WorkingData::getResolvedNode ( ) const
inline

Resolve a node to its representative.

Get the node currently representing Node, which could be a containing loop.

This function should only be called when distributing mass. As long as there are no irreducible edges to Node, then it will have complexity O(1) in this context.

In general, the complexity is O(L), where L is the number of loop headers Node has been packaged into. Since this method is called in the context of distributing mass, L will be the number of loop headers an early exit edge jumps out of.

Definition at line 313 of file BlockFrequencyInfoImpl.h.

References getPackagedLoop(), and Node.

Referenced by isPackaged().

◆ isADoublePackage()

bool llvm::BlockFrequencyInfoImplBase::WorkingData::isADoublePackage ( ) const
inline

Has Loop been packaged up twice?

Definition at line 347 of file BlockFrequencyInfoImpl.h.

References isDoubleLoopHeader().

Referenced by getMass().

◆ isAPackage()

bool llvm::BlockFrequencyInfoImplBase::WorkingData::isAPackage ( ) const
inline

Has Loop been packaged up?

Definition at line 344 of file BlockFrequencyInfoImpl.h.

References isLoopHeader().

Referenced by getMass().

◆ isDoubleLoopHeader()

bool llvm::BlockFrequencyInfoImplBase::WorkingData::isDoubleLoopHeader ( ) const
inline

Definition at line 287 of file BlockFrequencyInfoImpl.h.

References isLoopHeader().

Referenced by getContainingLoop(), and isADoublePackage().

◆ isLoopHeader()

bool llvm::BlockFrequencyInfoImplBase::WorkingData::isLoopHeader ( ) const
inline

Definition at line 285 of file BlockFrequencyInfoImpl.h.

Referenced by getContainingLoop(), isAPackage(), and isDoubleLoopHeader().

◆ isPackaged()

bool llvm::BlockFrequencyInfoImplBase::WorkingData::isPackaged ( ) const
inline

Has ContainingLoop been packaged up?

Definition at line 341 of file BlockFrequencyInfoImpl.h.

References getResolvedNode(), and Node.

Member Data Documentation

◆ Loop

LoopData* llvm::BlockFrequencyInfoImplBase::WorkingData::Loop = nullptr

The loop this block is inside.

Definition at line 280 of file BlockFrequencyInfoImpl.h.

Referenced by getContainingLoop(), and getPackagedLoop().

◆ Mass

BlockMass llvm::BlockFrequencyInfoImplBase::WorkingData::Mass

Mass distribution from the entry block.

Definition at line 281 of file BlockFrequencyInfoImpl.h.

Referenced by getMass().

◆ Node

BlockNode llvm::BlockFrequencyInfoImplBase::WorkingData::Node

This node.

Definition at line 279 of file BlockFrequencyInfoImpl.h.

Referenced by getResolvedNode(), and isPackaged().


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