http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44194
--- Comment #14 from rguenther at suse dot de <rguenther at suse dot de> 2011-04-15 19:31:36 UTC --- On Fri, 15 Apr 2011, eraman at google dot com wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44194 > > Easwaran Raman <eraman at google dot com> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |eraman at google dot com > > --- Comment #13 from Easwaran Raman <eraman at google dot com> 2011-04-15 > 19:18:25 UTC --- > Richard, did you mean to write > > static bool > can_escape (tree expr) > { > tree base; > if (!expr) > return true; > base = get_base_address (expr); > if (DECL_P (base) > && (!may_be_aliased (base) > && !pt_solution_includes (&cfun->gimple_df->escaped, base))) > return false; > return true; > } > > Only case when we know it doesn't escape is if bas is a DECL_P and is not in > cfun->gimple_df->escaped and not aliased, right? Actually, I'm wondering if it > is sufficient to test just > DECL_P (base) && !pt_solution_includes (&cfun->gimple_df->escaped, base). No, because if the escaped solution for example includes ANYTHING then the test will return true. That !may-aliased variables are not contained in ANYTHING isn't known w/o context. Richard.