LLVM 20.0.0git
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
llvm::BPFunctionNode Class Reference

A function with a set of utility nodes where it is beneficial to order two functions close together if they have similar utility nodes. More...

#include "llvm/Support/BalancedPartitioning.h"

Public Types

using IDT = uint64_t
 
using UtilityNodeT = uint32_t
 

Public Member Functions

 BPFunctionNode (IDT Id, ArrayRef< UtilityNodeT > UtilityNodes)
 
void dump (raw_ostream &OS) const
 

Public Attributes

IDT Id
 The ID of this node.
 

Protected Attributes

SmallVector< UtilityNodeT, 4 > UtilityNodes
 The list of utility nodes associated with this node.
 
std::optional< unsignedBucket
 The bucket assigned by balanced partitioning.
 
uint64_t InputOrderIndex = 0
 The index of the input order of the FunctionNodes.
 

Friends

class BalancedPartitioning
 
class BPFunctionNodeTest_Basic_Test
 
class BalancedPartitioningTest_Basic_Test
 
class BalancedPartitioningTest_Large_Test
 

Detailed Description

A function with a set of utility nodes where it is beneficial to order two functions close together if they have similar utility nodes.

Definition at line 56 of file BalancedPartitioning.h.

Member Typedef Documentation

◆ IDT

Definition at line 60 of file BalancedPartitioning.h.

◆ UtilityNodeT

Definition at line 61 of file BalancedPartitioning.h.

Constructor & Destructor Documentation

◆ BPFunctionNode()

llvm::BPFunctionNode::BPFunctionNode ( IDT  Id,
ArrayRef< UtilityNodeT UtilityNodes 
)
inline
Parameters
UtilityNodesthe set of utility nodes (must be unique'd)

Definition at line 64 of file BalancedPartitioning.h.

Member Function Documentation

◆ dump()

void BPFunctionNode::dump ( raw_ostream OS) const

Definition at line 23 of file BalancedPartitioning.cpp.

References Bucket, llvm::formatv(), Id, llvm::make_range(), OS, and UtilityNodes.

Friends And Related Function Documentation

◆ BalancedPartitioning

friend class BalancedPartitioning
friend

Definition at line 57 of file BalancedPartitioning.h.

◆ BalancedPartitioningTest_Basic_Test

friend class BalancedPartitioningTest_Basic_Test
friend

Definition at line 81 of file BalancedPartitioning.h.

◆ BalancedPartitioningTest_Large_Test

friend class BalancedPartitioningTest_Large_Test
friend

Definition at line 82 of file BalancedPartitioning.h.

◆ BPFunctionNodeTest_Basic_Test

friend class BPFunctionNodeTest_Basic_Test
friend

Definition at line 80 of file BalancedPartitioning.h.

Member Data Documentation

◆ Bucket

std::optional<unsigned> llvm::BPFunctionNode::Bucket
protected

The bucket assigned by balanced partitioning.

Definition at line 76 of file BalancedPartitioning.h.

Referenced by dump().

◆ Id

IDT llvm::BPFunctionNode::Id

The ID of this node.

Definition at line 68 of file BalancedPartitioning.h.

Referenced by dump().

◆ InputOrderIndex

uint64_t llvm::BPFunctionNode::InputOrderIndex = 0
protected

The index of the input order of the FunctionNodes.

Definition at line 78 of file BalancedPartitioning.h.

◆ UtilityNodes

SmallVector<UtilityNodeT, 4> llvm::BPFunctionNode::UtilityNodes
protected

The list of utility nodes associated with this node.

Definition at line 74 of file BalancedPartitioning.h.

Referenced by dump().


The documentation for this class was generated from the following files: