On July 9, 2014 12:49:15 PM CEST, Bingfeng Mei <b...@broadcom.com> wrote: >Hi, >I noticed recent GCC adds ivdep pragma support. We have our own >implementation for ivdep for a couple of years now. As GCC >implementation is much cleaner and we want to migrate to it. Ivdep is >consumed in two places in our implementation, one is >tree-vect-data-refs.c used by vectorizer, the other is in ddg.c, used >by modulo scheduler. In GCC implementation, the former is the same, but >ddg.c doesn't consume ivdep information at all. I think it is important >not to draw redundant cross-iteration dependence if ivdep is specified >in order to improve modulo scheduling performance. > >Looking at the code, I wonder whether loop->safelen still keep the >correct information or whether loop structure still remain correct >after so many tree/rtl passes. For example, in sms-schedule of >modulo-sched.c > > loop_optimizer_init (LOOPS_HAVE_PREHEADERS > | LOOPS_HAVE_RECORDED_EXITS); > >Does this mean loop structure is reinitialized? I know there is a flag >(PROP_loops) which is supposed to preserve loop structure. But not sure >what happens after all loop transformation (unrolling, peeling, etc). >Is there a stage loop structure is rebuilt and we lost safelen (ivdep) >information, or it is still safe to use in modulo scheduling pass?
Currently loop information is discarded after RTL loop optimizers because there is no later consumer. You'd have to extend lifetime if you add later users. Richard. >Thanks, >Bingfeng