diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-01 20:47:47 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-12-01 20:47:47 +0000 |
commit | 24c489e2ec41f9896f5e2641a9f583d5804850b1 (patch) | |
tree | ae09aee61d8ab3ab769607900a05f0589dfea559 /gcc | |
parent | 1c55739d1a2ada43face764a746c26391834e16c (diff) | |
download | gcc-24c489e2ec41f9896f5e2641a9f583d5804850b1.tar.gz |
Provide FMA costs; enable some debug flags
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167354 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 73 |
2 files changed, 22 insertions, 57 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e239bea7392..1f051c0ef20 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-12-01 Michael Meissner <meissner@linux.vnet.ibm.com> + + * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix + thinko regarding setting -mno-<xxx> debug switches. + (rs6000_rtx_costs): Add FMA. Delete old rtl based FMA costs. + 2010-12-01 Joseph Myers <joseph@codesourcery.com> * intl.c: Don't include tm.h. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 6136c39348f..f63aaecd5c3 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3017,14 +3017,15 @@ rs6000_option_override_internal (bool global_init_p) || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64); - /* Allow debug switches to override the above settings. */ - if (TARGET_ALWAYS_HINT > 0) + /* Allow debug switches to override the above settings. These are set to -1 + in rs6000.opt to indicate the user hasn't directly set the switch. */ + if (TARGET_ALWAYS_HINT >= 0) rs6000_always_hint = TARGET_ALWAYS_HINT; - if (TARGET_SCHED_GROUPS > 0) + if (TARGET_SCHED_GROUPS >= 0) rs6000_sched_groups = TARGET_SCHED_GROUPS; - if (TARGET_ALIGN_BRANCH_TARGETS > 0) + if (TARGET_ALIGN_BRANCH_TARGETS >= 0) rs6000_align_branch_targets = TARGET_ALIGN_BRANCH_TARGETS; rs6000_sched_restricted_insns_priority @@ -26072,54 +26073,9 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total, return true; case PLUS: - if (mode == DFmode) - { - if (GET_CODE (XEXP (x, 0)) == MULT) - { - /* FNMA accounted in outer NEG. */ - if (outer_code == NEG) - *total = rs6000_cost->dmul - rs6000_cost->fp; - else - *total = rs6000_cost->dmul; - } - else - *total = rs6000_cost->fp; - } - else if (mode == SFmode) - { - /* FNMA accounted in outer NEG. */ - if (outer_code == NEG && GET_CODE (XEXP (x, 0)) == MULT) - *total = 0; - else - *total = rs6000_cost->fp; - } - else - *total = COSTS_N_INSNS (1); - return false; - case MINUS: - if (mode == DFmode) - { - if (GET_CODE (XEXP (x, 0)) == MULT - || GET_CODE (XEXP (x, 1)) == MULT) - { - /* FNMA accounted in outer NEG. */ - if (outer_code == NEG) - *total = rs6000_cost->dmul - rs6000_cost->fp; - else - *total = rs6000_cost->dmul; - } - else - *total = rs6000_cost->fp; - } - else if (mode == SFmode) - { - /* FNMA accounted in outer NEG. */ - if (outer_code == NEG && GET_CODE (XEXP (x, 0)) == MULT) - *total = 0; - else - *total = rs6000_cost->fp; - } + if (FLOAT_MODE_P (mode)) + *total = rs6000_cost->fp; else *total = COSTS_N_INSNS (1); return false; @@ -26134,20 +26090,23 @@ rs6000_rtx_costs (rtx x, int code, int outer_code, int *total, else *total = rs6000_cost->mulsi_const; } - /* FMA accounted in outer PLUS/MINUS. */ - else if ((mode == DFmode || mode == SFmode) - && (outer_code == PLUS || outer_code == MINUS)) - *total = 0; - else if (mode == DFmode) - *total = rs6000_cost->dmul; else if (mode == SFmode) *total = rs6000_cost->fp; + else if (FLOAT_MODE_P (mode)) + *total = rs6000_cost->dmul; else if (mode == DImode) *total = rs6000_cost->muldi; else *total = rs6000_cost->mulsi; return false; + case FMA: + if (mode == SFmode) + *total = rs6000_cost->fp; + else + *total = rs6000_cost->dmul; + break; + case DIV: case MOD: if (FLOAT_MODE_P (mode)) |