102 lines · plain
1@var = dso_local global i32 0, align 42 3; Function Attrs: noinline nounwind optnone uwtable4define dso_local void @symb_w_whitespace() #0 {5 store volatile i32 1, i32* @var, align 46 ret void7}8 9; Function Attrs: noinline nounwind optnone uwtable10define dso_local void @symb_backslash_b() #0 {11 call void @symb_w_whitespace()12 store volatile i32 2, i32* @var, align 413 ret void14}15 16; Function Attrs: noinline nounwind optnone uwtable17define dso_local i32 @main() #0 {18 %1 = alloca i32, align 419 %2 = alloca i32, align 420 store i32 0, i32* %1, align 421 call void @static_symb_backslash_b()22 call void @symb_w_whitespace()23 store i32 0, i32* %2, align 424 br label %325 263: ; preds = %7, %027 %4 = load i32, i32* %2, align 428 %5 = icmp slt i32 %4, 229 br i1 %5, label %6, label %1030 316: ; preds = %332 call void @symb_backslash_b()33 br label %734 357: ; preds = %636 %8 = load i32, i32* %2, align 437 %9 = add nsw i32 %8, 138 store i32 %9, i32* %2, align 439 br label %340 4110: ; preds = %342 %11 = load i32, i32* %1, align 443 ret i32 %1144}45 46; Function Attrs: noinline nounwind optnone uwtable47define internal void @static_symb_backslash_b() #0 {48 call void @symb_w_whitespace()49 store volatile i32 3, i32* @var, align 450 ret void51}52 53; REQUIRES: system-linux,bolt-runtime54 55; RUN: llc %s -o %t.s56; RUN: %clang %cflags -O0 %t.s -o %t.exe -Wl,-q57; RUN: llvm-objcopy --redefine-syms=%p/Inputs/fdata-escape-chars-syms.txt %t.exe58;59; RUN: llvm-bolt %t.exe -o %t.exe.instrumented --instrument \60; RUN: --instrumentation-file=%t.fdata61; RUN: %t.exe.instrumented62; RUN: cat %t.fdata | \63; RUN: FileCheck --check-prefix="FDATA_CHECK" %s64; RUN: llvm-bolt %t.exe -o %t.fdata.exe --data %t.fdata --print-finalized | \65; RUN: FileCheck --check-prefix="INSTR_CHECK" %s66;67; RUN: link_fdata %p/Inputs/fdata-escape-chars.txt %t.exe %t.pre "PREAGR"68; RUN: perf2bolt %t.exe -o %t.pre.fdata -pa -p %t.pre69; RUN: cat %t.pre.fdata | FileCheck --check-prefix="PREAGR_FDATA_CHECK" %s70; RUN: llvm-bolt %t.exe -o %t.pre.fdata.exe --data %t.pre.fdata --print-finalized | \71; RUN: FileCheck --check-prefix="PREAGR_CHECK" %s72 73; FDATA_CHECK: 1 symb\ backslash\\ {{([[:xdigit:]]+)}} 1 symb\ whitespace 0 0 274; FDATA_CHECK: 1 main {{([[:xdigit:]]+)}} 1 symb\ whitespace 0 0 175; FDATA_CHECK: 1 main {{([[:xdigit:]]+)}} 1 symb\ backslash\\ 0 0 276 77; INSTR_CHECK: Binary Function "symb whitespace"78; INSTR_CHECK: Exec Count : 479; INSTR_CHECK: Binary Function "symb backslash\"80; INSTR_CHECK: Exec Count : 281; INSTR_CHECK: {{([[:xdigit:]]+)}}: callq "symb whitespace" # Count: 282; INSTR_CHECK: Binary Function "main"83; INSTR_CHECK: Exec Count : 184; INSTR_CHECK: {{([[:xdigit:]]+)}}: callq "symb whitespace" # Count: 185; INSTR_CHECK: {{([[:xdigit:]]+)}}: callq "symb backslash\\" # Count: 286; INSTR_CHECK: Binary Function "static symb backslash\/1(*2)"87; INSTR_CHECK: Exec Count : 188; INSTR_CHECK: {{([[:xdigit:]]+)}}: callq "symb whitespace" # Count: 189 90; PREAGR_FDATA_CHECK: 1 main 0 1 static\ symb\ backslash\\/1 0 0 191; PREAGR_FDATA_CHECK: 1 main 0 1 symb\ backslash\\ 0 0 292; PREAGR_FDATA_CHECK: 1 main 0 1 symb\ whitespace 0 0 193; PREAGR_FDATA_CHECK: 1 static\ symb\ backslash\\/1 0 1 symb\ whitespace 0 0 194; PREAGR_FDATA_CHECK: 1 symb\ backslash\\ 0 1 symb\ whitespace 0 0 295 96; PREAGR_CHECK: Binary Function "symb whitespace"97; PREAGR_CHECK-DAG: Exec Count : 498; PREAGR_CHECK: Binary Function "symb backslash\"99; PREAGR_CHECK-DAG: Exec Count : 2100; PREAGR_CHECK: Binary Function "static symb backslash\/1(*2)"101; PREAGR_CHECK-DAG: Exec Count : 1102