diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2008-09-20 09:15:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2008-09-20 09:15:43 +0000 |
commit | 76e68dca26be88ab2e96aac6c1af79b946d0f4ee (patch) | |
tree | a9c18e21b19d7e54614cb457343b3cedb422d6bd /gcc/ira.c | |
parent | d84b344a6c22cb816af1f204ff782b9f2e5166b5 (diff) | |
download | gcc-76e68dca26be88ab2e96aac6c1af79b946d0f4ee.zip gcc-76e68dca26be88ab2e96aac6c1af79b946d0f4ee.tar.gz gcc-76e68dca26be88ab2e96aac6c1af79b946d0f4ee.tar.bz2 |
tm.texi (TARGET_IRA_COVER_CLASSES): Define.
gcc/
* doc/tm.texi (TARGET_IRA_COVER_CLASSES): Define.
(IRA_COVER_CLASSES): Refer to TARGET_IRA_COVER_CLASSES.
* target.h (gcc_target): Add ira_cover_classes.
* ira.c: Remove IRA_COVER_CLASSES guards.
(setup_cover_and_important_classes): Use targetm.ira_cover_classes
instead of IRA_COVER_CLASSES.
(setup_cover_and_important_classes): Remove IRA_COVER_CLASSES guard.
(setup_class_translate): Likewise.
(setup_reg_class_intersect_union): Likewise.
(find_reg_class_closure): Replace IRA_COVER_CLASSES guard with a
test of targetm.ira_cover_classes.
* opts.c (decode_options): Use targetm.ira_cover_classes instead
of IRA_COVER_CLASSES.
* target-def.h (TARGET_IRA_COVER_CLASSES): Define.
(TARGET_INITIALIZER): Include it.
* targhooks.h (default_ira_cover_classes): Declare.
* targhooks.c (default_ira_cover_classes): New function.
From-SVN: r140512
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 24 |
1 files changed, 8 insertions, 16 deletions
@@ -714,8 +714,6 @@ enum reg_class ira_important_classes[N_REG_CLASSES]; classes. */ int ira_important_class_nums[N_REG_CLASSES]; -#ifdef IRA_COVER_CLASSES - /* Check IRA_COVER_CLASSES and sets the four global variables defined above. */ static void @@ -723,9 +721,10 @@ setup_cover_and_important_classes (void) { int i, j; enum reg_class cl; - static enum reg_class classes[] = IRA_COVER_CLASSES; + const enum reg_class *classes; HARD_REG_SET temp_hard_regset2; + classes = targetm.ira_cover_classes (); ira_reg_class_cover_size = 0; for (i = 0; (cl = classes[i]) != LIM_REG_CLASSES; i++) { @@ -761,15 +760,12 @@ setup_cover_and_important_classes (void) } } } -#endif /* Map of all register classes to corresponding cover class containing the given class. If given class is not a subset of a cover class, we translate it into the cheapest cover class. */ enum reg_class ira_class_translate[N_REG_CLASSES]; -#ifdef IRA_COVER_CLASSES - /* Set up array IRA_CLASS_TRANSLATE. */ static void setup_class_translate (void) @@ -837,7 +833,6 @@ setup_class_translate (void) ira_class_translate[cl] = best_class; } } -#endif /* The biggest important reg_class inside of intersection of the two reg_classes (that is calculated taking only hard registers @@ -856,8 +851,6 @@ enum reg_class ira_reg_class_intersect[N_REG_CLASSES][N_REG_CLASSES]; reg_class_subunion value. */ enum reg_class ira_reg_class_union[N_REG_CLASSES][N_REG_CLASSES]; -#ifdef IRA_COVER_CLASSES - /* Set up IRA_REG_CLASS_INTERSECT and IRA_REG_CLASS_UNION. */ static void setup_reg_class_intersect_union (void) @@ -943,8 +936,6 @@ setup_reg_class_intersect_union (void) } } -#endif - /* Output all cover classes and the translation map into file F. */ static void print_class_cover (FILE *f) @@ -975,11 +966,12 @@ static void find_reg_class_closure (void) { setup_reg_subclasses (); -#ifdef IRA_COVER_CLASSES - setup_cover_and_important_classes (); - setup_class_translate (); - setup_reg_class_intersect_union (); -#endif + if (targetm.ira_cover_classes) + { + setup_cover_and_important_classes (); + setup_class_translate (); + setup_reg_class_intersect_union (); + } } |