This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066)
- From: dnovillo at google dot com
- To: lcwu at google dot com, jyasskin at google dot com
- Cc: aaw at google dot com, delesley at google dot com, gcc-patches at gcc dot gnu dot org, reply at codereview dot appspotmail dot com
- Date: Sat, 11 Jun 2011 17:52:51 +0000
- Subject: Re: [google] Enhance Annotalysis to support cloned functions/methods (issue4591066)
- Reply-to: lcwu at google dot com, dnovillo at google dot com, jyasskin at google dot com, aaw at google dot com, delesley at google dot com, gcc-patches at gcc dot gnu dot org, reply at codereview dot appspotmail dot com
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/