This is the mail archive of the 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: [PATCH] Remove basic_block->loop_depth

Richard Guenther wrote:

> Accessing loop_depth (bb->loop_father) isn't very expensive.  The
> following removes the duplicate info in basic-blocks which is not
> properly kept up-to-date at the moment.

Looks like this broke SPU build, since spu_machine_dependent_reorg
accesses ->loop_depth.  According to comments in the code, this
was done because of concerns that loop_father may no longer be set up
this late in compilation, so I'm wondering whether just replacing
this by loop_depth (bb->loop_father) would work here ...

          /* If this branch is a loop exit then propagate to previous
             fallthru block. This catches the cases when it is a simple
             loop or when there is an initial branch into the loop. */
          if (prev && (loop_exit || simple_loop)
              && prev->loop_depth <= bb->loop_depth)
            prop = prev;

          /* If there is only one adjacent predecessor.  Don't propagate
             outside this loop.  This loop_depth test isn't perfect, but
             I'm not sure the loop_father member is valid at this point.  */
          else if (prev && single_pred_p (bb)
                   && prev->loop_depth == bb->loop_depth)
            prop = prev;

Any suggestions?


  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE

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