This is the mail archive of the
mailing list for the GCC project.
Re: pass manager question
- From: Martin Jambor <mjambor at suse dot cz>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 3 Oct 2017 13:36:11 +0200
- Subject: Re: pass manager question
- Authentication-results: sourceware.org; auth=none
- References: <59D29309.firstname.lastname@example.org>
On Mon, Oct 02, 2017 at 01:27:05PM -0600, Sandra Loosemore wrote:
> Is there an idiom for target-specific back end code to ask the pass manager
> if a particular pass (e.g., "split1") has already run?
(I might be wrong but) I don't think there is. But it might be a
useful thing to have generally, it would allow us for example to merge
early SRA and "late" SRA which differ in behavior only because the
first one must not touch aggregates that pass_stdarg will operate on.
And I guess the infrastructure to do that could be as simple as adding
a flag (or a counter) to class opt_pass that the pass manager would
set (or increment) when running the pass.
> I have some nios2 addressing mode improvement patches in the works that
> depend on deferring splitting of some complex address forms until after cse
> and fwprop, instead of during expand. Once "split1" has run,
> TARGET_LEGITIMATE_ADDRESS_P shouldn't consider those address forms valid any
> more. For now I've solved this problem by adding a target-specific pass
> immediately after "split1" that does nothing but set a flag, but that seems
> kind of hacky. If I can get at the information from the pass manager's
> public interface, that seems like a better solution, but I've gotten rather
> lost in that code. :-(
> I suppose another alternative is adding a split1_completed variable akin to
> reload_completed, but I'm hesitant to touch target-independent code for
> things that aren't generally useful.
> Any suggestions/recommendations?