]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add function context for querying global ranges.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 6 Feb 2023 18:07:01 +0000 (13:07 -0500)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 10 Feb 2023 14:46:33 +0000 (09:46 -0500)
commit99f3ad2e5b117ee79a6dcf97288261e2fa32ab4c
tree831646b70330811f9ed4355be0e3316c7eab73fd
parentedfc4402504fd512ba469219e2ed637f2921a1c2
Add function context for querying global ranges.

When processing arguments for assume functions, call get_global_range
directly and utilize a function context pointer to avoid any assumptions
about using cfun.

PR tree-optimization/108520
gcc/
* gimple-range-infer.cc (check_assume_func): Invoke
gimple_range_global directly instead using global_range_query.
* value-query.cc (get_range_global): Add function context and
avoid calling nonnull_arg_p if not cfun.
(gimple_range_global): Add function context pointer.
* value-query.h (imple_range_global): Add function context.

gcc/testsuite/
* g++.dg/pr108520.C: New.
gcc/gimple-range-infer.cc
gcc/testsuite/g++.dg/pr108520.C [new file with mode: 0644]
gcc/value-query.cc
gcc/value-query.h