This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/3] Enhance dumps of IVOPTS
- From: Martin LiÅka <mliska at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 6 May 2016 11:19:53 +0200
- Subject: Re: [PATCH 3/3] Enhance dumps of IVOPTS
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1461931011 dot git dot mliska at suse dot cz> <29780c07dc7da0d8f41aa120665072a4098910d8 dot 1461931011 dot git dot mliska at suse dot cz>
Hi.
Honza asked me to explain the change more verbosely.
The patch simplify enhances verbose dump of IVOPTS so that
# of iterations is printed. Apart from that it also prints
invariant expression that are used during the algorithm which
considers a set of candidates which is improved.
Main motivation for doing this was that sometimes the optimization
considers a constant integer as invariant expression (Bin Cheng
is working on removal of these) and that both IVs and IE are considered
by the cost model to occupy a register. Which is not ideal and
it sometimes tend to introduce more IVs that one would expect.
=== New format ===:
Improved to:
cost: 27 (complexity 2)
cand_cost: 11
cand_group_cost: 10 (complexity 2)
candidates: 3, 5
group:0 --> iv_cand:5, cost=(2,0)
group:1 --> iv_cand:5, cost=(4,1)
group:2 --> iv_cand:5, cost=(4,1)
group:3 --> iv_cand:3, cost=(0,0)
group:4 --> iv_cand:3, cost=(0,0)
invariants 1, 6
used invariant expressions:
inv_expr:3: ((sizetype) _976 - (sizetype) _922) * 4
inv_expr:6: ((sizetype) _1335 - (sizetype) _922) * 4
Original cost 27 (complexity 2)
Final cost 27 (complexity 2)
Selected IV set for loop 96 at original.f90:820, 5 avg niters, 2 expressions, 2 IVs:
=== Before ===:
Improved to:
cost: 27 (complexity 2)
cand_cost: 11
cand_group_cost: 10 (complexity 2)
candidates: 3, 5
group:0 --> iv_cand:5, cost=(2,0)
group:1 --> iv_cand:5, cost=(4,1)
group:2 --> iv_cand:5, cost=(4,1)
group:3 --> iv_cand:3, cost=(0,0)
group:4 --> iv_cand:3, cost=(0,0)
invariants 1, 6
Original cost 27 (complexity 2)
Final cost 27 (complexity 2)
Selected IV set for loop 96 at original.f90:820, 2 IVs:
Martin