-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YamlMF] Serialize EntryValueObjects
This commit implements the serialization and deserialization of the Machine Function's EntryValueObjects. Depends on D149879, D149778 Differential Revision: https://reviews.llvm.org/D149880
- Loading branch information
1 parent
30093d6
commit 33b69b9
Showing
7 changed files
with
112 additions
and
1 deletion.
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
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,39 @@ | ||
# RUN: llc -mtriple=aarch64 -run-pass none -o - %s | FileCheck %s | ||
|
||
# This test ensures that the MIR parser parses machine entry_value properties | ||
# correctly. | ||
|
||
--- | | ||
|
||
define void @foo(ptr swiftasync %arg) !dbg !4 { | ||
call void @llvm.dbg.declare(metadata ptr %arg, metadata !9, metadata !DIExpression(DW_OP_LLVM_entry_value, 1)), !dbg !10 | ||
ret void | ||
} | ||
|
||
declare void @llvm.dbg.declare(metadata, metadata, metadata) | ||
!llvm.module.flags = !{!0, !1} | ||
!llvm.dbg.cu = !{!2} | ||
!0 = !{i32 7, !"Dwarf Version", i32 4} | ||
!1 = !{i32 2, !"Debug Info Version", i32 3} | ||
!2 = distinct !DICompileUnit(language: DW_LANG_Swift, file: !3, runtimeVersion: 0, emissionKind: FullDebug) | ||
!3 = !DIFile(filename: "blah", directory: "") | ||
!4 = distinct !DISubprogram(linkageName: "foo", scope: null, file: !3, type: !5, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !6) | ||
!5 = !DISubroutineType(types: null) | ||
!6 = !{!7, !9} | ||
!7 = !DILocalVariable(name: "k1", scope: !4, file: !3, line: 7, type: !8) | ||
!8 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Klass") | ||
!9 = !DILocalVariable(name: "k2", scope: !4, file: !3, line: 7, type: !8) | ||
!10 = !DILocation(line: 6, scope: !4) | ||
|
||
... | ||
--- | ||
name: foo | ||
entry_values: | ||
- { entry-value-register: '$x22', debug-info-variable: '!9', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1)', | ||
debug-info-location: '!10' } | ||
# CHECK: entry_values: | ||
# CHECK: - { entry-value-register: '$x22', debug-info-variable: '![[#]]', debug-info-expression: '!DIExpression(DW_OP_LLVM_entry_value, 1)', | ||
# CHECK: debug-info-location: '![[#]]' } | ||
body: | | ||
bb.1: | ||
... |
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