[PATCH][IRA]Initialize ira_use_lra_p early by moving the initialization into

ira_init_once ().

ira_use_lra_p previously will be used unintialized in backend_init_target ().

gcc/

2016-09-23  Renlin Li  <renlin.li@arm.com>

	* ira.c (ira): Move ira_use_lra_p initialization code to ...
	(ira_init_once): Here.

From-SVN: r240418
This commit is contained in:
Renlin Li 2016-09-23 10:16:22 +00:00 committed by Renlin Li
parent bf0728547a
commit 23427d518b
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-09-23 Renlin Li <renlin.li@arm.com>
* ira.c (ira): Move ira_use_lra_p initialization code to ...
(ira_init_once): Here.
2016-09-23 Uros Bizjak <ubizjak@gmail.com> 2016-09-23 Uros Bizjak <ubizjak@gmail.com>
Jakub Jelinek <jakub@redhat.com> Jakub Jelinek <jakub@redhat.com>

View File

@ -1665,6 +1665,8 @@ ira_init_once (void)
{ {
ira_init_costs_once (); ira_init_costs_once ();
lra_init_once (); lra_init_once ();
ira_use_lra_p = targetm.lra_p ();
} }
/* Free ira_max_register_move_cost, ira_may_move_in_cost and /* Free ira_max_register_move_cost, ira_may_move_in_cost and
@ -5067,7 +5069,6 @@ ira (FILE *f)
ira_conflicts_p = optimize > 0; ira_conflicts_p = optimize > 0;
ira_use_lra_p = targetm.lra_p ();
/* If there are too many pseudos and/or basic blocks (e.g. 10K /* If there are too many pseudos and/or basic blocks (e.g. 10K
pseudos and 10K blocks or 100K pseudos and 1K blocks), we will pseudos and 10K blocks or 100K pseudos and 1K blocks), we will
use simplified and faster algorithms in LRA. */ use simplified and faster algorithms in LRA. */