User directed Function Multiversioning via Function Overloading (issue 5752064)
davidxl@google.com
davidxl@google.com
Mon Jul 9 21:22:00 GMT 2012
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.c
File gcc/cgraph.c (right):
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.c#newcode1282
gcc/cgraph.c:1282: is needed as the address can be used to do an
indirect call. */
Extend the comment here.
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.h
File gcc/cgraph.h (right):
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.h#newcode230
gcc/cgraph.h:230: /* Chains all the semantically identical function
versions. The
It is better to extend the comments on these two members because
dispatcher and resolver seem to mean the same thing.
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraph.h#newcode236
gcc/cgraph.h:236: /* For functions with many calls sites it holds map
from call expression
It might be better to put the four fields into a separate data structure
with only one pointer from cgraph_node to it. When the lowering
completes, they can be destroyed to save memory consumption.
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraphbuild.c
File gcc/cgraphbuild.c (right):
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraphbuild.c#newcode321
gcc/cgraphbuild.c:321: if (decl && cgraph_get_node (decl)
There does not seem to a need to add this condition here -- newly
created node would have the dispatch_function bit set any way. Besides,
there are 3 calls to cgraph_get_node here. It is cleaner to sink this
code into the following if (decl) ..
if (decl)
{
struct cgraph_node *callee = cgraph_get_create_node (decl);
if (callee->dispatch_function)
{
build_resolver_for_function_versions (node);
gcc_assert (get_mv_resolver (node));
}
cgraph_create_edge (node, callee, stmt, bb->count, freq);
}
else
...
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraphunit.c
File gcc/cgraphunit.c (right):
http://codereview.appspot.com/5752064/diff/51001/gcc/cgraphunit.c#newcode942
gcc/cgraphunit.c:942: enqueue_node ((symtab_node)edge->callee);
This change is irrelevant.
http://codereview.appspot.com/5752064/
More information about the Gcc-patches
mailing list