]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add range-ops support for builtin functions.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 20 Sep 2022 20:53:37 +0000 (16:53 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 22 Sep 2022 18:48:29 +0000 (14:48 -0400)
commitb40b3035879cf695b72010858b9705a344292bdb
tree95ba68b08dc3d79bc073f63687f5d7fd13693ddf
parent2f92f685da2ef9e82ee6262519919180df8f2dd9
Add range-ops support for builtin functions.

Convert CFN_BUILT_IN_CONSTANT_P as first POC.

* gimple-range-fold.cc
(fold_using_range::range_of_builtin_int_call): Remove case for
CFN_BUILT_IN_CONSTANT_P.
* gimple-range-op.cc (gimple_range_op_handler::supported_p):
Check if a call also creates a range-op object.
(gimple_range_op_handler): Also check builtin calls.
(class cfn_constant_float_p): New.  Float CFN_BUILT_IN_CONSTANT_P.
(class cfn_constant_p): New.  Integral CFN_BUILT_IN_CONSTANT_P.
(gimple_range_op_handler::maybe_builtin_call): Set arguments and
handler for supported built-in calls.
* gimple-range-op.h (maybe_builtin_call): New prototype.
gcc/gimple-range-fold.cc
gcc/gimple-range-op.cc
gcc/gimple-range-op.h