PandA-2024.02
|
#include <OrderedInstructions.hpp>
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 BBGraphConstRef & | getDT () 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... | |
Definition at line 91 of file OrderedInstructions.hpp.
|
explicit |
Constructor.
Definition at line 133 of file OrderedInstructions.cpp.
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().
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.
const BBGraphConstRef & OrderedInstructions::getDT | ( | ) | const |
Definition at line 216 of file OrderedInstructions.cpp.
References DT.
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.
|
private |
The dominator tree of the parent function.
Definition at line 97 of file OrderedInstructions.hpp.
Referenced by dominates(), and getDT().
|
mutableprivate |
Used to check dominance for instructions in same basic block.
Definition at line 94 of file OrderedInstructions.hpp.
Referenced by dominates(), and invalidateBlock().