#include <Partitioner.h>
Collaboration diagram for Partitioner::BasicBlock:

Each basic block will eventually become an SgAsmBlock node in the AST. However, if the SgAsmFunction::FUNC_LEFTOVER bit is set in the Partitioner::set_search() method then blocks that were not assigned to any function to not result in an SgAsmBlock node.
The first instruction of a basic block should never change. In particular, the address of the first instruction should not change because this address is used as a key to link a BasicBlock object to a Function object.
Public Member Functions | |
| BasicBlock () | |
| Constructor. | |
| ~BasicBlock () | |
| Destructor. | |
| bool | valid_cache () const |
| Returns true if the block analysis cache is up to date. | |
| void | invalidate_cache () |
| Marks the block analysis cache as being outdated. | |
| void | validate_cache () |
| Marks the block analysis cache as being up to date. | |
| void | clear_data_blocks () |
| Remove all data blocks from this basic block. | |
| Instruction * | last_insn () const |
| Returns the last executed (exit) instruction of the block. | |
| rose_addr_t | address () const |
| Returns the first address of a basic block. | |
Public Attributes | |
| unsigned | reason |
| Reasons this block was created; SgAsmBlock::Reason bit flags. | |
| std::vector< Instruction * > | insns |
| Non-empty set of instructions composing this basic block, in address order. | |
| std::set< DataBlock * > | data_blocks |
| Data blocks owned by this basic block. | |
| BlockAnalysisCache | cache |
| Cached results of local analyses. | |
| Function * | function |
| Function to which this basic block is assigned, or null. | |
| double | code_likelihood |
| Likelihood (0. | |
| Partitioner::BasicBlock::BasicBlock | ( | ) | [inline] |
Constructor.
This constructor should not be called directly since the Partitioner has other pointers that it needs to establish to this block. Instead, call Partitioner::find_bb_containing().
| Partitioner::BasicBlock::~BasicBlock | ( | ) | [inline] |
Destructor.
This destructor should not be called directly since there are other pointers to this block that the block does not know about. Instead, call Partitioner::discard().
| bool Partitioner::BasicBlock::valid_cache | ( | ) | const [inline] |
Returns true if the block analysis cache is up to date.
| void Partitioner::BasicBlock::invalidate_cache | ( | ) | [inline] |
Marks the block analysis cache as being outdated.
| void Partitioner::BasicBlock::validate_cache | ( | ) | [inline] |
Marks the block analysis cache as being up to date.
| void Partitioner::BasicBlock::clear_data_blocks | ( | ) |
Remove all data blocks from this basic block.
The data blocks continue to exist, they're just no longer associated with this basic block.
| Partitioner::Instruction * Partitioner::BasicBlock::last_insn | ( | ) | const |
Returns the last executed (exit) instruction of the block.
| rose_addr_t Partitioner::BasicBlock::address | ( | ) | const |
Returns the first address of a basic block.
Since the instructions of a basic block are not necessarily monotonically increasing, the first address might not be the lowest address.
| unsigned Partitioner::BasicBlock::reason |
Reasons this block was created; SgAsmBlock::Reason bit flags.
| std::vector<Instruction*> Partitioner::BasicBlock::insns |
Non-empty set of instructions composing this basic block, in address order.
| std::set<DataBlock*> Partitioner::BasicBlock::data_blocks |
Data blocks owned by this basic block.
E.g., this block's jump table.
Cached results of local analyses.
Function to which this basic block is assigned, or null.
Likelihood (0.
.1) that this is code. One unless detected statistically.
1.4.7