diff options
author | Orlando Cazalet-Hyams <orlando.hyams@sony.com> | 2025-06-30 08:01:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-30 08:01:55 +0100 |
commit | 140e1894f245896752d06a7f5c405a465b492e73 (patch) | |
tree | c822251b6651cca627b73698e566ae516ff3e33d /llvm/unittests/Transforms/Utils/CloningTest.cpp | |
parent | 629126ed44bd3ce5b6f476459c805be4e4e0c2ca (diff) | |
download | llvm-140e1894f245896752d06a7f5c405a465b492e73.zip llvm-140e1894f245896752d06a7f5c405a465b492e73.tar.gz llvm-140e1894f245896752d06a7f5c405a465b492e73.tar.bz2 |
[KeyInstr] Add DISubprogram::keyInstructions bit (#144107)
Patch 1/4 adding bitcode support.
Store whether or not a function is using Key Instructions in its DISubprogram so
that we don't need to rely on the -mllvm flag -dwarf-use-key-instructions to
determine whether or not to interpret Key Instructions metadata to decide
is_stmt placement at DWARF emission time. This makes bitcode support simple and
enables well defined mixing of non-key-instructions and key-instructions
functions in an LTO context.
This patch adds the bit (using DISubprogram::SubclassData1).
PR 144104 and 144103 use it during DWARF emission.
PR 44102 adds bitcode
support.
See pull request for overview of alternative attempts.
Diffstat (limited to 'llvm/unittests/Transforms/Utils/CloningTest.cpp')
-rw-r--r-- | llvm/unittests/Transforms/Utils/CloningTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/unittests/Transforms/Utils/CloningTest.cpp b/llvm/unittests/Transforms/Utils/CloningTest.cpp index 09b32bf..b8b0357 100644 --- a/llvm/unittests/Transforms/Utils/CloningTest.cpp +++ b/llvm/unittests/Transforms/Utils/CloningTest.cpp @@ -1192,8 +1192,8 @@ TEST_F(CloneInstruction, cloneKeyInstructions) { !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1) !1 = !DIFile(filename: "test.cpp", directory: "") !2 = !{i32 1, !"Debug Info Version", i32 3} - !3 = distinct !DISubprogram(name: "test", scope: !0, unit: !0) - !4 = distinct !DISubprogram(name: "inlined", scope: !0, unit: !0, retainedNodes: !{!5}) + !3 = distinct !DISubprogram(name: "test", scope: !0, unit: !0, keyInstructions: true) + !4 = distinct !DISubprogram(name: "inlined", scope: !0, unit: !0, retainedNodes: !{!5}, keyInstructions: true) !5 = !DILocalVariable(name: "awaitables", scope: !4) !6 = !DILocation(line: 1, scope: !4, inlinedAt: !8, atomGroup: 1, atomRank: 1) !7 = !DILocation(line: 2, scope: !3, atomGroup: 1, atomRank: 1) |