Jeff Law <l...@redhat.com> writes: > On 11/16/13 05:53, Richard Sandiford wrote: >> After the patch that went in yesterday, all calls to host_integerp and >> tree_low_cst pass a constant "pos" argument. This series replaces each >> function with two separate ones: > [ ... ] > So I've almost entirely ignored the whole wide-int conversion discussion > and I suspect I'm not entirely alone. > > Can you briefly summarize what's y'all are trying to accomplish with the > wide-int changes?
At the moment, we can only handle tree and rtl integer constants that fit in 2 HOST_WIDE_INTs. The idea is to remove that limit. E.g. things like OImode (used in a few ports) will become a first-class citizen, with all OImode values being representable. Besides that headline reason, there are various side benefits. E.g.: - All INTEGER_CSTs can be viewed either in their TYPE_PRECISION or in "infinite" precision, which isn't possible for 128-bit constants today. (I.e. there's no way to distinguish signed and unsigned 128-bit constants in a double_int.) - Wider-than-2-HWI intermediate results can be represented as a single integer. I'm told this is useful for VRP. (wide-int is mostly Kenny and Mike's work, I've just been butting in recently.) - rtl-level constant folding can use the same code to handle all combinations of CONST_INT and CONST_DOUBLE (and CONST_WIDE_INT, on converted ports). At the moment we handle CONST_INT cases specially, and don't try as hard with CONST_DOUBLEs. Implementation-wise, it tries to make it so that the common single-HWI cases are still fast. Thanks, Richard