On 10/18/19 12:10 AM, Mihailo Stojanovic wrote:
> Mips built-in functions are currently not marked as pure, which
> invalidates pointers across built-in function calls. If a pointer is
> alive across built-in call, dereferencing it before and after the call
> will generate two load instructions instead of one.
> 
> This marks the built-ins as pure, which removes the unnecessary load.
> 
> Tested on mips-mti-linux-gnu.
> 
> gcc/ChangeLog:
> 
>         * config/mips/mips.c (DIRECT_BUILTIN_PURE): New macro. Add a
>         pure qualifier to the built-in.
>         (MSA_BUILTIN_PURE): New macro. Add a pure qualifier to the MSA
>         built-ins.
>         (struct mips_builtin_description): Add is_pure flag.
>         (mips_init_builtins): Mark built-in as pure if the flag in the
>         corresponding mips_builtin_description struct is set.
> 
> gcc/testsuite/ChangeLog:
> 
>         * gcc.target/mips/mips-builtins-pure.c: New test.

Thanks.  Installed on the trunk.

ISTM we ought to get you set up with write access.  Interested?

jeff

Reply via email to