How to decide whether a register is related to a real local variable

11 views
Skip to first unread message

Zell

unread,
Jan 10, 2012, 12:35:32 PM1/10/12
to chord-discuss
Given a register, say, from the domain of V.map, is there a simple way
to
decide whether it is related to a real local variable or not?

In my case, I am trying to add some kind of "strong update" on top of
cipa-0cfa-dlog. For this purpose, I will need to be able to
distinguish those "h" which are singletons. It's clear that if there
exists two variables x,y pointing to the "h", it is considered not as
a singleton.

But, with the analyse results of jchord, say, VH, it has many
temporary variables pointing to such underlined "h". This makes none
of those "h" can be recognized as singletons, which disables further
optimizations such as strong update.

With this motivation, I really would like to remove those relations in
VH whose "V" part does not correspond to the real local variables.
What's your ideas?

I thought RegisterFactory.Register.isTemp() can be used for this
purpose, because it did distinguish registers prefixed by " R" and
register prefixed by "T". However, I found out, unfortunately, all
those registers prefixed by "R" does not correspond to real local
variables!

So would you like to tell me how to decide whether a register is a
local variable?


Ariel Rabkin

unread,
Jan 10, 2012, 12:54:01 PM1/10/12
to chord-...@googlegroups.com
The first k of the R-variables are the method's arguments. Are there
other R-variables that aren't local variables?

However, I suspect "local variable" is the wrong criterion to use
here. You presumably care about whether the past value is still used,
or whether it's gone out of scope, even for temporaries or anonymous
variables. Can you check for that directly?

--Ari

> --
> You received this message because you are subscribed to the Google Groups "chord-discuss" group.
> To post to this group, send email to chord-...@googlegroups.com.
> To unsubscribe from this group, send email to chord-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/chord-discuss?hl=en.
>

--
Ari Rabkin asra...@gmail.com
UC Berkeley Computer Science Department

Reply all
Reply to author
Forward
0 new messages