aboutsummaryrefslogtreecommitdiff
path: root/gcc/builtins.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-09-17 09:34:03 +0200
committerAldy Hernandez <aldyh@redhat.com>2020-10-01 17:11:17 +0200
commitf5299992827048274f2146746ab4abab3accd124 (patch)
treeb0830471dbe0c82c925a6c75a709c558645bc7c8 /gcc/builtins.h
parenta889e06ac680e0aafa62cd5dec99e75d3f1ca1b6 (diff)
downloadgcc-f5299992827048274f2146746ab4abab3accd124.zip
gcc-f5299992827048274f2146746ab4abab3accd124.tar.gz
gcc-f5299992827048274f2146746ab4abab3accd124.tar.bz2
Convert sprintf/strlen passes to value query class.
gcc/ChangeLog: * builtins.c (compute_objsize): Replace vr_values with range_query. (get_range): Same. (gimple_call_alloc_size): Same. * builtins.h (class vr_values): Remove. (gimple_call_alloc_size): Replace vr_values with range_query. * gimple-ssa-sprintf.c (get_int_range): Same. (struct directive): Pass gimple context to fmtfunc callback. (directive::set_width): Replace inline with out-of-line version. (directive::set_precision): Same. (format_none): New gimple argument. (format_percent): New gimple argument. (format_integer): New gimple argument. (format_floating): New gimple argument. (get_string_length): Use range_query API. (format_character): New gimple argument. (format_string): New gimple argument. (format_plain): New gimple argument. (format_directive): New gimple argument. (parse_directive): Replace vr_values with range_query. (compute_format_length): Same. (handle_printf_call): Same. Adjust for range_query API. * tree-ssa-strlen.c (get_range): Same. (compare_nonzero_chars): Same. (get_addr_stridx) Replace vr_values with range_query. (get_stridx): Same. (dump_strlen_info): Same. (get_range_strlen_dynamic): Adjust for range_query API. (set_strlen_range): Same (maybe_warn_overflow): Replace vr_values with range_query. (handle_builtin_strcpy): Same. (maybe_diag_stxncpy_trunc): Add FIXME comment. (handle_builtin_memcpy): Replace vr_values with range_query. (handle_builtin_memset): Same. (get_len_or_size): Same. (strxcmp_eqz_result): Same. (handle_builtin_string_cmp): Same. (count_nonzero_bytes_addr): Same, plus adjust for range_query API. (count_nonzero_bytes): Replace vr_values with range_query. (handle_store): Same. (strlen_check_and_optimize_call): Same. (handle_integral_assign): Same. (check_and_optimize_stmt): Same. * tree-ssa-strlen.h (class vr_values): Remove. (get_range): Replace vr_values with range_query. (get_range_strlen_dynamic): Same. (handle_printf_call): Same.
Diffstat (limited to 'gcc/builtins.h')
-rw-r--r--gcc/builtins.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/builtins.h b/gcc/builtins.h
index 8136b76..504c618 100644
--- a/gcc/builtins.h
+++ b/gcc/builtins.h
@@ -195,13 +195,13 @@ struct access_data
access_mode mode;
};
-class vr_values;
+class range_query;
extern tree gimple_call_alloc_size (gimple *, wide_int[2] = NULL,
- const vr_values * = NULL);
-extern tree gimple_parm_array_size (tree, wide_int[2], const vr_values * = NULL);
+ range_query * = NULL);
+extern tree gimple_parm_array_size (tree, wide_int[2], range_query * = NULL);
extern tree compute_objsize (tree, int, tree * = NULL, tree * = NULL,
- const vr_values * = NULL);
-extern tree compute_objsize (tree, int, access_ref *, const vr_values * = NULL);
+ range_query * = NULL);
+extern tree compute_objsize (tree, int, access_ref *, range_query * = NULL);
extern bool check_access (tree, tree, tree, tree, tree, access_mode,
const access_data * = NULL);