On Fri, 17 Feb 2017, Marc Glisse wrote: > On Fri, 17 Feb 2017, Richard Biener wrote: > > > On Thu, 16 Feb 2017, Richard Biener wrote: > > > > > > > > I am testing the following patch for PR79547. Those builtins do not > > > return anything that can be used to re-construct the pointer(s) passed > > > to them. > > > > > > Queued for GCC 8. > > > > Actually we need calluse constraints. Thus adjusted as follows. > > > > Richard. > > > > 2017-02-17 Richard Biener <rguent...@suse.de> > > > > PR tree-optimization/79547 > > * tree-ssa-structalias.c (find_func_aliases_for_builtin_call): > > Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp, > > bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p > > without any constraints. > > We have EAF_NOESCAPE that we are using for non-builtins, though it probably > gets little use there. Would it make sense to use it here as well, or would > that be pointless?
EAF_NOESCAPE doesn't capture what we want here -- for pure and const functions arguments already don't escape in EAF_NOESCAPEs sense it's just that EAF_NOESCAPE doesn't cover "escaping" through the return value. We do not have sth like ERF_RETURNS_NO_ARG. Generally all explicitely handled builtins do not need any further fn-spec attributes added in builtins.def. Richard.