This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] PATCH to gimplify_boolean_expr
- From: Jason Merrill <jason at redhat dot com>
- To: law at redhat dot com
- Cc: Andrew MacLeod <amacleod at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 26 Aug 2003 12:31:05 -0400
- Subject: Re: [tree-ssa] PATCH to gimplify_boolean_expr
- References: <200308260807.h7Q87HAN001158@speedy.slc.redhat.com>
On Tue, 26 Aug 2003 02:07:17 -0600, law@redhat.com wrote:
> Well, you shouldn't need to move the comparison into the IF to make
> this test pass. "b" really should be initialized to true.
Well, certainly. My point was just that there are currently some
optimizations that are done at the RTL level and not at the tree level, and
they are missed if I make this transformation. The fix is to do these
optimizations at the tree level.
> For tree-ssa I would think we need to make sure the following happen:
>
> 1. We constant propagate fc's value into the use of fc as an
> argument to builtin_cabsf.
>
> 2. We know how to simplify builtin_cabsf of a constant value.
>
> 3. We know how to fold conditionals involving complex constants
>
> If those tree items are accomplished this test should work
> regardless of whether or not the comparison is inside the IF or not.
Agreed, but it was a mistake to use a constant in my example. The test
should work even with an unknown complex number.
Jason