On Mon, Oct 8, 2012 at 11:04 AM, Jan Hubicka <hubi...@ucw.cz> wrote: >> On Mon, Oct 8, 2012 at 4:50 AM, Dehao Chen <de...@google.com> wrote: >> > Attached is the updated patch. Yes, if we add a VRP pass before >> > profile pass, this patch would be unnecessary. Should we add a VRP >> > pass? >> >> No, we don't want VRP in early optimizations. > > I am not quite sure about that. VRP > 1) makes branch prediction work better by doing jump threading early
Well ... but jump threading may need basic-block duplication which may increase code size. Also VRP and FRE have pass ordering issues. > 2) is, after FRE, most effective tree pass on removing code by my profile > statistics. We also don't have DSE in early opts. I don't want to end up with the situation that we do everything in early opts ... we should do _less_ there (but eventually iterate properly when processing cycles). Richard. > But that would require more analysis. > The patch is OK. > Honza