PandA-2024.02
Public Member Functions | Private Attributes
OrderedInstructions Class Reference

#include <OrderedInstructions.hpp>

Collaboration diagram for OrderedInstructions:
Collaboration graph
[legend]

Public Member Functions

 OrderedInstructions (BBGraphConstRef _DT)
 Constructor. More...
 
bool dominates (const unsigned int BBIA, const unsigned int BBIB) const
 
bool dominates (const struct gimple_node *InstA, const struct gimple_node *InstB) const
 Return true if first instruction dominates the second. More...
 
void invalidateBlock (unsigned int BBI)
 Invalidate the OrderedBasicBlock cache when its basic block changes. More...
 
const BBGraphConstRefgetDT () const
 

Private Attributes

CustomMap< unsigned int, std::unique_ptr< OrderedBasicBlock > > OBBMap
 Used to check dominance for instructions in same basic block. More...
 
const BBGraphConstRef DT
 The dominator tree of the parent function. More...
 

Detailed Description

Definition at line 91 of file OrderedInstructions.hpp.

Constructor & Destructor Documentation

◆ OrderedInstructions()

OrderedInstructions::OrderedInstructions ( BBGraphConstRef  _DT)
explicit

Constructor.

Definition at line 133 of file OrderedInstructions.cpp.

Member Function Documentation

◆ dominates() [1/2]

bool OrderedInstructions::dominates ( const unsigned int  BBIA,
const unsigned int  BBIB 
) const

When block B is reachable from block A in the DT, A dominates B This because the DT used is a tree composed by immediate dominators only

Definition at line 137 of file OrderedInstructions.cpp.

References DT, bloc::ENTRY_BLOCK_ID, STR, and THROW_ASSERT.

Referenced by dominates(), stackIsInScope(), and valueComesBefore().

Here is the caller graph for this function:

◆ dominates() [2/2]

bool OrderedInstructions::dominates ( const struct gimple_node InstA,
const struct gimple_node InstB 
) const

Return true if first instruction dominates the second.

Definition at line 180 of file OrderedInstructions.cpp.

References gimple_node::bb_index, dominates(), DT, OBBMap, STR, and THROW_ASSERT.

Here is the call graph for this function:

◆ getDT()

const BBGraphConstRef & OrderedInstructions::getDT ( ) const

Definition at line 216 of file OrderedInstructions.cpp.

References DT.

◆ invalidateBlock()

void OrderedInstructions::invalidateBlock ( unsigned int  BBI)

Invalidate the OrderedBasicBlock cache when its basic block changes.

i.e. If an instruction is deleted or added to the basic block, the user should call this function to invalidate the OrderedBasicBlock cache for this basic block.

Definition at line 211 of file OrderedInstructions.cpp.

References OBBMap.

Field Documentation

◆ DT

const BBGraphConstRef OrderedInstructions::DT
private

The dominator tree of the parent function.

Definition at line 97 of file OrderedInstructions.hpp.

Referenced by dominates(), and getDT().

◆ OBBMap

CustomMap<unsigned int, std::unique_ptr<OrderedBasicBlock> > OrderedInstructions::OBBMap
mutableprivate

Used to check dominance for instructions in same basic block.

Definition at line 94 of file OrderedInstructions.hpp.

Referenced by dominates(), and invalidateBlock().


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

Generated on Mon Feb 12 2024 13:03:59 for PandA-2024.02 by doxygen 1.8.13