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: [tree-ssa] Linearize trivial COND_EXPR+PHI node sequences


> 
> 
> 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


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