This is the mail archive of the
mailing list for the GCC project.
Re: How to assign proper static_pass_number and recalculate other ones?
- From: Jeff Law <law at redhat dot com>
- To: Konstantin Vladimirov <konstantin dot vladimirov at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 1 Oct 2015 10:14:28 -0600
- Subject: Re: How to assign proper static_pass_number and recalculate other ones?
- Authentication-results: sourceware.org; auth=none
- References: <CADn89gTE1sO8kiAj74CdRrXuxJCRyoTWmV4NgJsZLAf2qKe+vQ at mail dot gmail dot com>
On 10/01/2015 02:47 AM, Konstantin Vladimirov wrote:
David probably knows best what's currently possible with dump numbers in
the pass manager. He's on PTO this week.
I am creating my own RTL pass inside private backend (GCC 5.2.0) and I
want to register it via register_pass call from override_options hook,
to not interfere with platform-independent GCC code.
register_pass (new my_cool_rtl_pass (g, "my_cool_pass"),
PASS_POS_INSERT_AFTER, "sched1", 1);
Everything just fine except the number of pass to print a dump file
name is assigned the very last one (about 280), whereas pass itself
should go immediately after sched1, so I want it to have static number
234 and dump file name as test.c.234.my_cool_pass. Now it runs after
sched1 correctly, but have large number and visually goes in dump-all
list at the end.
Can I inside pass manager update all pass numbers after pass insertion
to preserve visible dump order the same as run order?
ISTM that whatever we're currently doing that if a pass is inserted by a
plug-in that pass #s ought to auto-magically update themselves.