Files
llvm-6502/test/CodeGen/MIR/basic-blocks.mir
Alex Lorenz 260366437c MIR Serialization: Serialize the list of machine basic blocks with simple attributes.
This commit implements the initial serialization of machine basic blocks in a
machine function. Only the simple, scalar MBB attributes are serialized. The 
reference to LLVM IR's basic block is preserved when that basic block has a name.

Reviewers: Duncan P. N. Exon Smith

Differential Revision: http://reviews.llvm.org/D10465


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240145 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 17:43:07 +00:00

44 lines
866 B
YAML

# RUN: llc -start-after branch-folder -stop-after branch-folder -o /dev/null %s | FileCheck %s
# This test ensures that the MIR parser parses machine functions correctly.
--- |
define i32 @foo() {
entry:
ret i32 0
}
define i32 @bar() {
start:
ret i32 0
}
...
---
# CHECK: name: foo
# CHECK: body:
# CHECK-NEXT: - name: entry
# CHECK-NEXT: alignment: 0
# CHECK-NEXT: isLandingPad: false
# CHECK-NEXT: addressTaken: false
name: foo
body:
- name: entry
...
---
# CHECK: name: bar
# CHECK: body:
# CHECK-NEXT: - name: start
# CHECK-NEXT: alignment: 4
# CHECK-NEXT: isLandingPad: false
# CHECK-NEXT: addressTaken: false
# CHECK-NEXT: - alignment: 0
# CHECK-NEXT: isLandingPad: false
# CHECK-NEXT: addressTaken: true
name: bar
body:
- name: start
alignment: 4
- addressTaken: true
...