Remove double-int.
Discusses removing double-int in favor of wide-int, considering potential efficiency losses.
This discussion revolves around removing the double-int C++ type in favor of fixed_wide_int. The proposer supports the removal, contingent on a thorough evaluation of potential performance degradations in terms of size and speed. The potential impact on various compiler components is also noted.
- proposer
Supports removing `double-int` in favor of `wide_int` but emphasizes the need to examine potential efficiency losses in size and speed.
“In general I'd support dropping double_int uses in favor of wide_int, but we have to look out for the loss of efficiency (in size/speed?)”
- contributor
Notes that `double-int` operates on 128-bit integers and `wide-int.h` has `fixed_wide_int` which doesn't use the heap, potentially simplifying functions and enabling the removal of `double_int_to_tree`.
“double-int currently operates in 128 bit integers according to double-int.h. wide-int.h has fixed_wide_int, which does not use heap. This helps PR126622, simplifying build_int_cst-like functions, including the removal of double_int_to_tree.”
Technical Tradeoffs
- Removal of `double-int` simplifies code but may impact performance.
- Adoption of `fixed_wide_int` avoids heap allocations but needs performance validation.
In Details
This discussion concerns the potential removal of the double_int type from GCC, which represents 128-bit integers. The proposal suggests replacing it with fixed_wide_int, a more modern implementation that avoids heap allocations. The primary concern is the potential performance impact, as double_int might be more efficient in certain code paths.
- double-int
- A GCC internal type representing 128-bit integers, potentially implemented using multiple machine words.
- wide-int
- A more general type in GCC for representing arbitrary-width integers, with
fixed_wide_intbeing a variant that uses a fixed-size buffer instead of heap allocation. - PR126622
- A bug report or feature request within the GCC bug tracking system, relevant to the simplification of
build_int_cst-like functions. - double_int_to_tree
- A GCC internal function that converts a
double_inttype to a GENERIC tree representation.