This is the mail archive of the gcc-patches@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: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066)



OK with some minor nits.



Diego.



http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c File gcc/tree-threadsafe-analyze.c (right):

http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c#newcode1159
gcc/tree-threadsafe-analyze.c:1159: gcc_assert (false);
+ else
+  gcc_assert (false);
+

Change to gcc_unreachable ();


http://codereview.appspot.com/4591066/diff/3001/gcc/tree-threadsafe-analyze.c#newcode2151
gcc/tree-threadsafe-analyze.c:2151: && gimple_call_num_args(call) > 0)
2147      starting from GCC-4.5.). The clones could be created as early
as when
 2148      constructing SSA. Also note that the parameters of a cloned
method could
 2149      be optimized away.  */
 2150   if (TREE_CODE (TREE_TYPE (DECL_ORIGIN (fdecl))) == METHOD_TYPE
 2151       && gimple_call_num_args(call) > 0)

Wouldn't it be easier to make fdecl == DECL_ORIGIN (fdecl) earlier in
the function?

It's OK either way, though.

http://codereview.appspot.com/4591066/


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