This is the mail archive of the gcc@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: [tree-ssa]: Easy way to get default def of a variable?



On Wednesday, June 4, 2003, at 06:22 PM, Andrew MacLeod wrote:


On Wed, 2003-06-04 at 16:48, Daniel Berlin wrote:
Sometimes, when doing injury insertions, we need to know the default
definition of a variable.

Whats an injury insertion?

Injury repairs for strength reduction injuries.


Given:

a = b + 6;
b = b + 9;
a = b + 6;

Normally, the definition of b would *kill* the expression "b + 6", so that we couldn't remove the second one.
With strength reduction extensions to PRE, the update to b only *injures* the definition of b, and we repair it later.
IE we transform it into
pretmp = b + 6
a = pretmp
pretmp = pretmp + 9
a = pretmp.


I didn't actually mean injury insertion, i meant code insertion, i was just working on the strength reduction code at the time, so it slipped in there.

IE the first version of the variable.


The first version of all variables, or just the the versions which are a
use of a variable which doesn't have a definition?

So far, the second. No telling i won't run into the first case, however.

Meaning that it is
live on entry to the function?

In this case i'm looking at, it's actually one of the function parameters, so yes.

If we renamed them in the FUNCTION_DECL's DECL_ARGUMENS temporarily, and dropped the SSA name tree on out-of-ssa, i could just look there.

Andrew



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