File: layout-heuristic.test

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (27 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Checks that llvm-bolt is able to read data generated by perf2bolt,  update the
# CFG edges accordingly with absolute number of branches and mispredictions,
# infer fallthrough branch info and reorder basic blocks using a greedy
# heuristic,  or find the optimal solution if the function is small enough.
# Also checks that llvm-bolt disassembler and CFG builder is working properly.

RUN: yaml2obj %p/Inputs/blarge.yaml &> %t.exe
RUN: llvm-bolt %t.exe -o /dev/null --data %p/Inputs/blarge.fdata \
RUN:   --reorder-blocks=normal --print-cfg --print-reordered \
RUN:   --funcs=main,SolveCubic,usqrt --sequential-disassembly \
RUN:   2>&1 | FileCheck %s

# Original order
CHECK:     Binary Function "main"
CHECK:     BB Layout : .LBB00, .Ltmp1, .Ltmp0, .Ltmp3, .Ltmp2, .Ltmp5, .Ltmp4, .Ltmp7, .Ltmp6, .Ltmp9, .Ltmp8, .Ltmp11, .Ltmp10, .Ltmp13, .Ltmp12, .Ltmp15, .Ltmp14, .Ltmp21, .Ltmp20, .Ltmp19, .Ltmp18, .Ltmp17, .Ltmp16, .LFT0, .LFT1, .LFT2, .LFT3, .Ltmp22, .LFT4, .Ltmp23, .LFT5, .Ltmp24, .LFT6, .Ltmp25, .LFT7
CHECK:     Binary Function "SolveCubic"
CHECK:     BB Layout : .LBB01, .LFT8, .LFT9, .Ltmp33, .LFT10, .Ltmp28, .LFT11, .Ltmp26, .LFT12, .Ltmp37, .Ltmp36, .Ltmp35, .Ltmp34, .Ltmp27, .Ltmp32, .Ltmp31, .Ltmp30, .Ltmp29
CHECK:     Binary Function "usqrt"
CHECK:     BB Layout : .LBB02, .Ltmp39, .LFT13, .Ltmp38, .LFT14

# New order
CHECK:     Binary Function "main"
CHECK:     BB Layout : .LBB00, .Ltmp1, .Ltmp0, .Ltmp3, .Ltmp2, .Ltmp5, .Ltmp4, .Ltmp7, .Ltmp6, .Ltmp9, .Ltmp8, .Ltmp11, .Ltmp10, .Ltmp13, .Ltmp12, .Ltmp15, .Ltmp14, .Ltmp21, .Ltmp16, .Ltmp18, .Ltmp17, .LFT0, .Ltmp19, .LFT1, .Ltmp20, .LFT2, .LFT3, .Ltmp22, .LFT4, .Ltmp23, .LFT5, .Ltmp24, .LFT6, .Ltmp25, .LFT7
CHECK:     Binary Function "SolveCubic"
CHECK:     BB Layout : .LBB01, .Ltmp26, .LFT12, .Ltmp37, .Ltmp36, .Ltmp35, .Ltmp34, .LFT8, .LFT9, .Ltmp33, .Ltmp28, .LFT10, .Ltmp27, .Ltmp32, .Ltmp31, .Ltmp30, .Ltmp29
CHECK:     Binary Function "usqrt"
CHECK:     BB Layout : .LBB02, .Ltmp38, .Ltmp39, .LFT13, .LFT14