brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1022 B · 30f2d02 Raw
29 lines · plain
1## Check that BOLT successfully splits C++ exception-handling code for2## PIEs or shared objects.3 4REQUIRES: system-linux,bolt-runtime5 6RUN: %clangxx %cxxflags -pie -fPIC %p/Inputs/exceptions_split.cpp -Wl,-q -o %t7RUN: llvm-bolt %t -o %t.instr --instrument --instrumentation-file=%t.fdata8 9## Record profile with invocation that does not throw exceptions.10RUN: %t.instr11 12RUN: llvm-bolt %t -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp \13RUN:   --split-functions --split-eh --print-after-lowering \14RUN:   --print-only=main 2>&1 | FileCheck %s15 16## All calls to printf() should be from exception handling code that was17## recorded as cold during the profile collection run. Check that the calls18## are placed after the split point.19CHECK-NOT: printf20CHECK: HOT-COLD SPLIT POINT21CHECK:     printf22 23## Verify the output still executes correctly when the exception path is being24## taken.25RUN: %t.bolt arg1 arg2 arg3 2>&1 | FileCheck --check-prefix=CHECK-BOLTED %s26 27CHECK-BOLTED:      catch 228CHECK-BOLTED-NEXT: catch 129