LLVM 22.0.0git
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)
LLVM_ABI 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 57 of file BalancedPartitioning.h.

Member Typedef Documentation

◆ IDT

Definition at line 61 of file BalancedPartitioning.h.

◆ UtilityNodeT

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 65 of file BalancedPartitioning.h.

References Id, and UtilityNodes.

Member Function Documentation

◆ dump()

void BPFunctionNode::dump ( raw_ostream & OS) const

Definition at line 24 of file BalancedPartitioning.cpp.

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

◆ BalancedPartitioning

friend class BalancedPartitioning
friend

Definition at line 58 of file BalancedPartitioning.h.

References BalancedPartitioning.

Referenced by BalancedPartitioning.

◆ BalancedPartitioningTest_Basic_Test

friend class BalancedPartitioningTest_Basic_Test
friend

◆ BalancedPartitioningTest_Large_Test

friend class BalancedPartitioningTest_Large_Test
friend

◆ BPFunctionNodeTest_Basic_Test

friend class BPFunctionNodeTest_Basic_Test
friend

Definition at line 81 of file BalancedPartitioning.h.

References BPFunctionNodeTest_Basic_Test.

Referenced by BPFunctionNodeTest_Basic_Test.

Member Data Documentation

◆ Bucket

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

The bucket assigned by balanced partitioning.

Definition at line 77 of file BalancedPartitioning.h.

Referenced by dump().

◆ Id

IDT llvm::BPFunctionNode::Id

The ID of this node.

Definition at line 69 of file BalancedPartitioning.h.

Referenced by BPFunctionNode(), and dump().

◆ InputOrderIndex

uint64_t llvm::BPFunctionNode::InputOrderIndex = 0
protected

The index of the input order of the FunctionNodes.

Definition at line 79 of file BalancedPartitioning.h.

◆ UtilityNodes

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

The list of utility nodes associated with this node.

Definition at line 75 of file BalancedPartitioning.h.

Referenced by BPFunctionNode(), and dump().


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