This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q's about use of is_gimple_reg_rhs/is_gimple_tmp_var
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 17 Aug 04 06:47:23 EDT
- Subject: Re: Q's about use of is_gimple_reg_rhs/is_gimple_tmp_var
Right. That would be a possible optimization. Forcing the LHS to be
a temporary ensures the condition that were is no other assignment to
the variable. If you have a clean way to test that this is the only
assignment to the RHS, then sure, you can avoid the temporary copy.
I'm not sure how useful that is since the copy propagator ought to do
the right thing in the case you're considering.
I'm not thinking of it as a "possible optimization", but instead trying to
pin down the exact condition that gimplifications needs to apply to the
RHS. As I said, I think that's "assigned only once".