Richard Biener <richard.guent...@gmail.com> writes: >> 5) All const_ints in the .md files would need to be given a mode >> (except for those places where const_int actually represents >> a C++ constant, such as in attributes). >> >> I realise your list wasn't supposed to be exhaustive, and neither's mine :-) > > Now, do you think it is a good idea to assign integer constants a mode > or not?
I think the answer was obvious: good idea. But it's an aspiration. The huge amount of work involved means that it's out of scope unless someone has several spare months on their hands. The equivalent choice for wide_ints is not an aspiration. The choice is in ours hands. So why force the class to use the old, problematic model that rtl followed when (a) there are no compatiblity reasons to do so and (b) Kenny has already written an implementation that does it the better way? The main reason we share the same CONST_INT and CONST_DOUBLE representation for distinct constants is to save memory. Even that's not an advantage for wide_int, since wide_ints are supposed to be short-lived stack objects. Richard