diff options
author | Jiufu Guo <guojiufu@linux.ibm.com> | 2023-10-16 15:28:52 +0800 |
---|---|---|
committer | guojiufu <guojiufu@linux.ibm.com> | 2023-10-16 15:34:51 +0800 |
commit | b7a28c0904fa67f98d7ca7e9d828fc5fc58c7078 (patch) | |
tree | f0900632b11f49e81cec2a9cc959d8ee2f945153 /gcc/gimple-range-fold.cc | |
parent | e6d063086726ccb2c5219611319285099a628878 (diff) | |
download | gcc-b7a28c0904fa67f98d7ca7e9d828fc5fc58c7078.zip gcc-b7a28c0904fa67f98d7ca7e9d828fc5fc58c7078.tar.gz gcc-b7a28c0904fa67f98d7ca7e9d828fc5fc58c7078.tar.bz2 |
use more get_range_query
For "get_global_range_query" SSA_NAME_RANGE_INFO can be queried.
For "get_range_query", it could get more context-aware range info.
And look at the implementation of "get_range_query", it returns
global range if no local fun info.
So, if not quering for SSA_NAME and not chaning the IL, it would
be ok to use get_range_query to replace get_global_range_query.
gcc/ChangeLog:
* fold-const.cc (expr_not_equal_to): Replace get_global_range_query
by get_range_query.
* gimple-fold.cc (size_must_be_zero_p): Likewise.
* gimple-range-fold.cc (fur_source::fur_source): Likewise.
* gimple-ssa-warn-access.cc (check_nul_terminated_array): Likewise.
* tree-dfa.cc (get_ref_base_and_extent): Likewise.
Diffstat (limited to 'gcc/gimple-range-fold.cc')
-rw-r--r-- | gcc/gimple-range-fold.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index d1945cc..6e9530c 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -50,10 +50,8 @@ fur_source::fur_source (range_query *q) { if (q) m_query = q; - else if (cfun) - m_query = get_range_query (cfun); else - m_query = get_global_range_query (); + m_query = get_range_query (cfun); m_gori = NULL; } |