| << Block |
| Instruction >> |
|
An edge between two basic blocks.
Additional to accessing the slot directly, this class emulates a map structure with the following special attributes:
"type" :: ValueIdentifier containing type()
"linear" :: ValueUnsigned containing is_linear()
These wrappers are especially implemented for environments where only the CrlStructure interface is available, but not the interface for this special class, particularly in OptLa. If you use the native C/C++ library interface, better use the slot access directly.
Edges' reference counting is interesting, since both ends (source and target) must be != NULL in order in increment the reference counter and prevent deletion. This is because they are stored in hash tables at blocks, indexed by the buddy block.
This leads to potentially dangerous traps: when generating a raw edge with both ends NULL, like:
edge = new Edge;
you must be careful to not set the ends like this without protection:
edge->set_source (source); edge->set_target (target); // CRASH!
The reason is that the set_source() invocation will deallocate the edge due to the reference counter being 0.
So protect the above sequence:
CRL_REF (edge); edge->set_source (source); edge->set_target (target); // ok. CRL_UNREF (edge);
After this requence, the ref_count() of the edge is 2 (if it was 0 before), so the CRL_UNREF() does not delete it.
Alternatively, set the edges upon creation:
edge= new Edge (source, target);
Immediate super class: RoutineItem
| typedef | edge_type_t | type_t |
| bool | is_linear |
| PAGDFIStore * | pag_dfi_store |
| Block * | source |
| Block * | target |
| edge_type_t | type |
| MapSymbolValue | Item:: | attrs |
| int | Object:: | class_id |
| MapContextMapSymbolValue | RoutineItem:: | context_attrs |
| int | Object:: | heap_sig |
| int | WithID:: | id |
| MapIntMapSymbolValue | RoutineItem:: | position_attrs |
| int | Object:: | ref_count |
| UserData | Object:: | user_data |
| bool | is_special_type | (edge_type_t) | ||
| edge_type_t | string_to_type | (char const *) | ||
| symbol_t | type_to_symbol | (edge_type_t) | ||
| CrlEdge | () | |||
| CrlEdge | (Block *) | |||
| CrlEdge | (Block *, Block *, edge_type_t = CRL_EDGE_NORMAL, bool linear = false) | |||
| CrlEdge | (Block *, Routine *) | |||
| Block * | block | () const | ||
| ItemDeclaration * | declaration | () const | ||
| Value * | find | (Context const * ctxt, char const * key) const | ||
| Value * | find | (Context const * ctxt, Value const * key) const | ||
| bool | find | (float_t & result, Context const * ctxt, char const * key) const | ||
| bool | find | (float_t & result, Context const * ctxt, Value const * key) const | ||
| bool | find | (float_t & result, int pos, char const * key) const | ||
| bool | find | (float_t & result, int pos, Value const * key) const | ||
| Value * | find | (int pos, char const * key) const | ||
| Value * | find | (int pos, Value const * key) const | ||
| bool | find | (signed_t & result, Context const * ctxt, char const * key) const | ||
| bool | find | (signed_t & result, Context const * ctxt, Value const * key) const | ||
| bool | find | (signed_t & result, int pos, char const * key) const | ||
| bool | find | (signed_t & result, int pos, Value const * key) const | ||
| bool | find | (unsigned_t & result, Context const * ctxt, char const * key) const | ||
| bool | find | (unsigned_t & result, Context const * ctxt, Value const * key) const | ||
| bool | find | (unsigned_t & result, int pos, char const * key) const | ||
| bool | find | (unsigned_t & result, int pos, Value const * key) const | ||
| Value * | find | (char const * key) const | ||
| bool | find | (float_t & result, char const * key) const | ||
| bool | find | (float_t & result, Value const * key) const | ||
| bool | find | (signed_t & result, char const * key) const | ||
| bool | find | (signed_t & result, Value const * key) const | ||
| bool | find | (unsigned_t & result, char const * key) const | ||
| bool | find | (unsigned_t & result, Value const * key) const | ||
| Value * | find | (Value const * key) const | ||
| bool | find_bool | (Context const * ctxt, char const * key) const | ||
| bool | find_bool | (Context const * ctxt, Value const * key) const | ||
| bool | find_bool | (int pos, char const * key) const | ||
| bool | find_bool | (int pos, Value const * key) const | ||
| bool | find_bool | (char const * key) const | ||
| bool | find_bool | (Value const * key) const | ||
| bool | find_bool_sym | (Context const * ctxt, symbol_t key) const | ||
| bool | find_bool_sym | (int pos, symbol_t key) const | ||
| bool | find_bool_sym | (symbol_t key) const | ||
| byte_t | find_byte | (Context const * ctxt, char const * key) const | ||
| byte_t | find_byte | (Context const * ctxt, Value const * key) const | ||
| byte_t | find_byte | (int pos, char const * key) const | ||
| byte_t | find_byte | (int pos, Value const * key) const | ||
| byte_t | find_byte | (char const * key) const | ||
| byte_t | find_byte | (Value const * key) const | ||
| byte_t | find_byte_sym | (Context const * ctxt, symbol_t key) const | ||
| byte_t | find_byte_sym | (int pos, symbol_t key) const | ||
| byte_t | find_byte_sym | (symbol_t key) const | ||
| int | find_int | (Context const * ctxt, char const * key) const | ||
| int | find_int | (Context const * ctxt, Value const * key) const | ||
| int | find_int | (int pos, char const * key) const | ||
| int | find_int | (int pos, Value const * key) const | ||
| int | find_int | (char const * key) const | ||
| int | find_int | (Value const * key) const | ||
| int | find_int_sym | (Context const * ctxt, symbol_t key) const | ||
| int | find_int_sym | (int pos, symbol_t key) const | ||
| int | find_int_sym | (symbol_t key) const | ||
| Item * | find_item | (Context const * ctxt, char const * key) const | ||
| Item * | find_item | (Context const * ctxt, Value const * key) const | ||
| Item * | find_item | (int pos, char const * key) const | ||
| Item * | find_item | (int pos, Value const * key) const | ||
| Item * | find_item | (char const * key) const | ||
| Item * | find_item | (Value const * key) const | ||
| Item * | find_item_sym | (Context const * ctxt, symbol_t key) const | ||
| Item * | find_item_sym | (int pos, symbol_t key) const | ||
| Item * | find_item_sym | (symbol_t key) const | ||
| char const * | find_string | (Context const * ctxt, char const * key) const | ||
| char const * | find_string | (Context const * ctxt, Value const * key) const | ||
| char const * | find_string | (int pos, char const * key) const | ||
| char const * | find_string | (int pos, Value const * key) const | ||
| char const * | find_string | (char const * key) const | ||
| char const * | find_string | (Value const * key) const | ||
| char const * | find_string_sym | (Context const * ctxt, symbol_t key) const | ||
| char const * | find_string_sym | (int pos, symbol_t key) const | ||
| char const * | find_string_sym | (symbol_t key) const | ||
| Value * | find_sym | (Context const * ctxt, symbol_t key) const | ||
| bool | find_sym | (float_t & result, Context const * ctxt, symbol_t key) const | ||
| bool | find_sym | (float_t & result, int pos, symbol_t key) const | ||
| Value * | find_sym | (int pos, symbol_t key) const | ||
| bool | find_sym | (signed_t & result, Context const * ctxt, symbol_t key) const | ||
| bool | find_sym | (signed_t & result, int pos, symbol_t key) const | ||
| bool | find_sym | (unsigned_t & result, Context const * ctxt, symbol_t key) const | ||
| bool | find_sym | (unsigned_t & result, int pos, symbol_t key) const | ||
| Value * | find_sym | (symbol_t key) const | ||
| bool | find_sym | (float_t & result, symbol_t key) const | ||
| bool | find_sym | (signed_t & result, symbol_t key) const | ||
| bool | find_sym | (unsigned_t & result, symbol_t key) const | ||
| symbol_t | find_symbol | (Context const * ctxt, char const * key) const | ||
| symbol_t | find_symbol | (Context const * ctxt, Value const * key) const | ||
| symbol_t | find_symbol | (int pos, char const * key) const | ||
| symbol_t | find_symbol | (int pos, Value const * key) const | ||
| symbol_t | find_symbol | (char const * key) const | ||
| symbol_t | find_symbol | (Value const * key) const | ||
| symbol_t | find_symbol_sym | (Context const * ctxt, symbol_t key) const | ||
| symbol_t | find_symbol_sym | (int pos, symbol_t key) const | ||
| symbol_t | find_symbol_sym | (symbol_t key) const | ||
| word32_t | find_word32 | (Context const * ctxt, char const * key) const | ||
| word32_t | find_word32 | (Context const * ctxt, Value const * key) const | ||
| word32_t | find_word32 | (int pos, char const * key) const | ||
| word32_t | find_word32 | (int pos, Value const * key) const | ||
| word32_t | find_word32 | (char const * key) const | ||
| word32_t | find_word32 | (Value const * key) const | ||
| word32_t | find_word32_sym | (Context const * ctxt, symbol_t key) const | ||
| word32_t | find_word32_sym | (int pos, symbol_t key) const | ||
| word32_t | find_word32_sym | (symbol_t key) const | ||
| Value * | get | () | ||
| Value const * | get | () const | ||
| bool | good_type | (edge_type_t, bool with_convert = true) const | ||
| Graph * | graph | () const | ||
| bool | has | (Context const * ctxt, char const * key) const | ||
| bool | has | (Context const * ctxt, Value const * key) const | ||
| bool | has | (int pos, char const * key) const | ||
| bool | has | (int pos, Value const * key) const | ||
| bool | has | (char const * key) const | ||
| bool | has | (Value const * key) const | ||
| bool | has_special_type | () const | ||
| bool | has_sym | (Context const * ctxt, symbol_t key) const | ||
| bool | has_sym | (int pos, symbol_t key) const | ||
| bool | has_sym | (symbol_t key) const | ||
| bool | invalidate | () | ||
| bool | is_linear | () const | ||
| bool | is_special | (char const * key) const | ||
| bool | is_special | (Value const * key) const | ||
| bool | is_special_sym | (symbol_t key) const | ||
| bool | is_valid | () const | ||
| bool | is_valid_special | () const | ||
| void | pag_check | () | ||
| PAGDFIStore * | pag_dfi_store | () const | ||
| bool | poke | (Value * value) | ||
| bool | poke_once | (Value * value) | ||
| bool | reset | (Context const * ctxt, char const * key) | ||
| bool | reset | (Context const * ctxt, Value const * key) | ||
| bool | reset | (int pos, char const * key) | ||
| bool | reset | (int pos, Value const * key) | ||
| bool | reset | (char const * key) | ||
| bool | reset | (Value const * key) | ||
| void | reset_linear | () | ||
| void | reset_pag_dfi_store | () | ||
| void | reset_source | () | ||
| bool | reset_sym | (Context const * ctxt, symbol_t key) | ||
| bool | reset_sym | (int pos, symbol_t key) | ||
| bool | reset_sym | (symbol_t key) | ||
| void | reset_target | () | ||
| bool | reset_type | () | ||
| Routine * | routine | () const | ||
| bool | set | (Context const * ctxt, char const * key, Value * value) | ||
| bool | set | (Context const * ctxt, char const * key, Item * value) | ||
| bool | set | (Context const * ctxt, char const * key, char const * value) | ||
| bool | set | (Context const * ctxt, char const * key, unsigned_t value) | ||
| bool | set | (Context const * ctxt, Value const * key, Value * value) | ||
| bool | set | (Context const * ctxt, Value const * key, Item * value) | ||
| bool | set | (Context const * ctxt, Value const * key, char const * value) | ||
| bool | set | (Context const * ctxt, Value const * key, unsigned_t value) | ||
| bool | set | (int pos, char const * key, Value * value) | ||
| bool | set | (int pos, char const * key, Item * value) | ||
| bool | set | (int pos, char const * key, char const * value) | ||
| bool | set | (int pos, char const * key, unsigned_t value) | ||
| bool | set | (int pos, Value const * key, Value * value) | ||
| bool | set | (int pos, Value const * key, Item * value) | ||
| bool | set | (int pos, Value const * key, char const * value) | ||
| bool | set | (int pos, Value const * key, unsigned_t value) | ||
| bool | set | (char const * key, Value * value) | ||
| bool | set | (char const * key, Item * value) | ||
| bool | set | (char const * key, char const * value) | ||
| bool | set | (char const * key, unsigned_t value) | ||
| bool | set | (Value const * key, Value * value) | ||
| bool | set | (Value const * key, Item * value) | ||
| bool | set | (Value const * key, char const * value) | ||
| bool | set | (Value const * key, unsigned_t value) | ||
| void | set_ends | (Block * source, Block * target) | ||
| bool | set_float | (Context const * ctxt, char const * key, float_t value) | ||
| bool | set_float | (Context const * ctxt, Value const * key, float_t value) | ||
| bool | set_float | (int pos, char const * key, float_t value) | ||
| bool | set_float | (int pos, Value const * key, float_t value) | ||
| bool | set_float | (char const * key, float_t value) | ||
| bool | set_float | (Value const * key, float_t value) | ||
| void | set_linear | (bool) | ||
| bool | set_once | (Context const * ctxt, char const * key, Value * value) | ||
| bool | set_once | (Context const * ctxt, char const * key, Item * value) | ||
| bool | set_once | (Context const * ctxt, char const * key, char const * value) | ||
| bool | set_once | (Context const * ctxt, char const * key, unsigned_t value) | ||
| bool | set_once | (Context const * ctxt, Value const * key, Value * value) | ||
| bool | set_once | (Context const * ctxt, Value const * key, Item * value) | ||
| bool | set_once | (Context const * ctxt, Value const * key, char const * value) | ||
| bool | set_once | (Context const * ctxt, Value const * key, unsigned_t value) | ||
| bool | set_once | (int pos, char const * key, Value * value) | ||
| bool | set_once | (int pos, char const * key, Item * value) | ||
| bool | set_once | (int pos, char const * key, char const * value) | ||
| bool | set_once | (int pos, char const * key, unsigned_t value) | ||
| bool | set_once | (int pos, Value const * key, Value * value) | ||
| bool | set_once | (int pos, Value const * key, Item * value) | ||
| bool | set_once | (int pos, Value const * key, char const * value) | ||
| bool | set_once | (int pos, Value const * key, unsigned_t value) | ||
| bool | set_once | (char const * key, Value * value) | ||
| bool | set_once | (char const * key, Item * value) | ||
| bool | set_once | (char const * key, char const * value) | ||
| bool | set_once | (char const * key, unsigned_t value) | ||
| bool | set_once | (Value const * key, Value * value) | ||
| bool | set_once | (Value const * key, Item * value) | ||
| bool | set_once | (Value const * key, char const * value) | ||
| bool | set_once | (Value const * key, unsigned_t value) | ||
| bool | set_once_float | (Context const * ctxt, char const * key, float_t value) | ||
| bool | set_once_float | (Context const * ctxt, Value const * key, float_t value) | ||
| bool | set_once_float | (int pos, char const * key, float_t value) | ||
| bool | set_once_float | (int pos, Value const * key, float_t value) | ||
| bool | set_once_float | (char const * key, float_t value) | ||
| bool | set_once_float | (Value const * key, float_t value) | ||
| bool | set_once_signed | (Context const * ctxt, char const * key, signed_t value) | ||
| bool | set_once_signed | (Context const * ctxt, Value const * key, signed_t value) | ||
| bool | set_once_signed | (int pos, char const * key, signed_t value) | ||
| bool | set_once_signed | (int pos, Value const * key, signed_t value) | ||
| bool | set_once_signed | (char const * key, signed_t value) | ||
| bool | set_once_signed | (Value const * key, signed_t |