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: [patch] Removal of finite empty loops


Hello,

> On Sat, Jul 17, 2004 at 12:11:46AM +0200, Zdenek Dvorak wrote:
> > The marking is done in the loop optimizer, by emitting a
> > special builtin call (BUILT_IN_MAYBE_INFINITE_LOOP) to them.
> 
> I'm not that thrilled about a builtin.  Without changes elsewhere,
> this will change the behaviour of virtual operands -- we'll expect
> all call-clobbered variables to be modified here.

this is why I added the change to tree-ssa-operands.c (to avoid adding
virtual operands for it), which makes sense anyway; there are also other
builtins that have side effects (i.e. are not pure), but do not read nor
clobber memory.

> Can't we just put a bit in the edge flags and be done?

hardly.  The loop pass is quite far from cd_dce and keeping such flag
through cfg cleanups would be a hell.

The builtin solution seemed the cleanest alternative to me (it requires
no changes to any pass in order to keep the information up-to-date,
since everyone already knows to preserve function calls).

Zdenek


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