]> git.ipfire.org Git - thirdparty/gcc.git/commit
Refactor compute_objsize_r into helpers.
authorMartin Sebor <msebor@redhat.com>
Mon, 6 Dec 2021 16:33:32 +0000 (09:33 -0700)
committerMartin Sebor <msebor@redhat.com>
Thu, 9 Dec 2021 16:51:48 +0000 (09:51 -0700)
commit1334d889d4adbff999fd33d5e1672ecd6bb66dd7
treeef670830f4e7b41174e060cfbcbace9f78bccd98
parent10d185b9845ad96edf45d55ca066a0258d3c3f9a
Refactor compute_objsize_r into helpers.

gcc/ChangeLog:

* pointer-query.cc (compute_objsize_r): Add an argument.
(gimple_call_return_array): Pass a new argument to compute_objsize_r.
(access_ref::merge_ref): Same.
(access_ref::inform_access): Add an argument and use it.
(access_data::access_data): Initialize new member.
(handle_min_max_size): Pass a new argument to compute_objsize_r.
(handle_decl): New function.
(handle_array_ref): Pass a new argument to compute_objsize_r.
Avoid incrementing deref.
(set_component_ref_size): New function.
(handle_component_ref): New function.
(handle_mem_ref): Pass a new argument to compute_objsize_r.
Only increment deref after successfully computing object size.
(handle_ssa_name): New function.
(compute_objsize_r): Move code into helpers and call them.
(compute_objsize): Pass a new argument to compute_objsize_r.
* pointer-query.h (access_ref::inform_access): Add an argument.
(access_data::ostype): New member.
gcc/pointer-query.cc
gcc/pointer-query.h