This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Perform anonymous constant propagation during inlining
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 04 May 2015 11:30:50 +0200
- Subject: Re: [patch] Perform anonymous constant propagation during inlining
- Authentication-results: sourceware.org; auth=none
- References: <6476732 dot lMFodJZTVz at polaris> <1538996 dot TcTA0zy8bB at polaris> <CAFiYyc1da1R6xdYkfNvFE4heJn9jRMfmT9FrqPZAuQi9n1XpiQ at mail dot gmail dot com>
> Hum, the fact that your earlier version created wrong code
> (get_gimple_for_ssa_name
> already returned false here) points at some issues with
> EXPAND_INITIALIZER as well, no...?
Theoritically yes but, in practice, EXPAND_INITIALIZER is used in varasm.c and
for debugging stuff only, so I don't think that's a real concern.
> That said, the path you add is certainly safe (though maybe we want to
> change get_gimple_for_ssa_name to return tcc_constant single-use defs even
> if TER is disabled
> (thus at -O0 - and only at -O0, otherwise it shouldn't happen). That
> would cover
> more cases of get_gimple_for_ssa_name uses (I can see
> optimize_bitfield_expansion
> for example...)
optimize_bitfield_assignment_op is only interested in loads from bitfields
though. The get_gimple_for_ssa_name route would be interesting to bypass the
stmt_is_replaceable_p test, i.e. to bypass the single-use test, but this could
be counter-productive at -O0 so I'm not sure it's worth the trouble.
--
Eric Botcazou