[llvm-commits] [llvm] r47247 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

Duncan Sands baldrick at free.fr
Sun Feb 17 19:51:57 PST 2008


Hi Owen,

> -         (isa<Argument>(Object) && cast<Argument>(Object)->hasByValAttr()))) {
> -      // Okay, the pointer is to a stack allocated object.  If we can prove that
> +         (isa<Argument>(Object) &&
> +                                 (cast<Argument>(Object)->hasByValAttr() ||
> +                                  cast<Argument>(Object)->hasNoAliasAttr())))) {
> +      // Okay, the pointer is to a stack allocated (or effectively so, for 
> +      // for noalias parameters) object.  If we can prove that

there are now a bunch of places in BasicAliasAnalysis which do the same thing
for byval and noalias.  That's because byval implies noalias.  How about renaming
hasNoAliasAttr to isNoAlias and have it check both the noalias and byval attributes?

Ciao,

Duncan.



More information about the llvm-commits mailing list