This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] New SSA variable mapping infrastructure
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Oct 2007 14:37:18 +0200
- Subject: Re: [RFC] New SSA variable mapping infrastructure
- References: <email@example.com>
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
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.