mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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
44 lines
866 B
YAML
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
|
|
...
|