aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/internal.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-10-09 11:26:33 +0200
committerAldy Hernandez <aldyh@redhat.com>2020-10-20 18:21:23 +0200
commit16e4f1ad44e3c00b8b73c9e4ade3d236ea7044a8 (patch)
tree8d9782b4176bc6c40aac2f84355ffca712d75b73 /libbacktrace/internal.h
parent5d53ec27015b916640171e891870adf2c6fdfd4c (diff)
downloadgcc-16e4f1ad44e3c00b8b73c9e4ade3d236ea7044a8.zip
gcc-16e4f1ad44e3c00b8b73c9e4ade3d236ea7044a8.tar.gz
gcc-16e4f1ad44e3c00b8b73c9e4ade3d236ea7044a8.tar.bz2
Refactor range handling of builtins in vr_values and ranger.
This sets things up so we can share range handling of builtins between vr_values and ranger. It is meant to refactor the code so that we can verify that both implementations yield the same results. First, we abstract out gimple_ranger::range_of_builtin_call into an externally visible counterpart that can be called from vr_values. It will take a range_query since both ranger and vr_values inherit from this base class. Then we abstract out all the builtin handling in vr_values into a separate method that is easier to compare against. Finally, we call the ranger version from vr_values and compare it with the vr_values version. Since this proves both versions return the same, we can remove vr_values::extract_range_builtin in a follow-up patch. The vr_values::range_of_expr change brings the vr_values version up to par with the ranger version. It should've handled non-SSA's. This was a small oversight that went unnoticed because the vr_value version isn't stressed nearly as much as the ranger version. The change is needed because the ranger code handling builtins calls, may call it for integer arguments in range_of_builtin_ubsan_call. There should be no change in functionality. gcc/ChangeLog: * gimple-range.cc (gimple_ranger::range_of_builtin_ubsan_call): Make externally visble... (range_of_builtin_ubsan_call): ...here. Add range_query argument. (gimple_ranger::range_of_builtin_call): Make externally visible... (range_of_builtin_call): ...here. Add range_query argument. * gimple-range.h (range_of_builtin_call): Move out from class and make externally visible. * vr-values.c (vr_values::extract_range_basic): Abstract out builtin handling to... (vr_values::range_of_expr): Handle non SSAs. (vr_values::extract_range_builtin): ...here. * vr-values.h (class vr_values): Add extract_range_builtin. (range_of_expr): Rename NAME to EXPR.
Diffstat (limited to 'libbacktrace/internal.h')
0 files changed, 0 insertions, 0 deletions