GCC Middle and Back End API Reference
|
#include <call-string.h>
Data Structures | |
struct | element_t |
struct | hashmap_traits_t |
Public Member Functions | |
void | print (pretty_printer *pp) const |
std::unique_ptr< json::value > | to_json () const |
bool | empty_p () const |
const call_string * | push_call (const supergraph &sg, const call_superedge *sedge) const |
const call_string * | push_call (const supernode *src, const supernode *dest) const |
const call_string * | get_parent () const |
int | calc_recursion_depth () const |
const supernode * | get_callee_node () const |
const supernode * | get_caller_node () const |
unsigned | length () const |
element_t | operator[] (unsigned idx) const |
const element_t & | get_top_of_stack () const |
int | count_occurrences_of_function (function *) const |
void | validate () const |
Static Public Member Functions | |
static int | cmp (const call_string &a, const call_string &b) |
static int | cmp_ptr_ptr (const void *, const void *) |
Private Member Functions | |
DISABLE_COPY_AND_ASSIGN (call_string) | |
call_string () | |
call_string (const call_string &parent, const element_t &to_push) | |
~call_string () | |
void | recursive_log (logger *logger) const |
Private Attributes | |
const call_string * | m_parent |
auto_vec< element_t > | m_elements |
hash_map< element_t, const call_string *, hashmap_traits_t > | m_children |
Friends | |
class | region_model_manager |
A string of return_superedge pointers, representing a call stack at a program point. This is used to ensure that we generate interprocedurally valid paths i.e. that we return to the same callsite that called us. The class stores returning calls ( which may be represented by a returning superedge ). We do so because this is what we need to compare against. Instances of call_string are consolidated by the region_model_manager, which effectively owns them: it owns the root/empty call_string, and each call_string instance tracks its children, lazily creating them on demand, so that the call_string instances form a tree-like hierarchy in memory.
|
private |
|
private |
|
private |
int ana::call_string::calc_recursion_depth | ( | ) | const |
|
static |
|
static |
int ana::call_string::count_occurrences_of_function | ( | function * | ) | const |
Referenced by ana::exploded_graph::detect_infinite_recursion().
|
private |
|
inline |
References m_elements.
const supernode * ana::call_string::get_callee_node | ( | ) | const |
const supernode * ana::call_string::get_caller_node | ( | ) | const |
|
inline |
References m_parent.
|
inline |
References gcc_assert, and m_elements.
Referenced by ana::exploded_graph::detect_infinite_recursion().
|
inline |
References m_elements.
Referenced by ana::program_point::get_stack_depth().
|
inline |
References m_elements.
void ana::call_string::print | ( | pretty_printer * | pp | ) | const |
const call_string * ana::call_string::push_call | ( | const supergraph & | sg, |
const call_superedge * | sedge ) const |
const call_string * ana::call_string::push_call | ( | const supernode * | src, |
const supernode * | dest ) const |
|
private |
std::unique_ptr< json::value > ana::call_string::to_json | ( | ) | const |
void ana::call_string::validate | ( | ) | const |
|
friend |
|
mutableprivate |
Referenced by empty_p(), get_top_of_stack(), length(), and operator[]().
|
private |
Referenced by get_parent().