This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Resend: reorder conditionals in i386.md
- To: Zack Weinberg <zackw at panix dot com>
- Subject: Re: Resend: reorder conditionals in i386.md
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Tue, 7 Aug 2001 20:50:03 +0100 (BST)
- cc: <gcc-patches at gcc dot gnu dot org>
On Tue, 7 Aug 2001, Zack Weinberg wrote:
> The interesting cases are more of the form
>
> if (expensive_test (operands[0]) && 0)
>
> where the compiler cannot eliminate the call to expensive_test because
> it might have side effects. We know better.
This sounds like a case for adding a __pure__ attribute to expensive_test,
as in <URL:http://gcc.gnu.org/ml/gcc-patches/1999-08n/msg00601.html>
(which reported 150kb compiler size reduction). (Though I don't know
whether the compiler could optimise this case once the attribute is
given.)
--
Joseph S. Myers
jsm28@cam.ac.uk