Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIR Serialization: Serialize the list of machine basic blocks with si…
…mple 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 llvm-svn: 240145
- Loading branch information
Showing
4 changed files
with
124 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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 | ||
... |