> On Feb 5, 2015, at 3:52 AM, Gabriel Kerneis <gabr...@kerneis.info> wrote:
> 
> On Wed, Feb 04, 2015 at 11:04:38AM -0700, Benjamin Ylvisaker wrote:
>> I was recently looking at copyFunction because I need something similar.
>> I was surprised to not find any changes to slocals. Is that a bug or am
>> I misunderstanding the role of slocals. 
> 
> I'm not sure I understand what you mean (but we have had bugs with
> copyFunction in the past, so it may well be another CIL issue). Could
> you give an example of the observed behaviour (on a small piece of C
> code), and what you would expect instead?

Sorry for being too concise.  I don’t have a misbehaving test.  Here is what’s 
causing my confusion in a little more detail:

- The slocals field of fundec is a list of varinfos.  I assume this represents 
the set of local variables used in the function.
- varinfos include the unique id field.
- The copyFunctionVisitor class makes new varinfos with new ids (for the old 
function? See bug 143).
- I don’t see where slocals is changed anywhere.

So won’t both copies’ slocals refer to the same set of varinfos?  Is that not 
actually a problem for some reason?

Thanks,
Ben


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
CIL-users mailing list
CIL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cil-users

Reply via email to