This is the mail archive of the gcc@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]

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} ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]