On Mon, Jul 7, 2014 at 4:09 PM, Jan Hubicka <hubi...@ucw.cz> wrote:
> Hi,
> AIX as' .set pseudoop has somewhat unexpected behaviour.  It seems to be
> implemented by syntactically replacin all appereances of the alias by
> its target (that can be an expressoin) but it is still possible to globalize
> the alias by .globl operation.
>
> This breaks the assumption we make about aliases; for example when alias is
> declared static but it is alias of global/weak symbol, we assume it is static
> symbol, but in AIX implementation it is handled as global.  This breaks
> horrible way for local aliases.
>
> Another unexpected behaviour is that .set output before definition of alias
> target is silently compiled into something else (NULL?). We are not fully
> consistent about outputing aliases after targets.
>
> This patch avoids use of .set for aliases. Instead
> rs6000_xcoff_declare_object_name and rs6000_xcoff_declare_function_name simply
> walk and outputs all associated aliases at the time they output function.
> I.e.
>
> var:
>   <var data>
> .set var, aliasvar
>
> Is now done as:
> var:
> aliasvar:
>   <var data>
>
> This avoids the surprises we was hitting on AIX and makes aliases to work
> consistently.  The way it is hooked into output machinery is not the most
> beautiful, but I do not see better way except for redesigning the output
> interface (adding new macro for this type of aliases) that seems to be 
> unnecesay
> unless we find more targets that would benefit from aliases output this way.
>
> The testcases localalias/globalalias was added to check sanity of alias
> implementation and this patch makes them to work.
>
> Bootstrapped/regtested rs6000-aix OK?

Hi, Honza

This looks really good and mostly is working.

With the patch, GCC on AIX now responds that "ifunc" is supported.
The C and C++ attr-ifunc testcases now run and fail.

g++.dg/ipa/devirt-10 and devirt-15 now fail.

Otherwise, the results look very good.

Thanks, David

Reply via email to