This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to assign proper static_pass_number and recalculate other ones?
- From: Konstantin Vladimirov <konstantin dot vladimirov at gmail dot com>
- To: GCC Development <gcc at gcc dot gnu dot org>
- Date: Thu, 1 Oct 2015 11:47:03 +0300
- Subject: How to assign proper static_pass_number and recalculate other ones?
- Authentication-results: sourceware.org; auth=none
Hi,
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?
---
With best regards, Konstantin