[llvm-commits] [llvm-gcc-4.2] r97989 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
baldrick at free.fr
Mon Mar 8 23:06:28 PST 2010
> // If this function returns via a shadow argument, the dest loc is passed
> - // in as a pointer. Mark that pointer as struct-ret and noalias.
> + // in as a pointer. Mark that pointer as struct-ret.
> + //
> + // It's tempting to want NoAlias here too, however even though llvm-gcc
> + // itself currently always passes a dedicated alloca as the actual argument,
> + // this isn't mandated by the ABI. There are other compilers which don't
> + // always pass a dedicated alloca. Using NoAlias here would make code which
> + // isn't interoperable with that of other compilers.
> if (ABIConverter.isShadowReturn())
> - Attribute::StructRet | Attribute::NoAlias));
> + Attribute::StructRet));
what does the ABI say exactly? Is it really valid to pass something which may
get "accidentally" altered when the callee (for example) writes to a global or
to some other argument?
More information about the llvm-commits