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: [CFG] Loop unswitching


On Sun, Feb 24, 2002 at 11:45:35PM +0100, Zdenek Dvorak wrote:
> Consider the following code:
> 
> while (...)
>  {
>   if (flag)
>    {
>     ...
>     if (!flag)  /* XXX */
>      goto bla:
>    
>    }
>  }
> return;
> bla:
> absolutely_anything ();
> 
> bla is unreachable after unswitching on the two conditions.  I'm not sure
> whether code like this can pass through previous optimalizations without
> getting rid of /* XXX */;

Whether or not existing optimizations can get rid of this, it 
is clear this *should* be handled by previous optimizations.

Therefore you should not try to handle this here yourself.  It
would simply clutter up the unswitching code and make it harder
to understand.


r~


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