+/* Operation to be performed for the parameter in ipa_parm_adjustment
+   below.  */
+enum ipa_parm_op {
+  IPA_PARM_OP_NONE,
+
+  /* This describes a brand new parameter.
+
+     For new parameters, base_index must be >= the number of
+     DECL_ARGUMENTS in the function.  That is, new arguments will be
+     the last arguments in the adjusted function.

...where this requirement comes from.  I would think that base_index
would be completely ignored for the new parameters, is it not?

Well, whadayaknow... base_index is indeed ignored, and a cursory look at ipa_modify_formal_parameters() suggests that you may be able to insert arguments out of order (untested). Jakub, you may be in luck :).

Committing the attached fix to the branch.

Thanks again.
commit cc9c895aebe4ba1c017720fe5a43599b53696236
Author: Aldy Hernandez <al...@redhat.com>
Date:   Tue Nov 12 09:42:30 2013 -0700

        * ipa-prop.h (enum ipa_parm_op): Adjust comment to IPA_PARM_OP_NEW
        entry.

diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h
index 0621a13..a2d8797 100644
--- a/gcc/ipa-prop.h
+++ b/gcc/ipa-prop.h
@@ -616,11 +616,7 @@ enum ipa_parm_op {
 
   /* This describes a brand new parameter.
 
-     For new parameters, base_index must be >= the number of
-     DECL_ARGUMENTS in the function.  That is, new arguments will be
-     the last arguments in the adjusted function.
-
-     Also, `type' should be set to the new type, `arg_prefix'
+     The field `type' should be set to the new type, `arg_prefix'
      should be set to the string prefix for the new DECL_NAME, and
      `new_decl' will ultimately hold the newly created argument.  */
   IPA_PARM_OP_NEW,

Reply via email to