summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-10 09:43:14 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-12-10 09:43:14 +0000
commitcc7c7762d9ba86eb59eaea7d53a946bd13f2affe (patch)
tree377e3a187ff9554de9073cdea90feb2dc49c60ec /gcc/opts.c
parent005927ac5d0090e0405b3401fbeee84251f091ff (diff)
downloadgcc-cc7c7762d9ba86eb59eaea7d53a946bd13f2affe.tar.gz
2008-12-10 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r142640 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@142641 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c35
1 files changed, 24 insertions, 11 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index a87fb498b15..42e3beeb926 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -870,9 +870,11 @@ decode_options (unsigned int argc, const char **argv)
}
}
- /* Use IRA if it is implemented for the target. */
- if (targetm.ira_cover_classes)
- flag_ira = 1;
+ flag_ira = 1;
+ /* Use priority coloring if cover classes is not defined for the
+ target. */
+ if (targetm.ira_cover_classes == NULL)
+ flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
/* -O1 optimizations. */
opt1 = (optimize >= 1);
@@ -1096,10 +1098,12 @@ decode_options (unsigned int argc, const char **argv)
if (!flag_sel_sched_pipelining)
flag_sel_sched_pipelining_outer_loops = 0;
- if (flag_ira && !targetm.ira_cover_classes)
+ if (flag_ira && !targetm.ira_cover_classes
+ && flag_ira_algorithm == IRA_ALGORITHM_CB)
{
- inform (input_location, "-fira does not work on this architecture");
- flag_ira = 0;
+ inform (input_location,
+ "-fira-algorithm=CB does not work on this architecture");
+ flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
}
/* Save the current optimization options if this is the first call. */
@@ -1976,16 +1980,25 @@ common_handle_option (size_t scode, const char *arg, int value,
break;
case OPT_fira_algorithm_:
- if (!strcmp (arg, "regional"))
- flag_ira_algorithm = IRA_ALGORITHM_REGIONAL;
- else if (!strcmp (arg, "CB"))
+ if (!strcmp (arg, "CB"))
flag_ira_algorithm = IRA_ALGORITHM_CB;
- else if (!strcmp (arg, "mixed"))
- flag_ira_algorithm = IRA_ALGORITHM_MIXED;
+ else if (!strcmp (arg, "priority"))
+ flag_ira_algorithm = IRA_ALGORITHM_PRIORITY;
else
warning (0, "unknown ira algorithm \"%s\"", arg);
break;
+ case OPT_fira_region_:
+ if (!strcmp (arg, "one"))
+ flag_ira_region = IRA_REGION_ONE;
+ else if (!strcmp (arg, "all"))
+ flag_ira_region = IRA_REGION_ALL;
+ else if (!strcmp (arg, "mixed"))
+ flag_ira_region = IRA_REGION_MIXED;
+ else
+ warning (0, "unknown ira region \"%s\"", arg);
+ break;
+
case OPT_fira_verbose_:
flag_ira_verbose = value;
break;