|
From: <sv...@va...> - 2005-12-14 05:33:20
|
Author: njn
Date: 2005-12-14 05:33:17 +0000 (Wed, 14 Dec 2005)
New Revision: 5340
Log:
Ensure that f() doesn't get inlined.
Modified:
trunk/perf/sarp.c
Modified: trunk/perf/sarp.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/perf/sarp.c 2005-12-14 02:58:23 UTC (rev 5339)
+++ trunk/perf/sarp.c 2005-12-14 05:33:17 UTC (rev 5340)
@@ -13,12 +13,13 @@
=20
#define REPS 1000*1000*10
=20
+__attribute__((noinline))
int f(int i)
{
// This nonsense is just to ensure that the compiler does not optimis=
e
// away the stack allocation.
char big_array[500];
- big_array[0] =3D 12;
+ big_array[ 0] =3D 12;
big_array[ 23] =3D 34;
big_array[256] =3D 56;
big_array[434] =3D 78;
|