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"
Macros | |
#define | INCLUDE_MEMORY |
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) |
#define INCLUDE_MEMORY |
Pass to detect and issue warnings for violations of the restrict qualifier. Copyright (C) 2017-2024 Free Software Foundation, Inc. Contributed by Martin Sebor <msebor@redhat.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
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 | ) |