GCC Middle and Back End API Reference
pointer_query Class Reference

#include <pointer-query.h>

Collaboration diagram for pointer_query:

Data Structures

struct  cache_type

Public Member Functions

 pointer_query (range_query *=nullptr)
const access_refget_ref (tree, int=1) const
bool get_ref (tree, gimple *, access_ref *, int=1)
void put_ref (tree, const access_ref &, int=1)
void flush_cache ()
void dump (FILE *, bool=false)

Data Fields

unsigned hits
unsigned misses
unsigned failures
unsigned depth
unsigned max_depth

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (pointer_query)

Private Attributes

cache_type var_cache

Detailed Description

Queries and caches compute_objsize results.   

Constructor & Destructor Documentation

◆ pointer_query()

pointer_query::pointer_query ( range_query * qry = nullptr)
Default ctor.  Initialize object with pointers to the range_query
instance to use or null.   

Member Function Documentation


pointer_query::DISABLE_COPY_AND_ASSIGN ( pointer_query )

◆ dump()

void pointer_query::dump ( FILE * dump_file,
bool contents = false )

◆ flush_cache()

void pointer_query::flush_cache ( )

◆ get_ref() [1/2]

bool pointer_query::get_ref ( tree ptr,
gimple * stmt,
access_ref * pref,
int ostype = 1 )
Retrieve the access_ref instance for a variable from the cache if it's
there or compute it and insert it into the cache if it's nonnonull.   

References pointer_query::cache_type::access_refs, compute_objsize(), failures, hits, pointer_query::cache_type::indices, misses, pref, SSA_NAME_VERSION, TREE_CODE, and var_cache.

◆ get_ref() [2/2]

const access_ref * pointer_query::get_ref ( tree ptr,
int ostype = 1 ) const
Return a pointer to the cached access_ref instance for the SSA_NAME
PTR if it's there or null otherwise.   

References pointer_query::cache_type::access_refs, hits, pointer_query::cache_type::indices, misses, NULL, access_ref::ref, SSA_NAME_VERSION, and var_cache.

Referenced by array_bounds_checker::check_mem_ref(), get_maxbound(), and handle_ssa_name().

◆ put_ref()

void pointer_query::put_ref ( tree ptr,
const access_ref & ref,
int ostype = 1 )

Field Documentation

◆ depth

unsigned pointer_query::depth

◆ failures

unsigned pointer_query::failures

Referenced by dump(), and get_ref().

◆ hits

unsigned pointer_query::hits

Referenced by dump(), get_ref(), and get_ref().

◆ max_depth

unsigned pointer_query::max_depth

Referenced by dump(), and handle_ssa_name().

◆ misses

unsigned pointer_query::misses

Referenced by dump(), get_ref(), and get_ref().

◆ rvals

◆ var_cache

cache_type pointer_query::var_cache

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