forked from OSchip/llvm-project
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 llvm-svn: 221877
This commit is contained in:
parent
45ba2c10e4
commit
8e586617c4
|
@ -180,7 +180,8 @@ filter_available_targets(LSAN_SUPPORTED_ARCH x86_64)
|
|||
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)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ uint64_t __llvm_profile_get_size_for_buffer(void);
|
|||
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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue