GCC Middle and Back End API Reference
slpg_layout_cost Struct Reference
Collaboration diagram for slpg_layout_cost:

Public Member Functions

 slpg_layout_cost ()=default
 
 slpg_layout_cost (sreal, bool)
 
bool is_possible () const
 
bool operator== (const slpg_layout_cost &) const
 
bool operator!= (const slpg_layout_cost &) const
 
bool is_better_than (const slpg_layout_cost &, bool) const
 
void add_parallel_cost (const slpg_layout_cost &)
 
void add_serial_cost (const slpg_layout_cost &)
 
void split (unsigned int)
 

Static Public Member Functions

static slpg_layout_cost impossible ()
 

Data Fields

sreal depth = 0
 
sreal total = 0
 

Detailed Description

Estimates the cost of inserting layout changes into the SLP graph.
It can also say that the insertion is impossible.   

Constructor & Destructor Documentation

◆ slpg_layout_cost() [1/2]

slpg_layout_cost::slpg_layout_cost ( )
default

◆ slpg_layout_cost() [2/2]

slpg_layout_cost::slpg_layout_cost ( sreal weight,
bool is_for_size )
Construct costs for a node with weight WEIGHT.  A higher weight
indicates more frequent execution.  IS_FOR_SIZE is true if we are
optimizing for size rather than speed.   

Member Function Documentation

◆ add_parallel_cost()

void slpg_layout_cost::add_parallel_cost ( const slpg_layout_cost & input_cost)
Increase the costs to account for something with cost INPUT_COST
happening in parallel with the current costs.   

References depth, and total.

Referenced by vect_optimize_slp_pass::total_in_cost().

◆ add_serial_cost()

void slpg_layout_cost::add_serial_cost ( const slpg_layout_cost & other)
Increase the costs to account for something with cost INPUT_COST
happening in series with the current costs.   

References depth, and total.

Referenced by vect_optimize_slp_pass::backward_cost(), vect_optimize_slp_pass::backward_pass(), vect_optimize_slp_pass::dump(), vect_optimize_slp_pass::forward_cost(), vect_optimize_slp_pass::forward_pass(), and vect_optimize_slp_pass::total_in_cost().

◆ impossible()

◆ is_better_than()

bool slpg_layout_cost::is_better_than ( const slpg_layout_cost & other,
bool is_for_size ) const
Return true if these costs are better than OTHER.  IS_FOR_SIZE is
true if we are optimizing for size rather than speed.   

References depth, and total.

Referenced by vect_optimize_slp_pass::backward_pass(), vect_optimize_slp_pass::forward_cost(), and vect_optimize_slp_pass::forward_pass().

◆ is_possible()

◆ operator!=()

bool slpg_layout_cost::operator!= ( const slpg_layout_cost & other) const

References operator==().

◆ operator==()

bool slpg_layout_cost::operator== ( const slpg_layout_cost & other) const

References depth, and total.

Referenced by operator!=().

◆ split()

void slpg_layout_cost::split ( unsigned int times)

Field Documentation

◆ depth

◆ total


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