Re: Frontend pass assumptions

2010-09-10 Thread Paulo J. Matos
Richard Guenther writes: > On Fri, Sep 10, 2010 at 4:06 PM, Paulo J. Matos wrote: >> >> Or I could move the pass to be executed before the CFG is created. Would >> there be any issues with this? > > Yes. Profile information is not available at that point. > Thanks. Makes sense if I intend to u

Re: Frontend pass assumptions

2010-09-10 Thread Richard Guenther
On Fri, Sep 10, 2010 at 4:06 PM, Paulo J. Matos wrote: > Richard Guenther writes: > >> >> Which is wrong.  You need to use block_stmt_iterator and >> bsi_remove and ... (I don't remember, 4.3 is so old). >> > > Or I could move the pass to be executed before the CFG is created. Would > there be an

Re: Frontend pass assumptions

2010-09-10 Thread Paulo J. Matos
Richard Guenther writes: > > Which is wrong. You need to use block_stmt_iterator and > bsi_remove and ... (I don't remember, 4.3 is so old). > Or I could move the pass to be executed before the CFG is created. Would there be any issues with this? Regarding passes execution order. It seems on o

Re: Frontend pass assumptions

2010-09-10 Thread Paulo J. Matos
Richard Guenther writes: > On Fri, Sep 10, 2010 at 3:15 PM, Paulo J. Matos wrote: > > Which is wrong. You need to use block_stmt_iterator and > bsi_remove and ... (I don't remember, 4.3 is so old). > Thanks for the pointers. I will use those instead. > > You need to properly update the CFG >

Re: Frontend pass assumptions

2010-09-10 Thread Richard Guenther
On Fri, Sep 10, 2010 at 3:15 PM, Paulo J. Matos wrote: > Hello, > > I am working on the new pass (previously discussed), to optimise switch > cases. > > I am almost finishing it, however, for practical reasons I am > implementing it first over GCC4.3 and once tested, will port it to svn > trunk an