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: Add machine_dependent_reorg2

Richard Henderson <> writes:
> On Sun, Jun 22, 2003 at 03:56:04PM +0100, Richard Sandiford wrote:
> > This patch adds a version of machine_dependent_reorg that runs after
> > delayed-branch scheduling.  It's used by a patch I'm about to post.
> I'm not sure what I think about this.  I've had other occasion
> to want a md-reorg pass that runs before sched2.  And three such
> passes seems excessive, and a clear sign of mis-design.
> The alternative is to hijack dbr, much like ia64 hijacks sched2.

I guess that'd work too.  On the other hand, it'd be nice not
to have to write stuff like:

    mips_flag_delayed_branch = flag_delayed_branch;
    flag_delayed_branch = 0;

How about having a hook that gets run before and after each
main optimisation pass?  Something like:

    void (*before_pass) (enum dump_file_index);
    void (*after_pass) (enum dump_file_index);

The hooks could be called from open_dump_file and close_dump_file.
Then any port that needs to do something before sched2 or dbr
could do it in before_pass().  machine_dependent_reorg could be
moved just before shorten_branches (where reorg2 was going to go).

OK, so it's still three target hooks, but it seems bit less
arbitrary than having mdrs at three particular points.


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