[compiler-rt] r221877 - InstrProf: support PowerPC64
Jay Foad
jay.foad at gmail.com
Thu Nov 13 01:24:33 PST 2014
Author: foad
Date: Thu Nov 13 03:24:32 2014
New Revision: 221877
URL: http://llvm.org/viewvc/llvm-project?rev=221877&view=rev
Log:
InstrProf: support PowerPC64
Summary:
I don't know anything about profiling but it seems to work out of the
box on PowerPC64. At least "make check-profile" works.
A few tests needed tweaking because PowerPC64 IR declares main with
"define signext i32 @main" instead of just "define i32 @main".
This also fixes the asan asan_and_llvm_coverage_test test, which
compiles with -coverage so requires that a profiling version of
libclang_rt has been built.
Reviewers: dexonsmith, kcc, samsonov
Reviewed By: samsonov
Subscribers: samsonov, llvm-commits
Differential Revision: http://reviews.llvm.org/D6233
Modified:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/test/profile/instrprof-without-libc.c
compiler-rt/trunk/test/profile/instrprof-write-file-only.c
compiler-rt/trunk/test/profile/instrprof-write-file.c
Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=221877&r1=221876&r2=221877&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Thu Nov 13 03:24:32 2014
@@ -180,7 +180,8 @@ filter_available_targets(LSAN_SUPPORTED_
filter_available_targets(LSAN_COMMON_SUPPORTED_ARCH
${SANITIZER_COMMON_SUPPORTED_ARCH})
filter_available_targets(MSAN_SUPPORTED_ARCH x86_64)
-filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64 mipsel mips64el aarch64)
+filter_available_targets(PROFILE_SUPPORTED_ARCH x86_64 i386 i686 arm mips mips64
+ mipsel mips64el aarch64 powerpc64 powerpc64le)
filter_available_targets(TSAN_SUPPORTED_ARCH x86_64)
filter_available_targets(UBSAN_SUPPORTED_ARCH x86_64 i386 i686 arm aarch64 mips mipsel)
Modified: compiler-rt/trunk/test/profile/instrprof-without-libc.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-without-libc.c?rev=221877&r1=221876&r2=221877&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-without-libc.c (original)
+++ compiler-rt/trunk/test/profile/instrprof-without-libc.c Thu Nov 13 03:24:32 2014
@@ -17,7 +17,7 @@ uint64_t __llvm_profile_get_size_for_buf
int __llvm_profile_write_buffer(char *);
int write_buffer(uint64_t, const char *);
int main(int argc, const char *argv[]) {
- // CHECK-LABEL: define i32 @main(
+ // CHECK-LABEL: define {{.*}} @main(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1
if (argc < 2)
return 1;
Modified: compiler-rt/trunk/test/profile/instrprof-write-file-only.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-write-file-only.c?rev=221877&r1=221876&r2=221877&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-write-file-only.c (original)
+++ compiler-rt/trunk/test/profile/instrprof-write-file-only.c Thu Nov 13 03:24:32 2014
@@ -9,7 +9,7 @@ int __llvm_profile_write_file(void);
void __llvm_profile_set_filename(const char *);
int foo(int);
int main(int argc, const char *argv[]) {
- // CHECK-LABEL: define i32 @main
+ // CHECK-LABEL: define {{.*}} @main(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1
if (argc > 1)
return 1;
@@ -28,7 +28,7 @@ int foo(int X) {
// There should be no profiling information for @foo, since it was called
// after the profile was written (and the atexit was suppressed by defining
// profile_runtime).
- // CHECK-LABEL: define i32 @foo
+ // CHECK-LABEL: define {{.*}} @foo(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{[^,]+$}}
return X <= 0 ? -X : X;
}
Modified: compiler-rt/trunk/test/profile/instrprof-write-file.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/instrprof-write-file.c?rev=221877&r1=221876&r2=221877&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/instrprof-write-file.c (original)
+++ compiler-rt/trunk/test/profile/instrprof-write-file.c Thu Nov 13 03:24:32 2014
@@ -9,7 +9,7 @@ int __llvm_profile_write_file(void);
void __llvm_profile_set_filename(const char *);
int foo(int);
int main(int argc, const char *argv[]) {
- // CHECK-LABEL: define i32 @main
+ // CHECK-LABEL: define {{.*}} @main(
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !1
if (argc < 2)
return 1;
@@ -25,7 +25,7 @@ int main(int argc, const char *argv[]) {
return Ret;
}
int foo(int X) {
- // CHECK-LABEL: define i32 @foo
+ // CHECK-LABEL: define {{.*}} @foo(
// CHECK1: br i1 %{{.*}}, label %{{.*}}, label %{{[^,]+$}}
// CHECK2: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}, !prof !2
return X <= 0 ? -X : X;
More information about the llvm-commits
mailing list