This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to fix anti-optimization?
- To: dalej at apple dot com
- Subject: Re: how to fix anti-optimization?
- From: Richard Henderson <rth at redhat dot com>
- Date: Wed, 12 Sep 2001 15:14:45 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200109121834.LAA21595@scv1.apple.com>
On Wed, Sep 12, 2001 at 11:35:00AM -0700, dalej@apple.com wrote:
> The substitution is done in the ARRAY_REF case of expr.c:expand_expr().
> It looks like I could hack this by setting TREE_SIDE_EFFECTS on FP
> constants, but surely that's not the right way to do it. Any better ideas?
If the constant is not LEGITIMATE_CONSTANT_P, make the ARRAY_REF
expand as normal, then tag the resulting memory reference with a
REG_EQUAL note containing the known constant.
r~