llvm-project/bolt/test/yaml-profile-kind.c
Amir Ayupov 1e0d08e872 [BOLT] Add blocks order kind to YAML profile header
Specify blocks order used in YAML profile. Needed to ensure profile backwards
compatibility with pre-D155514 DFS order by default.

Reviewed By: #bolt, maksfb

Differential Revision: https://reviews.llvm.org/D156176
2023-07-24 21:33:05 -07:00

14 lines
556 B
C

/* This test checks the handling of YAML profile with different block orders.
# RUN: %clang %cflags %s -o %t.exe
# RUN: link_fdata %s %t.exe %t.fdata
# RUN: llvm-bolt %t.exe -o /dev/null -data %t.fdata -w %t.yaml
# RUN: FileCheck %s --input-file %t.yaml --check-prefix=CHECK-BINARY
# CHECK-BINARY: dfs-order: false
# RUN: llvm-bolt %t.exe -o /dev/null -data %t.fdata -w %t.yaml --profile-use-dfs
# RUN: FileCheck %s --input-file %t.yaml --check-prefix=CHECK-DFS
# CHECK-DFS: dfs-order: true
# FDATA: 0 [unknown] 0 1 main 0 0 0
*/
int main() { return 0; }