diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-07-25 16:42:00 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-07-25 20:54:23 +0200 |
commit | a6efab5fbc468b6f98a7522295b7991d2036588b (patch) | |
tree | 2a307fd3068c5374870e6b6301e07d594013e3ef /gcc/gimple-array-bounds.cc | |
parent | 838da6cf8d2c8574f5b626823b742032e656619d (diff) | |
download | gcc-a6efab5fbc468b6f98a7522295b7991d2036588b.zip gcc-a6efab5fbc468b6f98a7522295b7991d2036588b.tar.gz gcc-a6efab5fbc468b6f98a7522295b7991d2036588b.tar.bz2 |
Dispatch code for floating point range ops.
This modifies the range-op dispatch code to handle floats. Also
provided are the stub routines for the floating point range-ops, as we
need something to dispatch to ;-).
I am not ecstatic about the dispatch code, but there's no getting
around having to switch on the tree code and type in some manner. All
the other alternatives I played with ended up being slower, or harder
to maintain. At least, this one is self-contained in the
range_op_handler API, and less than 0.16% slower for VRP in our
benchmarks.
Tested on x86-64 Linux.
gcc/ChangeLog:
* Makefile.in (OBJS): Add range-op-float.o.
* range-op.cc (get_float_handler): New.
(range_op_handler::range_op_handler): Save code and type for
delayed querying.
(range_op_handler::oeprator bool): Move from header file, and
add support for floats.
(range_op_handler::fold_range): Add support for floats.
(range_op_handler::op1_range): Same.
(range_op_handler::op2_range): Same.
(range_op_handler::lhs_op1_relation): Same.
(range_op_handler::lhs_op2_relation): Same.
(range_op_handler::op1_op2_relation): Same.
* range-op.h (class range_operator_float): New.
(class floating_op_table): New.
* value-query.cc (range_query::get_tree_range): Add case for
REAL_CST.
* range-op-float.cc: New file.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions