This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Re: Re: LOOP_HEADER tree code?
- From: Andrew Pinski <pinskia at earth dot geop dot uc dot edu>
- To: devang dot patel at gmail dot com (Devang Patel)
- Cc: rakdver at atrey dot karlin dot mff dot cuni dot cz (Zdenek Dvorak), stevenb dot gcc at gmail dot com (Steven Bosscher), gcc at gcc dot gnu dot org
- Date: Wed, 25 Oct 2006 17:46:45 -0400 (EDT)
- Subject: Re: Re: Re: LOOP_HEADER tree code?
>
> > and seeing the reaction of people,
> > I probably won't use it. The main reason for considering to use
> > the tree node for me was the possibility to make the number of iterations
> > of the loop as its operand, so that I would not need to worry about
> > keeping it alive through dce, copy/constant propagation, etc. (without
> > a statement carrying it in IL, I do not see a solution that would not
> > be just asking for introducing bugs and getting broken accidentally).
>
> One way to achieve this is to mark n_1 (in your example) as
> "do not dead strip because I know it is used" , kind of attribute((used)).
This is what as I understand LOOP_HEADER is used for. You just make the statement
as useful when doing DCE so you don't loose it. Then nothing goes funny and only
very few things have to be updated, DCE is one and that is it.
-- Pinski