GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "pointer-query.h"
#include "ssa.h"
#include "gimple-pretty-print.h"
#include "gimple-ssa-warn-access.h"
#include "gimple-ssa-warn-restrict.h"
#include "diagnostic-core.h"
#include "fold-const.h"
#include "gimple-iterator.h"
#include "tree-dfa.h"
#include "tree-ssa.h"
#include "tree-cfg.h"
#include "tree-object-size.h"
#include "calls.h"
#include "cfgloop.h"
#include "intl.h"
#include "gimple-range.h"
Functions | |
opt_code | check_bounds_or_overlap (gimple *call, tree dst, tree src, tree dstsize, tree srcsize, bool bounds_only, bool do_warn) |
opt_code | check_bounds_or_overlap (pointer_query &ptrqry, gimple *call, tree dst, tree src, tree dstsize, tree srcsize, bool bounds_only, bool do_warn) |
gimple_opt_pass * | make_pass_warn_restrict (gcc::context *ctxt) |
DEBUG_FUNCTION void | dump_builtin_memref (FILE *fp, const builtin_memref &ref) |
DEBUG_FUNCTION void | dump_builtin_access (FILE *fp, gimple *stmt, const builtin_access &acs) |
DEBUG_FUNCTION void | debug (gimple *stmt, const builtin_access &acs) |
opt_code check_bounds_or_overlap | ( | gimple * | call, |
tree | dst, | ||
tree | src, | ||
tree | dstsize, | ||
tree | srcsize, | ||
bool | bounds_only, | ||
bool | do_warn ) |
Attempt to detect and diagnose invalid offset bounds and (except for memmove) overlapping copy in a call expression EXPR from SRC to DST and DSTSIZE and SRCSIZE bytes, respectively. Both DSTSIZE and SRCSIZE may be NULL. DO_WARN is false to detect either problem without issue a warning. Return the OPT_Wxxx constant corresponding to the warning if one has been detected and zero otherwise.
References cfun, check_bounds_or_overlap(), and get_range_query().
Referenced by check_bounds_or_overlap(), gimple_fold_builtin_memory_op(), strlen_pass::handle_builtin_strcat(), strlen_pass::handle_builtin_strcpy(), and strlen_pass::handle_builtin_stxncpy_strncat().
DEBUG_FUNCTION void debug | ( | gimple * | stmt, |
const builtin_access & | acs ) |
References dump_builtin_access().
DEBUG_FUNCTION void dump_builtin_access | ( | FILE * | fp, |
gimple * | stmt, | ||
const builtin_access & | acs ) |
References print_gimple_expr(), and TDF_LINENO.
Referenced by debug().
DEBUG_FUNCTION void dump_builtin_memref | ( | FILE * | fp, |
const builtin_memref & | ref ) |
References print_generic_expr(), and TDF_LINENO.
gimple_opt_pass * make_pass_warn_restrict | ( | gcc::context * | ctxt | ) |