This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch to fix


On Oct 3, 2012, at 1:47 PM, Marc Glisse <marc.glisse@inria.fr> wrote:
> did you consider making the size of wide_int a template parameter, now that we are using C++? All with a convenient typedef or macro so it doesn't show. I am asking because in vrp I do some arithmetic that requires 2*N+1 bits where N is the size of double_int.

No, not really.  I'd maybe answer it this way, we put in a type (singular) to support all integral constants in all languages on a port.  Since we only needed 1, there was little need to templatize it.  By supporting all integral constants in all languages, there is little need for more.  If Ada say, wanted a 2048 bit integer, then, we just have it drop off the size it wants someplace and we would mix that in on a MAX(….) line, net result, the type we use would then directly support the needs of Ada.  If vpr wanted 2x of all existing modes, we could simply change the MAX equation and essentially double it; if people need that.  This comes as a cost, as the intermediate wide values are fixed size allocated (not variable); so these all would be larger.  For the longer lived values, no change, as these are variably sized as one would expect.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]