[compiler-rt] r250680 - [PGO] Eliminate prof data register calls on FreeBSD platform

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 18 21:17:20 PDT 2015


Author: davidxl
Date: Sun Oct 18 23:17:19 2015
New Revision: 250680

URL: http://llvm.org/viewvc/llvm-project?rev=250680&view=rev
Log:
[PGO] Eliminate prof data register calls on FreeBSD platform

This is a follow up patch of r250199 after verifying the start/stop
section symbols work as spected on FreeBSD.


Modified:
    compiler-rt/trunk/lib/profile/InstrProfilingPlatformLinux.c
    compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c

Modified: compiler-rt/trunk/lib/profile/InstrProfilingPlatformLinux.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPlatformLinux.c?rev=250680&r1=250679&r2=250680&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPlatformLinux.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPlatformLinux.c Sun Oct 18 23:17:19 2015
@@ -9,7 +9,7 @@
 
 #include "InstrProfiling.h"
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
 #include <stdlib.h>
 
 extern __llvm_profile_data __start___llvm_prf_data

Modified: compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c?rev=250680&r1=250679&r2=250680&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPlatformOther.c Sun Oct 18 23:17:19 2015
@@ -9,7 +9,7 @@
 
 #include "InstrProfiling.h"
 
-#if !defined(__APPLE__) && !defined(__linux__)
+#if !defined(__APPLE__) && !defined(__linux__) && !defined(__FreeBSD__)
 #include <stdlib.h>
 
 static const __llvm_profile_data *DataFirst = NULL;




More information about the llvm-commits mailing list