IPA / Cgraph how to get a real COPY of a function body
Martin Schindewolf
schindew@ira.uka.de
Tue Sep 16 21:44:00 GMT 2008
Dear all,
my current efforts to get some basic support for transactional memory in
GCC advance slowly but there is one thing I would like to ask because it
stopped me for days now. What is the best way to do the function cloning
in order to have the original function and a transactional clone at the
same time? I tried all sorts of cloning and copying the whole tree using
functions from Cgraph and Ipa passes but somehow I always end up with a
cloned declaration node and a function body that is not a copy of the
original but a pointer to it. At least that is my experience until now.
Following the general idea of having a copy of the original function
early in the passes and inserting the necessary instrumentations later
when the expansion of the GTM primitives is done, this behaviour leads
to problems. What would be the best way to get a real copy of a function
body?
Any help is greatly appreciated.
Regards,
Martin
More information about the Gcc
mailing list