File: basic-block-sections-mir-print.ll

package info (click to toggle)
llvm-toolchain-17 1%3A17.0.6-22
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,799,624 kB
  • sloc: cpp: 6,428,607; ansic: 1,383,196; asm: 793,408; python: 223,504; objc: 75,364; f90: 60,502; lisp: 33,869; pascal: 15,282; sh: 9,684; perl: 7,453; ml: 4,937; awk: 3,523; makefile: 2,889; javascript: 2,149; xml: 888; fortran: 619; cs: 573
file content (39 lines) | stat: -rw-r--r-- 1,465 bytes parent folder | download | duplicates (8)
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
28
29
30
31
32
33
34
35
36
37
38
39
; Stop after bbsections-prepare and check MIR output for section type.
; RUN: llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=labels -stop-after=bbsections-prepare | FileCheck %s -check-prefix=BBLABELS
; RUN: echo '!_Z3foob' > %t
; RUN: echo '!!1' >> %t
; RUN: echo '!!2' >> %t
; RUN: llc < %s -O0 -mtriple=x86_64-pc-linux -function-sections -basic-block-sections=%t -stop-after=bbsections-prepare | FileCheck %s -check-prefix=BBSECTIONS

@_ZTIb = external constant ptr
define dso_local i32 @_Z3foob(i1 zeroext %0) {
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  %4 = zext i1 %0 to i8
  store i8 %4, ptr %3, align 1
  %5 = load i8, ptr %3, align 1
  %6 = trunc i8 %5 to i1
  br i1 %6, label %7, label %8

7:                                                ; preds = %1
  store i32 1, ptr %2, align 4
  br label %9

8:                                                ; preds = %1
  store i32 0, ptr %2, align 4
  br label %9

9:                                                ; preds = %8, %7
  %10 = load i32, ptr %2, align 4
  ret i32 %10
}

; BBSECTIONS: bb.0 (%ir-block.1, bbsections Cold, bb_id 0):
; BBSECTIONS: bb.3 (%ir-block.9, bbsections Cold, bb_id 3):
; BBSECTIONS: bb.1 (%ir-block.7, bb_id 1)
; BBSECTIONS: bb.2 (%ir-block.8, bbsections 1, bb_id 2):

; BBLABELS: bb.0 (%ir-block.1, bb_id 0):
; BBLABELS: bb.1 (%ir-block.7, bb_id 1):
; BBLABELS: bb.2 (%ir-block.8, bb_id 2):
; BBLABELS: bb.3 (%ir-block.9, bb_id 3):