|
From: <sv...@va...> - 2012-10-29 21:28:11
|
weidendo 2012-10-29 21:28:03 +0000 (Mon, 29 Oct 2012)
New Revision: 13092
Log:
Get rid of compiler warning
In addition to "__attribute__((always_inline))", gcc wants
"__inline__" to be used, otherwise the warning
warning: always_inline function might not be inlinable
is printed. However, this does not have any effect on
performance (probably "static" makes gcc 4.7 already inlining
the functions?).
Modified files:
trunk/cachegrind/cg_sim.c
Modified: trunk/cachegrind/cg_sim.c (+8 -4)
===================================================================
--- trunk/cachegrind/cg_sim.c 2012-10-29 20:39:18 +00:00 (rev 13091)
+++ trunk/cachegrind/cg_sim.c 2012-10-29 21:28:03 +00:00 (rev 13092)
@@ -85,7 +85,8 @@
* Without inlining of simulator functions, cachegrind can get 40% slower.
*/
__attribute__((always_inline))
-static Bool cachesim_setref_is_miss(cache_t2* c, UInt set_no, UWord tag)
+static __inline__
+Bool cachesim_setref_is_miss(cache_t2* c, UInt set_no, UWord tag)
{
int i, j;
UWord *set;
@@ -121,7 +122,8 @@
}
__attribute__((always_inline))
-static Bool cachesim_ref_is_miss(cache_t2* c, Addr a, UChar size)
+static __inline__
+Bool cachesim_ref_is_miss(cache_t2* c, Addr a, UChar size)
{
/* A memory block has the size of a cache line */
UWord block1 = a >> c->line_size_bits;
@@ -173,7 +175,8 @@
}
__attribute__((always_inline))
-static void cachesim_I1_doref(Addr a, UChar size, ULong* m1, ULong *mL)
+static __inline__
+void cachesim_I1_doref(Addr a, UChar size, ULong* m1, ULong *mL)
{
if (cachesim_ref_is_miss(&I1, a, size)) {
(*m1)++;
@@ -183,7 +186,8 @@
}
__attribute__((always_inline))
-static void cachesim_D1_doref(Addr a, UChar size, ULong* m1, ULong *mL)
+static __inline__
+void cachesim_D1_doref(Addr a, UChar size, ULong* m1, ULong *mL)
{
if (cachesim_ref_is_miss(&D1, a, size)) {
(*m1)++;
|