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

NAKAMURA Takumi geek4civic at gmail.com
Tue Nov 8 04:03:14 PST 2011


Author: chapuni
Date: Tue Nov  8 06:03:14 2011
New Revision: 144080

URL: http://llvm.org/viewvc/llvm-project?rev=144080&view=rev
Log:
PathProfiling.c: Get rid of using "inline". We may expect compiler shall optimize out "static" scope w/o "inline".

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=144080&r1=144079&r2=144080&view=diff
==============================================================================
--- llvm/trunk/runtime/libprofile/PathProfiling.c (original)
+++ llvm/trunk/runtime/libprofile/PathProfiling.c Tue Nov  8 06:03:14 2011
@@ -26,11 +26,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-/* Must use __inline in Microsoft C */
-#if defined(_MSC_VER)
-#define __inline__ __inline
-#endif
-
 /* note that this is used for functions with large path counts,
          but it is unlikely those paths will ALL be executed */
 #define ARBITRARY_HASH_BIN_COUNT 100
@@ -112,7 +107,7 @@
   }
 }
 
-static __inline__ uint32_t hash (uint32_t key) {
+static uint32_t hash (uint32_t key) {
   /* this may benefit from a proper hash function */
   return key%ARBITRARY_HASH_BIN_COUNT;
 }
@@ -155,7 +150,7 @@
 }
 
 /* Return a pointer to this path's specific path counter */
-static __inline__ uint32_t* getPathCounter(uint32_t functionNumber,
+static uint32_t* getPathCounter(uint32_t functionNumber,
                                        uint32_t pathNumber) {
   pathHashTable_t* hashTable;
   pathHashEntry_t* hashEntry;





More information about the llvm-commits mailing list