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: [RFC] New SSA variable mapping infrastructure


SSA names have one associated variable, their SSA_NAME_VAR.  The
ability is added to on demand adding further variables to an SSA name
via a bitmap that is stored in a hashtable mapping SSA name version
to a bitmap of variable UIDs that at some point in the program give
a name to the SSA names value.

Throughout optimization the variable mapping of a SSA name changes
in the following occasions:
 - The SSA name is deleted.  In this case the variable mapping is
   deleted as well.
 - The SSA name is copied to another SSA name.  This relates both
   SSA names and their variable mapping becomes the union of both
   variable mappings.

Looks like a perfect job for union-find (aka partition.c in libiberty), though it would waste memory (4 bytes) for every deleted SSA name.


Paolo


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