This is the mail archive of the gcc-patches@gcc.gnu.org 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] |
plugins refer to passes by their name, hence all compiler passes need a unique name:
* passes with NULL name should get a new unique name; * passes which had duplicate names should be disambiguated by changing at least one name to achieve uniqueness.
I have updated the patch to the current trunk. It needed an extra change in passes.c:make_pass_instance to avoid changing static_pass_number for the non-dumped passes, lest one would end up with a static_pass_number of -2.
Additionally, the pass manager should assert that every registered pass has a name. This can be done in next_pass_1.
OK with that change.
The pass name should also be prefixed by * to avoid creating dump files uselessly.
This exposed a problem with the patch: the renaming of passes changes the dump file names and options. The -fdump-postreload option was suddenly missing.
To rectify this, I have backed out the name changes where there was no actual pass name conflict, and where an actual name clash had to be resolved, I have used a prefix followed with ASCII STX, which a bit of new code in register_one_dump_file skips, so that the old dump file and option names continue to be used.
There might be a case to disambiguate some dump options, but I don't want to bundle such user interface changes and the test suite changes that would then be required with the plugin prerequisites.
Attachment:
unique-pass-names.patch-20091105-2
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |