[llvm-commits] [llvm] r144070 - /llvm/trunk/runtime/libprofile/PathProfiling.c

Benjamin Kramer benny.kra at googlemail.com
Tue Nov 8 01:48:15 PST 2011


On 08.11.2011, at 04:54, NAKAMURA Takumi wrote:

> Author: chapuni
> Date: Mon Nov  7 21:54:40 2011
> New Revision: 144070
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=144070&view=rev
> Log:
> runtime/libprofile/PathProfiling.c: Use __inline__ to appease clang -std=gnu89 -pedantic.
> 
> FIXME: Should configure detect one?

I think we can just drop the inline keywords here and let the compiler decide whether it wants to inline that function or not. An optimizer hint that's going to be unused most of the time is not worth that much complexity.

-Ben

> 
> Modified:
>    llvm/trunk/runtime/libprofile/PathProfiling.c
> 
> Modified: llvm/trunk/runtime/libprofile/PathProfiling.c
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/libprofile/PathProfiling.c?rev=144070&r1=144069&r2=144070&view=diff
> ==============================================================================
> --- llvm/trunk/runtime/libprofile/PathProfiling.c (original)
> +++ llvm/trunk/runtime/libprofile/PathProfiling.c Mon Nov  7 21:54:40 2011
> @@ -28,7 +28,7 @@
> 
> /* Must use __inline in Microsoft C */
> #if defined(_MSC_VER)
> -#define inline __inline
> +#define __inline__ __inline
> #endif
> 
> /* note that this is used for functions with large path counts,
> @@ -112,7 +112,7 @@
>   }
> }
> 
> -static inline uint32_t hash (uint32_t key) {
> +static __inline__ uint32_t hash (uint32_t key) {
>   /* this may benefit from a proper hash function */
>   return key%ARBITRARY_HASH_BIN_COUNT;
> }
> @@ -155,7 +155,7 @@
> }
> 
> /* Return a pointer to this path's specific path counter */
> -static inline uint32_t* getPathCounter(uint32_t functionNumber,
> +static __inline__ uint32_t* getPathCounter(uint32_t functionNumber,
>                                        uint32_t pathNumber) {
>   pathHashTable_t* hashTable;
>   pathHashEntry_t* hashEntry;
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list