2016-07-20 06:12:00 +08:00
|
|
|
# IR based instrumentation
|
|
|
|
RUN: %clangxx_pgogen -O2 -c -o %t.1.o %S/Inputs/instrprof-icall-promo_1.cc
|
|
|
|
RUN: %clangxx_pgogen -O2 -c -o %t.2.o %S/Inputs/instrprof-icall-promo_2.cc
|
2016-06-03 00:24:21 +08:00
|
|
|
|
2016-07-20 06:12:00 +08:00
|
|
|
RUN: %clangxx_pgogen -O2 %t.2.o %t.1.o -o %t.gen.1
|
2016-06-07 07:19:23 +08:00
|
|
|
RUN: env LLVM_PROFILE_FILE=%t-icall.profraw %run %t.gen.1
|
2016-06-03 00:24:21 +08:00
|
|
|
RUN: llvm-profdata merge -o %t-icall.profdata %t-icall.profraw
|
2016-07-20 06:12:00 +08:00
|
|
|
RUN: %clangxx_profuse=%t-icall.profdata -O2 -Rpass=pgo-icall-prom -c -o %t.2.use.o %S/Inputs/instrprof-icall-promo_2.cc 2>&1 | FileCheck %s
|
2016-06-03 00:24:21 +08:00
|
|
|
|
2016-07-20 06:12:00 +08:00
|
|
|
RUN: %clangxx_pgogen -O2 %t.1.o %t.2.o -o %t.gen.2
|
2016-06-07 07:19:23 +08:00
|
|
|
RUN: env LLVM_PROFILE_FILE=%t-icall2.profraw %run %t.gen.2
|
2016-06-03 00:24:21 +08:00
|
|
|
RUN: llvm-profdata merge -o %t-icall2.profdata %t-icall2.profraw
|
2016-07-20 06:12:00 +08:00
|
|
|
RUN: %clangxx_profuse=%t-icall2.profdata -O2 -Rpass=pgo-icall-prom -c -o %t.2.use.o %S/Inputs/instrprof-icall-promo_2.cc 2>&1 | FileCheck %s
|
2016-06-03 00:24:21 +08:00
|
|
|
|
[InstrProf] Port test suite to Windows
Summary:
Before this change, check-profile would run, but all tests would be
marked unsupported on Windows. This is the new status of 'check-profile'
after this change:
Testing Time: 6.66s
Expected Passes : 29
Expected Failures : 5
Unsupported Tests : 39
I moved many tests that exercise posix-y features like dlopen and DSOs
into the Posix subdirectory, and ran the tests on Linux to validate my
changes.
These are the remaining tests that I handled on a case by case basis:
- instrprof-path.c
Passes, Fixed some path portability issues
- instrprof-gcov-exceptions.test
Passes, the FileCheck actually succeeds on Windows, so I RUNX'd it
- instrprof-icall-promo.test
XFAILed, probably due to C++ ABI differences in vtables
- instrprof-merge-match.test
- instrprof-merge.c
- instrprof-merging.cpp
XFAILed, These seem like real bugs that need fixing
- instrprof-version-mismatch.c
XFAILed, Overriding the weak version symbol doesn't work
- instrprof-without-libc.c
UNSUPPORTED, test needs an executable symbol table, Windows has none
Reviewers: davidxl, wmi, void
Subscribers: fedor.sergeev, #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D57853
llvm-svn: 353435
2019-02-08 01:52:05 +08:00
|
|
|
FIXME: Relies on vtable layout
|
|
|
|
XFAIL: msvc
|
|
|
|
|
2016-06-03 00:24:21 +08:00
|
|
|
|
|
|
|
# CHECK: Promote indirect call to
|
|
|
|
|