This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Linearize trivial COND_EXPR+PHI node sequences
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: law at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 Feb 2004 00:24:44 +0100
- Subject: Re: [tree-ssa] Linearize trivial COND_EXPR+PHI node sequences
- References: <200402102318.i1ANIPDC009958@speedy.slc.redhat.com>
>
>
> This patch linearizes sequences like:
>
>
> bb0:
> if (cond) goto bb2; else goto bb1;
> bb1:
> bb2:
> x = PHI (0 (bb1), 1 (bb0)
>
>
>
>
> Into:
>
> bb0:
> x = cond;
While optimizing this early is definitly good idea, I am very surprised
ifcvt don't take it.
Perhaps it require basic blocks to be ordered in some nice way or so?
And yes, static predictor is poor on predicting non-loop data dependent
branches like this one :))
Thanks,
Honza