This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Mixing simple & complex IPA passes...?
- From: Basile Starynkevitch <basile at starynkevitch dot net>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 29 Nov 2010 16:03:50 +0100
- Subject: Mixing simple & complex IPA passes...?
Hello
The function position_pass from gcc/passes.c is called when
registering a pass from a plugin.
It contains the following test
/* Check if the current pass is of the same type as the new pass and
matches the name and the instance number of the reference pass. */
if (pass->type == new_pass_info->pass->type
Why is this test so strong? Why don't we accept SIMPLE_IPA_PASS to be
mixed with IPA_PASS [that is, addimg a plugin-provided SIMPLE_IPA_PASS
after an existing IPA_PASS, etc...]
Why don't we test
if ((pass->type == new_pass_info->pass->type
|| ((pass->type == IPA_PASS
|| pass->type == SIMPLE_IPA_PASS)
&&
(new_pass_info->pass->type == IPA_PASS
|| new_pass_info->pass->type == SIMPLE_IPA_PASS))
instead?
Cheers!
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***