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] Sign extension elimination


> Leehod, Mircea, just for future reference:
>
>
> A better way to do the union-find stuff, rather than put a member in
> struct web for extra info, would probably be to do the following:
>
>
> struct sign_extension_web
> {
>   struct web web;
>   <your extra fields>
> };
>
> You should be able to pass pointers to sign_extension_web to the union
> find functions without any problems, and wouldn't need to have "void
> *extra_info" in struct web.
>
>
> --Dan

Sorry for the *long* time it took me to respond to your note.
I suddenly remembered that I wanted to respond but it slipped
my mined.

You are right that our problem could have been solved this way,
but the reason that I made this *extra_info flag is that the
problem is general and doesn't concern only the sign_extension
optimization.
In the web optimization there is an implementation of a
union-find data structure, but it wasn't general enough.
In many cases, when a union-find data structure is being used
there is a need to attach more information to each node and
to update this information when two nodes are being connected.

Leehod.



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