public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, PR45098]
@ 2011-05-17  7:23 Tom de Vries
  2011-05-17  7:25 ` [PATCH, PR45098, 1/10] Tom de Vries
                   ` (9 more replies)
  0 siblings, 10 replies; 46+ messages in thread
From: Tom de Vries @ 2011-05-17  7:23 UTC (permalink / raw)
  To: Zdenek Dvorak; +Cc: gcc-patches

Hi Zdenek,

I have a patch set for for PR45098.

01_object-size-target.patch
02_pr45098-rtx-cost-set.patch
03_pr45098-computation-cost.patch
04_pr45098-iv-init-cost.patch
05_pr45098-bound-cost.patch
06_pr45098-bound-cost.test.patch
07_pr45098-nowrap-limits-iterations.patch
08_pr45098-nowrap-limits-iterations.test.patch
09_pr45098-shift-add-cost.patch
10_pr45098-shift-add-cost.test.patch

I will sent out the patches individually.

The patch set has been bootstrapped and reg-tested on x86_64, and
reg-tested on ARM.

The effect of the patch set on examples is the removal of 1 iterator,
demonstrated below for '-Os -mthumb -march=armv7-a' on example tr4.

tr4.c:
...
extern void foo2 (short*);
void tr4 (short array[], int n)
{
  int i;
  if (n > 0)
    for (i = 0; i < n; i++)
      foo2 (&array[i]);
}
...

tr4.s diff (left without, right with patch):
...
push    {r4, r5, r6, lr}          |     cmp     r1, #0
subs    r6, r1, #0                |     push    {r3, r4, r5, lr}
ble     .L1                             ble     .L1
mov     r5, r0                    |     mov     r4, r0
movs    r4, #0                    |     add     r5, r0, r1, lsl #1
.L3:                                    .L3:
mov     r0, r5                    |     mov     r0, r4
adds    r4, r4, #1                |     adds    r4, r4, #2
bl      foo2                            bl      foo2
adds    r5, r5, #2                |     cmp     r4, r5
cmp     r4, r6                    <
bne     .L3                             bne     .L3
.L1:                                    .L1:
pop     {r4, r5, r6, pc}          |     pop     {r3, r4, r5, pc}
...


The effect of the patch set on the test cases in terms of size is listed
in the following 2 tables.

---------------------------
-Os -thumb -mmarch=armv7-a
---------------------------
    without    with   delta
---------------------------
tr1      32      30      -2
tr2      36      36       0
tr3      32      30      -2
tr4      26      26       0
tr5      20      20       0
---------------------------

---------------------------
-Os -mmarch=armv7-a
---------------------------
    without    with   delta
---------------------------
tr1      60      52      -8
tr2      64      60      -4
tr3      60      52      -8
tr4      48      44      -4
tr5      36      32      -4
---------------------------


The size impact on several benchmarks is shown in the following table
(%, lower is better).

                     none            pic
                thumb1  thumb2  thumb1 thumb2
spec2000          99.9    99.9    99.9   99.9
eembc             99.9   100.0    99.9  100.1
dhrystone        100.0   100.0   100.0  100.0
coremark	  99.3    99.9    99.3  100.0

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2011-06-11 18:53 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-17  7:23 [PATCH, PR45098] Tom de Vries
2011-05-17  7:25 ` [PATCH, PR45098, 1/10] Tom de Vries
2011-05-19 11:17   ` [PATCH PR45098, 1/10] Proc object-size fix Tom de Vries
2011-05-17  8:12 ` [PATCH, PR45098, 2/10] Tom de Vries
2011-05-18  9:39   ` Zdenek Dvorak
2011-05-17  8:30 ` [PATCH, PR45098, 3/10] Tom de Vries
2011-05-18 10:10   ` Zdenek Dvorak
2011-05-18 13:00     ` Tom de Vries
     [not found]       ` <20110518152457.GA13360@kam.mff.cuni.cz>
2011-05-18 19:30         ` Tom de Vries
2011-05-17  8:32 ` [PATCH, PR45098, 4/10] Tom de Vries
2011-05-18 17:46   ` [PATCH PR45098, 4/10] Iv init cost Tom de Vries
2011-05-18 22:59     ` Zdenek Dvorak
2011-05-25 14:20     ` Richard Sandiford
2011-05-26 12:24       ` Tom de Vries
2011-05-31 15:22         ` Richard Sandiford
2011-05-17  8:37 ` [PATCH, PR45098, 5/10] Tom de Vries
2011-05-18 17:48   ` [PATCH PR45098, 5/10] Bound cost Tom de Vries
2011-05-19  4:45     ` Zdenek Dvorak
2011-05-17  8:42 ` [PATCH, PR45098, 6/10] Tom de Vries
2011-05-18 17:48   ` [PATCH PR45098, 6/10] Bound cost - test cases Tom de Vries
2011-05-17  8:58 ` [PATCH, PR45098, 7/10] Tom de Vries
2011-05-18 17:52   ` [PATCH PR45098, 7/10] Nowrap limits iterations Tom de Vries
2011-05-19  4:45     ` Zdenek Dvorak
2011-05-20 12:22       ` Tom de Vries
2011-05-21 18:54         ` Zdenek Dvorak
2011-05-21 22:53           ` Tom de Vries
2011-05-28 17:58             ` Tom de Vries
2011-05-30 15:12               ` Zdenek Dvorak
2011-05-31  9:07                 ` Tom de Vries
2011-05-31  9:11                   ` Zdenek Dvorak
2011-06-11 10:13                     ` Tom de Vries
2011-06-12  1:17                       ` Zdenek Dvorak
2011-05-23 14:50           ` H.J. Lu
2011-05-17  9:03 ` [PATCH, PR45098, 8/10] Tom de Vries
2011-05-18 18:23   ` [PATCH PR45098, 8/10] Nowrap limits iterations - test cases Tom de Vries
2011-05-18 18:27   ` [PATCH PR45098, 9/10] Cheap shift-add Tom de Vries
2011-05-19  5:33     ` Zdenek Dvorak
2011-05-20 11:32       ` Tom de Vries
2011-05-20 20:09         ` Zdenek Dvorak
2011-05-21 15:05         ` Eric Botcazou
2011-05-22 19:33           ` Tom de Vries
2011-05-22 20:22             ` Richard Guenther
2011-05-22 21:11             ` Eric Botcazou
2011-05-17 10:03 ` [PATCH, PR45098, 9/10] Tom de Vries
2011-05-17 10:30 ` [PATCH, PR45098, 10/10] Tom de Vries
2011-05-18 18:30   ` [PATCH PR45098, 10/10] Cheap shift-add - test case Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).