summaryrefslogtreecommitdiff
path: root/gcc/lra-int.h
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-21 21:20:48 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-21 21:20:48 +0000
commit47f6add2ea4f4bc1b9e7bcc817dad9b903568f18 (patch)
tree710b9ff07f324f4591594dc3249e961c1dbf9d4c /gcc/lra-int.h
parent4cadf1070f286debc2c1614d26fa9b581040641c (diff)
downloadgcc-47f6add2ea4f4bc1b9e7bcc817dad9b903568f18.tar.gz
2012-12-21 Vladimir Makarov <vmakarov@redhat.com>
PR middle-end/55775 * lra-assigns.c (improve_inheritance): Do nothing after LRA_MAX_INHERITANCE_PASSES pass. * lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Rename to LRA_MAX_CONSTRAINT_ITERATION_NUMBER. Move to lra-int.h. (MAX_INHERITANCE_PASSES): Rename to LRA_MAX_INHERITANCE_PASSES. Move to lra-int.h. * lra-int.h (LRA_MAX_CONSTRAINT_ITERATION_NUMBER): Move from lra-constraints.c. (LRA_MAX_INHERITANCE_PASSES): Ditto. 2012-12-21 Vladimir Makarov <vmakarov@redhat.com> PR middle-end/55775 * gcc.target/i386/pr55775.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194680 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-int.h')
-rw-r--r--gcc/lra-int.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/lra-int.h b/gcc/lra-int.h
index 8e89518bae0..064722936ba 100644
--- a/gcc/lra-int.h
+++ b/gcc/lra-int.h
@@ -249,6 +249,25 @@ typedef struct lra_insn_recog_data *lra_insn_recog_data_t;
#define LRA_LOSER_COST_FACTOR 6
#define LRA_MAX_REJECT 600
+/* Maximum allowed number of constraint pass iterations after the last
+ spill pass. It is for preventing LRA cycling in a bug case. */
+#define LRA_MAX_CONSTRAINT_ITERATION_NUMBER 30
+
+/* The maximal number of inheritance/split passes in LRA. It should
+ be more 1 in order to perform caller saves transformations and much
+ less MAX_CONSTRAINT_ITERATION_NUMBER to prevent LRA to do as many
+ as permitted constraint passes in some complicated cases. The
+ first inheritance/split pass has a biggest impact on generated code
+ quality. Each subsequent affects generated code in less degree.
+ For example, the 3rd pass does not change generated SPEC2000 code
+ at all on x86-64. */
+#define LRA_MAX_INHERITANCE_PASSES 2
+
+#if LRA_MAX_INHERITANCE_PASSES <= 0 \
+ || LRA_MAX_INHERITANCE_PASSES >= LRA_MAX_CONSTRAINT_ITERATION_NUMBER - 8
+#error wrong LRA_MAX_INHERITANCE_PASSES value
+#endif
+
/* lra.c: */
extern FILE *lra_dump_file;