This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa] PATCH to gimplify_boolean_expr


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]