if (DF_REG_DEF_COUNT (i) || DF_REG_USE_COUNT (i))
num_used_regs++;
- /* 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
- use simplified and faster algorithms in LRA. */
+ /* If there are too many pseudos and/or basic blocks (e.g. 10K pseudos and
+ 10K blocks or 100K pseudos and 1K blocks) or we have too many function
+ insns, we will use simplified and faster algorithms in LRA. */
lra_simple_p
- = ira_use_lra_p
- && num_used_regs >= (1U << 26) / last_basic_block_for_fn (cfun);
+ = (ira_use_lra_p
+ && (num_used_regs >= (1U << 26) / last_basic_block_for_fn (cfun)
+ /* max uid is a good evaluation of the number of insns as most
+ optimizations are done on tree-SSA level. */
+ || ((uint64_t) get_max_uid ()
+ > (uint64_t) param_ira_simple_lra_insn_threshold * 1000)));
if (lra_simple_p)
{
Common Joined UInteger Var(param_ira_max_conflict_table_size) Init(1000) Param Optimization
Max size of conflict table in MB.
+-param=ira-simple-lra-insn-threshold=
+Common Joined UInteger Var(param_ira_simple_lra_insn_threshold) Init(1000) Param Optimization
+Approximate function insn number in 1K units triggering simple local RA.
+
-param=ira-max-loops-num=
Common Joined UInteger Var(param_ira_max_loops_num) Init(100) Param Optimization
Max loops number for regional RA.