Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RemoveDIs] Print IR with debug records by default #91724

Merged
merged 6 commits into from
Jun 14, 2024

Conversation

SLTozer
Copy link
Contributor

@SLTozer SLTozer commented May 10, 2024

This patch makes the final major change of the RemoveDIs project, changing the default IR output from debug intrinsics to debug records.

This is expected to break a large number of tests: every single one that tests for uses or declarations of debug intrinsics and does not explicitly disable writing records. There is also some collateral damage for tests that merely contains debug intrinsic declarations and test for attributes, as debug intrinsic declarations will now be deleted when writing debug records which may result in renumbering of other attributes.

Review guidance

This patch is divided into distinct sections, in the following order and comprising the following commits:

  1. NFC manual test updates in preparation for the automated test updates.
    • Pre-script fixups
  2. The functional change of the patch, which enables the printing of debug records by default.
    • Print debug records by default
  3. The automated test updates, which comprise the vast majority of changes in this patch.
    • update_test_checks.py
    • update_cc_test_checks.py
    • substitute-checks.sh
  4. Further manual test updates to fix up test errors that cannot be fixed by (or are caused by) the automated test updates.
    • Manual fixups post-update_test_checks

My recommendation is to review individual commits rather than the patch as a whole, due to the extreme size of the automated updates. The manual changes made in this patch comprise a diff of size +48, -45, roughly 0.7% of the diff size of the complete patch. Instead of reviewing the automated test updates, I would instead recommend reviewing the "Update script details" section below, which explains the automated update process and gives exact steps to reproduce my results.

Update script details

For the most part, replacing debug intrinsics with debug records is trivial string substitution; replacing FileCheck CHECK lines for debug intrinsics is a slightly more complicated string substitution. For tests that use update_test_checks.py, updating the tests is entirely automatic, but for the many debug info tests that do not use update_test_checks.py I've used a less "smart" approach. The steps to produce the test updates are as follow:

  1. Collect the list of failing lit tests into a single file, failing-tests.txt, separated by (and ending with) newlines.
  2. Use the following line to split the failing tests into tests that use update_test_checks and tests that don't:
    $ while IFS= read -r f; do grep -q "Assertions have been autogenerated by" "$f" && echo "$f" >> update-checks-tests.txt || echo "$f" >> manual-tests.txt; done < failing-tests.txt
    
  3. For the tests that use update_test_checks, run the appropriate update_test_checks script - for the updates run here, this was achieved with:
    $ xargs ./llvm/utils/update_test_checks.py --opt-binary ./build/bin/opt < update-checks-tests.txt
    $ xargs ./llvm/utils/update_cc_test_checks.py --llvm-bin ./build/bin/ < update-checks-tests.txt
    
  4. For the manual tests, I used a pair of short scripts to perform the updates. The first script is used to fetch the check prefixes in each of the failing tests:
    $ cat ./get-checks.sh
    #!/bin/bash
    
    # Always add CHECK, since it's more effort than it's worth to filter files where
    # every RUN line uses other check prefixes.
    # Then detect every instance of "check-prefix(es)=..." and add the
    # comma-separated arguments as extra checks.
    for filename in "$@"
    do
        echo "$filename,CHECK"
        allchecks=$(grep -Eo 'check-prefix(es)?[ =][A-Z0-9_,-]+' $filename | sed -E 's/.+[= ]([A-Z0-9_,-]+).*/\1/g; s/,/\n/g')
        for check in $allchecks; do
            echo "$filename,$check"
        done
    done
    
    The second script performs the work of actually updating the check-lines in each of the failing tests, with a series of simple substitution patterns:
    $ cat ./substitute-checks.sh
    #!/bin/bash
    
    file="$1"
    check="$2"
    
    # Any test that explicitly tests debug intrinsic output is not suitable to
    # update by this script.
    if grep -q "write-experimental-debuginfo=false" "$file"; then
        exit 0
    fi
    
    sed -i -E -e "
    /(#|;|\/\/).*$check[A-Z0-9_\-]*:/!b
    /DIGlobalVariableExpression/b
    /!llvm.dbg./bpostcall
    s/((((((no|must)?tail )?call.*)?void )?@)?llvm.)?dbg\.([a-z]+)/#dbg_\7/
    :postcall
    /declare #dbg_/d
    s/metadata //g
    s/metadata\{/{/g
    s/DIExpression\(([^)]*)\)\)(,( !dbg)?)?/DIExpression(\1),/
    /#dbg_/!b
    s/((\))?(,) )?!dbg (![0-9]+)/\3\4\2/
    s/((\))?(, ))?!dbg/\3/
    " "$file"
    
    Both of these scripts combined can be used on the list in manual-tests.txt as follows:
    $ cat manual-tests.txt | xargs ./get-checks.sh | sort | uniq | awk -F ',' '{ system("./substitute-checks.sh " $1 " " $2) }'
    
    These scripts deal successfully with the vast majority of checks in clang/test and llvm/test; more explanation of why I used these scripts appears below.
  5. Verify the resulting tests pass, and detect any failing tests:
    $ xargs ./build/bin/llvm-lit -q < failing-tests.txt
    ********************
    Failed Tests (5):
    LLVM :: DebugInfo/Generic/dbg-value-lower-linenos.ll
    LLVM :: Transforms/HotColdSplit/transfer-debug-info.ll
    LLVM :: Transforms/ObjCARC/basic.ll
    LLVM :: Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
    LLVM :: Transforms/SafeStack/X86/debug-loc2.ll
    
    
    Total Discovered Tests: 295
    Failed: 5 (1.69%)
    
  6. Some tests may have failed - the update scripts are deliberately not smart, and so there are cases that they will not handle. These must be manually dealt with.

What's with the update scripts?

The test scripts above are deliberately simple - they only operate on basic string substitution, for two reasons: the test update step should be a one-time process, so something clever that covers all cases would be wasted effort, and being very simple should give reassurance that nothing magical is happening here. Almost all the error cases result from check-lines which do not obviously apply to a debug intrinsic, and the difficulty of manually fixing up these cases should be fairly low.

How do I fix test failures?

The simplest way to fix a test failure is to not use the new format; if an immediate fix is needed for some set of tests, then adding the LLVM flag --write-experimental-debuginfo=false will force it to write debug intrinsics, preserving prior behaviour. This should only be a temporary fix in most cases though, as we are moving towards deprecating debug intrinsics.

The commits in which I fixed up tests are labelled "Pre-script fixups" and "Post-script fixups" in this review, for examples of changes that were made. The reason these are divided into pre- and post- is that some fixups are trivial text changes to make check-lines intelligible to the sed scripts, and some are changes that are breaking if applied to the debug intrinsic case, so should not apply before the functional change.

For anyone fixing their tests downstream, splitting your fixes into pre-script and post-script may not be necessary; for both cases, you will need to run the script, run the tests, and fix each test that fails. The benefit of splitting those fixes into pre- and post- is to give certainty that all the pre-script fixes are NFC, reducing the complexity of review; if this is not an issue for you, then it will be faster to just fix each broken check-line after running the script.

The pre-script changes are:

  • Modifying unusually-structured check-lines to be more standard:
    -  int l = 0;    // line #4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
    +  int l = 0;    // line #4: CHECK: call void @llvm.dbg.declare({{.*%l.*}}!dbg [[variable_l:![0-9]+]]
    
  • Changing some over-eager capture patterns:
    -  // CHECK: call void @llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:!.*]]
    +  // CHECK: call void @llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:![0-9]+]]
    
    In the example above, the LABEL_LOCATION variable will just capture "!10" in intrinsic form, but will capture "!10)" in record form since the debug loc now appears in a parenthesis-enclosed list.
  • Removing certain !dbg prefixes:
    -// CHECK: call {{.*}}, !dbg ![[DBG_LINE:[0-9]+]]
    +// CHECK: call void @llvm.dbg.declare({{.+}}), !dbg ![[DBG_LINE:[0-9]+]]
    
    Where !dbg !<Num> appears in debug intrinsics, we only see !<Num> in debug records; the script handles this in cases where we are clearly operating on a debug intrinsic, but when the debug location check appears on a separate check-line it must be manually updated. In some cases this will require some additional context to be added to the check to ensure that the test is still valid.
  • Changes without context:
    -  ; CHECK-SAME:               DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_stack_value))
    +  ; CHECK-SAME:               DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_stack_value)
    
    Some minor differences, like DIExpressions no longer being the final argument to a debug record, can't be fixed by the script because they appear on a line without the necessary context; these must be updated manually.
  • Fixing typos:
    -; CHECK: all void @llvm.dbg.value(metadata ptr %lsr.iv, metadata ![[MID_p:[0-9]+]],  metadata !DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value))
    +; CHECK: call void @llvm.dbg.value(metadata ptr %lsr.iv, metadata ![[MID_p:[0-9]+]],  metadata !DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value))
    
  • Ensuring that the debug intrinsic format is used where necessary:
    -; RUN: llvm-dis < %s.bc | FileCheck %s
    +; RUN: llvm-dis < %s.bc --write-experimental-debuginfo=false | FileCheck %s
    
    Some tests need to continue using the debug intrinsic format; use --write-experimental-debuginfo=false for these cases, and the update script will ignore them.

The post-script changes are generally simpler:

  • Update attributes:
    -; CHECK: attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
    
    Debug intrinsic declarations are being removed, and the resulting attributes may disappear from the output.
  • Fix script errors:
    -; CHECK: call void @llvm.random.metadata.use(ptr undef
    +; CHECK: call void @llvm.random.metadata.use(metadata ptr undef
    
    The update script errs on the side of caution, but there are some unusual cases where the patterns it expects to update are over-eager, such as the use of MetadataAsValue in functions other than debug intrinsics.

@SLTozer SLTozer self-assigned this May 10, 2024
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AArch64 backend:AMDGPU backend:X86 LTO Link time optimization (regular/full LTO or ThinLTO) coroutines C++20 coroutines llvm:ir llvm:transforms clang:openmp OpenMP related changes to Clang labels May 10, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented May 10, 2024

@llvm/pr-subscribers-mlir-llvm
@llvm/pr-subscribers-mlir
@llvm/pr-subscribers-backend-aarch64
@llvm/pr-subscribers-llvm-ir
@llvm/pr-subscribers-backend-amdgpu
@llvm/pr-subscribers-llvm-transforms
@llvm/pr-subscribers-lto

@llvm/pr-subscribers-debuginfo

Author: Stephen Tozer (SLTozer)

Changes

This patch makes the final major change of the RemoveDIs project, changing the default IR output from debug intrinsics to debug records.

This is expected to break a large number of tests: every single one that tests for uses or declarations of debug intrinsics and does not explicitly disable writing records. There is also some collateral damage for tests that merely contains debug intrinsic declarations and test for attributes, as debug intrinsic declarations will now be deleted when writing debug records which may result in renumbering of other attributes.

Review guidance

This patch is divided into distinct sections, in the following order and comprising the following commits:

  1. NFC manual test updates in preparation for the automated test updates.
    • Pre-script fixups
  2. The functional change of the patch, which enables the printing of debug records by default.
    • Print debug records by default
  3. The automated test updates, which comprise the vast majority of changes in this patch.
    • update_test_checks.py
    • update_cc_test_checks.py
    • substitute-checks.sh
  4. Further manual test updates to fix up test errors that cannot be fixed by (or are caused by) the automated test updates.
    • Manual fixups post-update_test_checks

My recommendation is to review individual commits rather than the patch as a whole, due to the extreme size of the automated updates. The manual changes made in this patch comprise a diff of size +48, -45, roughly 0.7% of the diff size of the complete patch. Instead of reviewing the automated test updates, I would instead recommend reviewing the "Update script details" section below, which explains the automated update process and gives exact steps to reproduce my results.

Update script details

For the most part, replacing debug intrinsics with debug records is trivial string substitution; replacing FileCheck CHECK lines for debug intrinsics is a slightly more complicated string substitution. For tests that use update_test_checks.py, updating the tests is entirely automatic, but for the many debug info tests that do not use update_test_checks.py I've used a less "smart" approach. The steps to produce the test updates are as follow:

  1. Collect the list of failing lit tests into a single file, failing-tests.txt, separated by (and ending with) newlines.
  2. Use the following line to split the failing tests into tests that use update_test_checks and tests that don't:
    $ while IFS= read -r f; do grep -q "Assertions have been autogenerated by" "$f" &amp;&amp; echo "$f" &gt;&gt; update-checks-tests.txt || echo "$f" &gt;&gt; manual-tests.txt; done &lt; failing-tests.txt
    
  3. For the tests that use update_test_checks, run the appropriate update_test_checks script - for the updates run here, this was achieved with:
    $ xargs ./llvm/utils/update_test_checks.py --opt-binary ./build/bin/opt &lt; update-checks-tests.txt
    $ xargs ./llvm/utils/update_cc_test_checks.py --llvm-bin ./build/bin/ &lt; update-checks-tests.txt
    
  4. For the manual tests, I used a pair of short scripts to perform the updates. The first script is used to fetch the check prefixes in each of the failing tests:
    $ cat ./get-checks.sh
    #!/bin/bash
    
    # Always add CHECK, since it's more effort than it's worth to filter files where
    # every RUN line uses other check prefixes.
    # Then detect every instance of "check-prefix(es)=..." and add the
    # comma-separated arguments as extra checks.
    for filename in "$@"
    do
        echo "$filename,CHECK"
        allchecks=$(grep -Eo 'check-prefix(es)?[ =][A-Z0-9_,-]+' $filename | sed -E 's/.+[= ]([A-Z0-9_,-]+).*/\1/g; s/,/\n/g')
        for check in $allchecks; do
            echo "$filename,$check"
        done
    done
    
    The second script performs the work of actually updating the check-lines in each of the failing tests, with a series of simple substitution patterns:
    $ cat ./substitute-checks.sh
    #!/bin/bash
    
    file="$1"
    check="$2"
    
    # Any test that explicitly tests debug intrinsic output is not suitable to
    # update by this script.
    if grep -q "write-experimental-debuginfo=false" "$file"; then
        exit 0
    fi
    
    sed -i -E -e "
    /(#|;|\/\/).*$check[A-Z0-9_\-]*:/!b
    /DIGlobalVariableExpression/b
    /!llvm.dbg./bpostcall
    s/((((((no|must)?tail )?call.*)?void )?@)?llvm.)?dbg\.([a-z]+)/#dbg_\7/
    :postcall
    /declare #dbg_/d
    s/metadata //g
    s/metadata\{/{/g
    s/DIExpression\(([^)]*)\)\)(,( !dbg)?)?/DIExpression(\1),/
    /#dbg_/!b
    s/((\))?(,) )?!dbg (![0-9]+)/\3\4\2/
    s/((\))?(, ))?!dbg/\3/
    " "$file"
    
    Both of these scripts combined can be used on the list in manual-tests.txt as follows:
    $ cat manual-tests.txt | xargs ./get-checks.sh | sort | uniq | awk -F ',' '{ system("./substitute-checks.sh " $1 " " $2) }'
    
    These scripts deal successfully with the vast majority of checks in clang/test and llvm/test; more explanation of why I used these scripts appears below.
  5. Verify the resulting tests pass, and detect any failing tests:
    $ xargs ./build/bin/llvm-lit -q &lt; failing-tests.txt
    ********************
    Failed Tests (5):
    LLVM :: DebugInfo/Generic/dbg-value-lower-linenos.ll
    LLVM :: Transforms/HotColdSplit/transfer-debug-info.ll
    LLVM :: Transforms/ObjCARC/basic.ll
    LLVM :: Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll
    LLVM :: Transforms/SafeStack/X86/debug-loc2.ll
    
    
    Total Discovered Tests: 295
    Failed: 5 (1.69%)
    
  6. Some tests may have failed - the update scripts are deliberately not smart, and so there are cases that they will not handle. These must be manually dealt with.

What's with the update scripts?

The test scripts above are deliberately simple - they only operate on basic string substitution, for two reasons: the test update step should be a one-time process, so something clever that covers all cases would be wasted effort, and being very simple should give reassurance that nothing magical is happening here. Almost all the error cases result from check-lines which do not obviously apply to a debug intrinsic, and the difficulty of manually fixing up these cases should be fairly low.

How do I fix test failures?

The simplest way to fix a test failure is to not use the new format; if an immediate fix is needed for some set of tests, then adding the LLVM flag --write-experimental-debuginfo=false will force it to write debug intrinsics, preserving prior behaviour. This should only be a temporary fix in most cases though, as we are moving towards deprecating debug intrinsics.

The commits in which I fixed up tests are labelled "Pre-script fixups" and "Post-script fixups" in this review, for examples of changes that were made. The reason these are divided into pre- and post- is that some fixups are trivial text changes to make check-lines intelligible to the sed scripts, and some are changes that are breaking if applied to the debug intrinsic case, so should not apply before the functional change. The pre-script changes are:

  • Modifying unusually-structured check-lines to be more standard:
    -  int l = 0;    // line #<!-- -->4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
    +  int l = 0;    // line #<!-- -->4: CHECK: call void @<!-- -->llvm.dbg.declare({{.*%l.*}}!dbg [[variable_l:![0-9]+]]
    
  • Changing some over-eager capture patterns:
    -  // CHECK: call void @<!-- -->llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:!.*]]
    +  // CHECK: call void @<!-- -->llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:![0-9]+]]
    
    In the example above, the LABEL_LOCATION variable will just capture "!10" in intrinsic form, but will capture "!10)" in record form since the debug loc now appears in a parenthesis-enclosed list.
  • Removing certain !dbg prefixes:
    -// CHECK: call {{.*}}, !dbg ![[DBG_LINE:[0-9]+]]
    +// CHECK: call void @<!-- -->llvm.dbg.declare({{.+}}), !dbg ![[DBG_LINE:[0-9]+]]
    
    Where !dbg !&lt;Num&gt; appears in debug intrinsics, we only see !&lt;Num&gt; in debug records; the script handles this in cases where we are clearly operating on a debug intrinsic, but when the debug location check appears on a separate check-line it must be manually updated. In some cases this will require some additional context to be added to the check to ensure that the test is still valid.
  • Changes without context:
    -  ; CHECK-SAME:               DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_stack_value))
    +  ; CHECK-SAME:               DW_OP_LLVM_convert, 32, DW_ATE_unsigned, DW_OP_stack_value)
    
    Some minor differences, like DIExpressions no longer being the final argument to a debug record, can't be fixed by the script because they appear on a line without the necessary context; these must be updated manually.
  • Fixing typos:
    -; CHECK: all void @<!-- -->llvm.dbg.value(metadata ptr %lsr.iv, metadata ![[MID_p:[0-9]+]],  metadata !DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value))
    +; CHECK: call void @<!-- -->llvm.dbg.value(metadata ptr %lsr.iv, metadata ![[MID_p:[0-9]+]],  metadata !DIExpression(DW_OP_constu, 3, DW_OP_minus, DW_OP_stack_value))
    
  • Ensuring that the debug intrinsic format is used where necessary:
    -; RUN: llvm-dis &lt; %s.bc | FileCheck %s
    +; RUN: llvm-dis &lt; %s.bc --write-experimental-debuginfo=false | FileCheck %s
    
    Some tests need to continue using the debug intrinsic format; use --write-experimental-debuginfo=false for these cases, and the update script will ignore them.

The post-script changes are generally simpler:

  • Update attributes:
    -; CHECK: attributes #<!-- -->1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
    
    Debug intrinsic declarations are being removed, and the resulting attributes may disappear from the output.
  • Fix script errors:
    -; CHECK: call void @<!-- -->llvm.random.metadata.use(ptr undef
    +; CHECK: call void @<!-- -->llvm.random.metadata.use(metadata ptr undef
    
    The update script errs on the side of caution, but there are some unusual cases where the patterns it expects to update are over-eager, such as the use of MetadataAsValue in functions other than debug intrinsics.

Patch is 2.09 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/91724.diff

343 Files Affected:

  • (modified) clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c (+2-2)
  • (modified) clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp (+16-16)
  • (modified) clang/test/CodeGen/assignment-tracking/memcpy-fragment.cpp (+3-3)
  • (modified) clang/test/CodeGen/assignment-tracking/nested-scope.cpp (+1-1)
  • (modified) clang/test/CodeGen/attr-nodebug.c (+1-1)
  • (modified) clang/test/CodeGen/debug-info-block-decl.c (+1-1)
  • (modified) clang/test/CodeGen/debug-info-block-expr.c (+5-5)
  • (modified) clang/test/CodeGen/debug-info-block-vars.c (+4-4)
  • (modified) clang/test/CodeGen/debug-info-matrix-types.c (+2-2)
  • (modified) clang/test/CodeGen/debug-info-vla.c (+2-2)
  • (modified) clang/test/CodeGen/debug-label-inline.c (+1-1)
  • (modified) clang/test/CodeGen/debug-label.c (+1-1)
  • (modified) clang/test/CodeGenCUDA/debug-info-address-class.cu (+2-2)
  • (modified) clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp (+3-3)
  • (modified) clang/test/CodeGenCXX/debug-info-nrvo.cpp (+4-4)
  • (modified) clang/test/CodeGenCXX/debug-info-range-for-var-names.cpp (+9-9)
  • (modified) clang/test/CodeGenCXX/debug-info-structured-binding-bitfield.cpp (+26-26)
  • (modified) clang/test/CodeGenCXX/debug-info-structured-binding.cpp (+5-5)
  • (modified) clang/test/CodeGenCXX/debug-info.cpp (+1-1)
  • (modified) clang/test/CodeGenCXX/linetable-eh.cpp (+3-3)
  • (modified) clang/test/CodeGenCXX/trivial_abi_debuginfo.cpp (+3-3)
  • (modified) clang/test/CodeGenObjC/2010-02-09-DbgSelf.m (+1-1)
  • (modified) clang/test/CodeGenObjC/debug-info-blocks.m (+3-3)
  • (modified) clang/test/CodeGenObjC/debug-info-nested-blocks.m (+1-1)
  • (modified) clang/test/CodeGenObjC/objc-fixed-enum.m (+4-4)
  • (modified) clang/test/CodeGenObjCXX/property-objects.mm (+2-2)
  • (modified) clang/test/CodeGenOpenCL/amdgpu-debug-info-variable-expression.cl (+13-13)
  • (modified) clang/test/CodeGenSYCL/debug-info-kernel-variables.cpp (+8-8)
  • (modified) clang/test/OpenMP/debug-info-complex-byval.cpp (+10-10)
  • (modified) clang/test/OpenMP/debug-info-openmp-array.cpp (+26-26)
  • (modified) clang/test/OpenMP/debug_private.c (+4-4)
  • (modified) clang/test/OpenMP/debug_task_shared.c (+4-4)
  • (modified) clang/test/OpenMP/debug_threadprivate_copyin.c (+5-5)
  • (modified) clang/test/OpenMP/irbuilder_nested_parallel_for.c (+831-831)
  • (modified) clang/test/OpenMP/nested_loop_codegen.cpp (+179-179)
  • (modified) clang/test/OpenMP/parallel_codegen.cpp (+135-135)
  • (modified) clang/test/OpenMP/target_parallel_debug_codegen.cpp (+335-335)
  • (modified) clang/test/OpenMP/target_parallel_for_debug_codegen.cpp (+456-456)
  • (modified) clang/test/OpenMP/target_parallel_generic_loop_codegen-3.cpp (+456-456)
  • (modified) clang/test/OpenMP/taskgroup_task_reduction_codegen.cpp (+1-1)
  • (modified) clang/test/OpenMP/threadprivate_codegen.cpp (+1896-1896)
  • (modified) llvm/lib/IR/IRPrintingPasses.cpp (+1-1)
  • (modified) llvm/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll (+1-1)
  • (modified) llvm/test/Assembler/debug-label-bitcode.ll (+1-1)
  • (modified) llvm/test/Bitcode/DIExpression-aggresult.ll (+1-1)
  • (modified) llvm/test/Bitcode/constexpr-to-instr-metadata-2.ll (+2-2)
  • (modified) llvm/test/Bitcode/constexpr-to-instr-metadata.ll (+1-1)
  • (modified) llvm/test/Bitcode/dbg-label-record-bc.ll (+1-1)
  • (modified) llvm/test/Bitcode/upgrade-dbg-addr.ll (+1-1)
  • (modified) llvm/test/Bitcode/upgrade-dbg-value.ll (+3-4)
  • (modified) llvm/test/CodeGen/AArch64/dbg-declare-swift-async.ll (+1-1)
  • (modified) llvm/test/CodeGen/AArch64/stack-tagging-dbg.ll (+2-2)
  • (modified) llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll (+11-11)
  • (modified) llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-unoptimized-debug-data.ll (+9-9)
  • (modified) llvm/test/CodeGen/AMDGPU/si-annotate-dbg-info.ll (+5-5)
  • (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-arr-pai.ll (+1-1)
  • (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-ptr-pai.ll (+1-1)
  • (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-struct-pai.ll (+1-1)
  • (modified) llvm/test/CodeGen/BPF/preserve-static-offset/load-union-pai.ll (+1-1)
  • (modified) llvm/test/CodeGen/BPF/preserve-static-offset/store-pai.ll (+1-1)
  • (modified) llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir (+2-2)
  • (modified) llvm/test/CodeGen/Generic/MIRStripDebug/dont-strip-real-debug-info.mir (+2-2)
  • (modified) llvm/test/CodeGen/X86/fast-isel-dbg-value-alloca.ll (+1-1)
  • (modified) llvm/test/CodeGen/X86/pr38763.ll (+3-3)
  • (modified) llvm/test/CodeGen/X86/select-optimize.ll (+28-28)
  • (modified) llvm/test/DebugInfo/AArch64/ir-outliner.ll (+14-10)
  • (modified) llvm/test/DebugInfo/AArch64/select-optimize-trailing-dbg-records.ll (+1-1)
  • (modified) llvm/test/DebugInfo/ARM/hardware-loop-phi-insertion.ll (+1-1)
  • (modified) llvm/test/DebugInfo/ARM/lowerbdgdeclare_vla.ll (+2-2)
  • (modified) llvm/test/DebugInfo/ARM/salvage-debug-info.ll (+1-1)
  • (modified) llvm/test/DebugInfo/ARM/sroa-complex.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/adce/no-delete.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/codegenprepare/sunk-addr.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/hwasan.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/long-double-x87.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/nullptr-declare.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/scalable-vector.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/structured-bindings.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/var-not-alloca-sized.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/declare-to-assign/vla.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/dse/dse-after-memcpyopt-merge.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten-offset.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/dse/shorten.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/inline/id.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/inline/inline-stores.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/inline/shared-alloca.ll (+3-3)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/inline/use-before-def.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/do-not-remove-redundant-dbg.ll (+3-3)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/memset.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/remove-redundant-dbg.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink-store.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/sink.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/store-new-type.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/instcombine/storemerge.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/licm/merge.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/licm/multi-exit.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/loop-deletion/dead-loop.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/loop-vectorize/remove-redundant-dbg.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/phi.ll (+8-8)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-block-alloca.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/single-store-alloca.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/mem2reg/store-to-part-of-alloca.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/memcpyopt/merge-stores.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/mldst-motion/diamond.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/optnone.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/parse-and-verify/roundtrip.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant-fwd-scan-linked.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/remove-redundant.ll (+8-8)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/salvage-value.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/empty-block.ll (+3-3)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/simplifycfg/speculated-store.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/slp-vectorizer/merge-scalars.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/after-inlining.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/arglist.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/complex.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/fail-fragment.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag-2.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/frag.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/id.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memcpy.ll (+5-5)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/memmove-to-from-same-alloca.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/remove-redundant-dbg.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/rewrite.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/split-pre-fragmented-store-2.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/split-pre-fragmented-store.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/store.ll (+6-6)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/unspecified-var-size.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/user-memcpy.ll (+8-8)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/var-sized-fragment.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-1.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/sroa/vec-2.ll (+3-3)
  • (modified) llvm/test/DebugInfo/Generic/assignment-tracking/track-assignments.ll (+20-20)
  • (modified) llvm/test/DebugInfo/Generic/dbg-value-lower-linenos.ll (+10-10)
  • (modified) llvm/test/DebugInfo/Generic/debug_value_list.ll (+4-4)
  • (modified) llvm/test/DebugInfo/Generic/empty-metadata.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/inline-alloca-ordering.ll (+1-2)
  • (modified) llvm/test/DebugInfo/Generic/inline-dbg-values.ll (+10-11)
  • (modified) llvm/test/DebugInfo/Generic/instcombine-replaced-select-with-operand.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/ipsccp-remap-assign-id.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/loop-deletion-inline-var.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/mem2reg-promote-alloca-1.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/mem2reg-promote-alloca-2.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/mem2reg-promote-alloca-3.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/pr40628.ll (+2-2)
  • (modified) llvm/test/DebugInfo/Generic/sroa-larger.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/sroa-samesize.ll (+1-1)
  • (modified) llvm/test/DebugInfo/Generic/volatile-alloca.ll (+3-3)
  • (modified) llvm/test/DebugInfo/X86/LLVM_implicit_pointer.ll (+3-3)
  • (modified) llvm/test/DebugInfo/X86/array2.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/codegenprep-addrsink.ll (+7-7)
  • (modified) llvm/test/DebugInfo/X86/codegenprep-value.ll (+2-2)
  • (modified) llvm/test/DebugInfo/X86/codegenprepare-rollback.ll (+4-4)
  • (modified) llvm/test/DebugInfo/X86/dbg-value-dropped-instcombine.ll (+2-2)
  • (modified) llvm/test/DebugInfo/X86/dead-store-elimination-marks-undef.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/formal_parameter.ll (+3-3)
  • (modified) llvm/test/DebugInfo/X86/instcombine-demanded-bits-salvage.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/instcombine-fold-cast-into-phi.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/instcombine-instrinsics.ll (+2-2)
  • (modified) llvm/test/DebugInfo/X86/licm-undef-dbg-value.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/mem2reg_fp80.ll (+2-2)
  • (modified) llvm/test/DebugInfo/X86/sroa-after-inlining.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/sroasplit-1.ll (+2-2)
  • (modified) llvm/test/DebugInfo/X86/sroasplit-2.ll (+4-4)
  • (modified) llvm/test/DebugInfo/X86/sroasplit-3.ll (+1-1)
  • (modified) llvm/test/DebugInfo/X86/sroasplit-4.ll (+4-4)
  • (modified) llvm/test/DebugInfo/X86/sroasplit-dbg-declare.ll (+4-4)
  • (modified) llvm/test/DebugInfo/duplicate_dbgvalue.ll (+1-1)
  • (modified) llvm/test/DebugInfo/instcombine-sink-latest-assignment.ll (+1-1)
  • (modified) llvm/test/DebugInfo/salvage-cast-debug-info.ll (+3-3)
  • (modified) llvm/test/DebugInfo/salvage-duplicate-values.ll (+4-4)
  • (modified) llvm/test/DebugInfo/salvage-gep.ll (+4-4)
  • (modified) llvm/test/DebugInfo/salvage-icmp.ll (+4-4)
  • (modified) llvm/test/DebugInfo/salvage-limit-expr-size.ll (+4-4)
  • (modified) llvm/test/DebugInfo/salvage-nonconst-binop.ll (+2-2)
  • (modified) llvm/test/Instrumentation/AddressSanitizer/debug_info.ll (+2-2)
  • (modified) llvm/test/Instrumentation/AddressSanitizer/local_stack_base.ll (+1-1)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll (+84-86)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/alloca-uninteresting.ll (+1-1)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll (+10-12)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/dbg-assign-tag-offset.ll (+2-2)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/dbg-declare-tag-offset.ll (+4-4)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/dbg-value-tag-offset-nopad.ll (+3-3)
  • (modified) llvm/test/Instrumentation/HWAddressSanitizer/dbg-value-tag-offset.ll (+3-3)
  • (modified) llvm/test/Linker/DbgDeclare.ll (+5-5)
  • (modified) llvm/test/Linker/debug-info-use-before-def.ll (+2-2)
  • (modified) llvm/test/Transforms/ADCE/adce-salvage-dbg-value.ll (+2-2)
  • (modified) llvm/test/Transforms/ADCE/debug-info-intrinsic.ll (+1-1)
  • (modified) llvm/test/Transforms/AggressiveInstCombine/AArch64/combine_ignore_debug.ll (+1-1)
  • (modified) llvm/test/Transforms/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll (+1-1)
  • (modified) llvm/test/Transforms/Attributor/ArgumentPromotion/pr33641_remove_arg_dbgvalue.ll (+2-4)
  • (modified) llvm/test/Transforms/BDCE/basic.ll (+1-1)
  • (modified) llvm/test/Transforms/BDCE/dbg-multipleuses.ll (+1-1)
  • (modified) llvm/test/Transforms/BDCE/pr26587.ll (+1-1)
  • (modified) llvm/test/Transforms/BDCE/pr41925.ll (+7-7)
  • (modified) llvm/test/Transforms/CallSiteSplitting/callsite-split-debug.ll (+14-14)
  • (modified) llvm/test/Transforms/CallSiteSplitting/callsite-split-preserve-debug.ll (+6-7)
  • (modified) llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll (+1-1)
  • (modified) llvm/test/Transforms/CodeGenPrepare/X86/catchpad-phi-cast.ll (+2-2)
  • (modified) llvm/test/Transforms/CodeGenPrepare/X86/cttz-ctlz.ll (+2-2)
  • (modified) llvm/test/Transforms/CodeGenPrepare/X86/select.ll (+109-27)
  • (modified) llvm/test/Transforms/CodeGenPrepare/debug-info-on-skipped-selects.ll (+1-2)
  • (modified) llvm/test/Transforms/CodeGenPrepare/sink-shift-and-trunc.ll (+1-1)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-O2.ll (+1-1)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-coro-frame.ll (+2-2)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-dbg.values-not_used_in_frame.ll (+2-2)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-dbg.values.ll (+14-14)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll (+6-6)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug-spill-dbg.declare.ll (+3-3)
  • (modified) llvm/test/Transforms/Coroutines/coro-debug.ll (+8-8)
  • (modified) llvm/test/Transforms/Coroutines/swift-async-dbg.ll (+8-8)
  • (modified) llvm/test/Transforms/DCE/basic.ll (+6-6)
  • (modified) llvm/test/Transforms/DCE/dbg-value-removal.ll (+15-15)
  • (modified) llvm/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll (+11-12)
  • (modified) llvm/test/Transforms/DeadArgElim/dbginfo-preserve-dbgloc.ll (+2-2)
  • (modified) llvm/test/Transforms/DeadArgElim/dbginfo-update-dbgval-local.ll (+2-2)
  • (modified) llvm/test/Transforms/DeadArgElim/dbginfo-update-dbgval.ll (+1-1)
  • (modified) llvm/test/Transforms/DeadStoreElimination/debuginfo.ll (+2-2)
  • (modified) llvm/test/Transforms/EarlyCSE/debug-info-undef.ll (+1-1)
  • (modified) llvm/test/Transforms/EarlyCSE/debuginfo-dce.ll (+1-1)
  • (modified) llvm/test/Transforms/GVN/load-through-select-dbg.ll (+1-1)
  • (modified) llvm/test/Transforms/GlobalOpt/deadglobal-diarglist-use.ll (+1-1)
  • (modified) llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll (+1-1)
  • (modified) llvm/test/Transforms/GlobalOpt/shrink-global-to-bool-check-debug.ll (+1-1)
  • (modified) llvm/test/Transforms/HotColdSplit/split-out-dbg-label.ll (+3-3)
  • (modified) llvm/test/Transforms/HotColdSplit/transfer-debug-info.ll (+9-9)
  • (modified) llvm/test/Transforms/IROutliner/legal-debug.ll (+14-10)
  • (modified) llvm/test/Transforms/IndVarSimplify/X86/indvar-debug-value.ll (+2-2)
  • (modified) llvm/test/Transforms/IndVarSimplify/X86/indvar-debug-value2.ll (+2-2)
  • (modified) llvm/test/Transforms/IndVarSimplify/X86/scev-phi-debug-info.ll (+1-1)
  • (modified) llvm/test/Transforms/Inline/alloca-dbgdeclare.ll (+1-1)
  • (modified) llvm/test/Transforms/Inline/inline_dbg_declare.ll (+1-1)
  • (modified) llvm/test/Transforms/Inline/local-as-metadata-undominated-use.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/alloca-cast-debuginfo.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/assume.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/cast-mul-select.ll (+37-37)
  • (modified) llvm/test/Transforms/InstCombine/cast-set-preserve-signed-dbg-val.ll (+3-3)
  • (modified) llvm/test/Transforms/InstCombine/consecutive-fences.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/dbg-scalable-store-fixed-frag.ll (+2-2)
  • (modified) llvm/test/Transforms/InstCombine/dbg-simplify-alloca-size.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo-dce.ll (+9-9)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo-dce2.ll (+2-2)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo-sink.ll (+13-13)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo-skip.ll (+2-2)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo-variables.ll (+18-18)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo.ll (+7-7)
  • (modified) llvm/test/Transforms/InstCombine/debuginfo_add.ll (+3-3)
  • (modified) llvm/test/Transforms/InstCombine/erase-dbg-values-at-dead-alloc-site.ll (+2-2)
  • (modified) llvm/test/Transforms/InstCombine/lifetime-no-null-opt.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/lifetime.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/lower-dbg-declare.ll (+3-3)
  • (modified) llvm/test/Transforms/InstCombine/pr43893.ll (+3-3)
  • (modified) llvm/test/Transforms/InstCombine/salvage-dbg-declare.ll (+1-1)
  • (modified) llvm/test/Transforms/InstCombine/sink-instruction-introduces-unnecessary-poison-value.ll (+2-2)
  • (modified) llvm/test/Transforms/InstCombine/stacksave-debuginfo.ll (+5-5)
  • (modified) llvm/test/Transforms/InstCombine/unavailable-debug.ll (+1-1)
  • (modified) llvm/test/Transforms/JumpThreading/guard-split-debuginfo.ll (+2-2)
  • (modified) llvm/test/Transforms/JumpThreading/redundant-dbg-info.ll (+3-3)
  • (modified) llvm/test/Transforms/JumpThreading/thread-debug-info.ll (+9-9)
  • (modified) llvm/test/Transforms/LCSSA/rewrite-existing-dbg-values.ll (+7-7)
diff --git a/clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c b/clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c
index 645403284b8b0..e6b7aa0af81b2 100644
--- a/clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c
+++ b/clang/test/CodeGen/2010-07-08-DeclDebugLineNo.c
@@ -1,8 +1,8 @@
 // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
 // Insure that dbg.declare lines for locals refer to correct line number records.
 void foo(void) {
-  int l = 0;    // line #4: CHECK: {{call.*llvm.dbg.declare.*%l.*\!dbg }}[[variable_l:![0-9]+]]
-  int p = 0;    // line #5: CHECK: {{call.*llvm.dbg.declare.*%p.*\!dbg }}[[variable_p:![0-9]+]]
+  int l = 0;    // line #4: CHECK: #dbg_declare({{.*%l.*}} [[variable_l:![0-9]+]]
+  int p = 0;    // line #5: CHECK: #dbg_declare({{.*%p.*}} [[variable_p:![0-9]+]]
 }
 // Now match the line number records:
 // CHECK: {{^}}[[variable_l]] = !DILocation(line: 4,
diff --git a/clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp b/clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp
index b96ad7ca6fac3..fd5a5b24920ec 100644
--- a/clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp
+++ b/clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp
@@ -20,16 +20,16 @@ Large L;
 void zeroInit() { int Z[3] = {0, 0, 0}; }
 // CHECK-LABEL: define dso_local void @_Z8zeroInitv
 // CHECK:       %Z = alloca [3 x i32], align 4, !DIAssignID ![[ID_0:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_0:[0-9]+]], metadata !DIExpression(), metadata ![[ID_0]], metadata ptr %Z, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_0:[0-9]+]], !DIExpression(), ![[ID_0]], ptr %Z, !DIExpression(),
 // CHECK:        @llvm.memset{{.*}}, !DIAssignID ![[ID_1:[0-9]+]]
-// CHECK-NEXT:   call void @llvm.dbg.assign(metadata i8 0, metadata ![[VAR_0]], metadata !DIExpression(), metadata ![[ID_1]], metadata ptr %Z, metadata !DIExpression())
+// CHECK-NEXT:   #dbg_assign(i8 0, ![[VAR_0]], !DIExpression(), ![[ID_1]], ptr %Z, !DIExpression(),
 
 void memcpyInit() { int A[4] = {0, 1, 2, 3}; }
 // CHECK-LABEL: define dso_local void @_Z10memcpyInitv
 // CHECK:       %A = alloca [4 x i32], align 16, !DIAssignID ![[ID_2:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_1:[0-9]+]], metadata !DIExpression(), metadata ![[ID_2]], metadata ptr %A, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_1:[0-9]+]], !DIExpression(), ![[ID_2]], ptr %A, !DIExpression(),
 // CHECK:        @llvm.memcpy{{.*}}, !DIAssignID ![[ID_3:[0-9]+]]
-// CHECK-NEXT:   call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_1]], metadata !DIExpression(), metadata ![[ID_3]], metadata ptr %A, metadata !DIExpression())
+// CHECK-NEXT:   #dbg_assign(i1 undef, ![[VAR_1]], !DIExpression(), ![[ID_3]], ptr %A, !DIExpression(),
 
 void setField() {
   Outer O;
@@ -37,9 +37,9 @@ void setField() {
 }
 // CHECK-LABEL: define dso_local void @_Z8setFieldv
 // CHECK:       %O = alloca %struct.Outer, align 4, !DIAssignID ![[ID_4:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_2:[0-9]+]], metadata !DIExpression(), metadata ![[ID_4]], metadata ptr %O, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_2:[0-9]+]], !DIExpression(), ![[ID_4]], ptr %O, !DIExpression(),
 // CHECK:       store i32 %0, ptr %B, align 4,{{.*}}!DIAssignID ![[ID_5:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i32 %0, metadata ![[VAR_2]], metadata !DIExpression(DW_OP_LLVM_fragment, 32, 32), metadata ![[ID_5]], metadata ptr %B, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i32 %0, ![[VAR_2]], !DIExpression(DW_OP_LLVM_fragment, 32, 32), ![[ID_5]], ptr %B, !DIExpression(),
 
 void unknownOffset() {
   int A[2];
@@ -47,7 +47,7 @@ void unknownOffset() {
 }
 // CHECK-LABEL: define dso_local void @_Z13unknownOffsetv
 // CHECK:       %A = alloca [2 x i32], align 4, !DIAssignID ![[ID_6:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_3:[0-9]+]], metadata !DIExpression(), metadata ![[ID_6]], metadata ptr %A, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_3:[0-9]+]], !DIExpression(), ![[ID_6]], ptr %A, !DIExpression(),
 
 Inner sharedAlloca() {
   if (Cond) {
@@ -60,34 +60,34 @@ Inner sharedAlloca() {
 }
 // CHECK-LABEL: define dso_local i64 @_Z12sharedAllocav
 // CHECK:       %retval = alloca %struct.Inner, align 4, !DIAssignID ![[ID_7:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_4:[0-9]+]], metadata !DIExpression(), metadata ![[ID_7]], metadata ptr %retval, metadata !DIExpression())
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_5:[0-9]+]], metadata !DIExpression(), metadata ![[ID_7]], metadata ptr %retval, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_4:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_5:[0-9]+]], !DIExpression(), ![[ID_7]], ptr %retval, !DIExpression(),
 // CHECK:     if.then:
 // CHECK:       call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_8:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_4]], metadata !DIExpression(), metadata ![[ID_8]], metadata ptr %retval, metadata !DIExpression())
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_5]], metadata !DIExpression(), metadata ![[ID_8]], metadata ptr %retval, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_4]], !DIExpression(), ![[ID_8]], ptr %retval, !DIExpression(),
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_5]], !DIExpression(), ![[ID_8]], ptr %retval, !DIExpression(),
 // CHECK:     if.else:
 // CHECK:       call void @llvm.memcpy{{.*}}, !DIAssignID ![[ID_9:[0-9]+]]
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_4]], metadata !DIExpression(), metadata ![[ID_9]], metadata ptr %retval, metadata !DIExpression())
-// CHECK-NEXT:  call void @llvm.dbg.assign(metadata i1 undef, metadata ![[VAR_5]], metadata !DIExpression(), metadata ![[ID_9]], metadata ptr %retval, metadata !DIExpression())
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_4]], !DIExpression(), ![[ID_9]], ptr %retval, !DIExpression(),
+// CHECK-NEXT:  #dbg_assign(i1 undef, ![[VAR_5]], !DIExpression(), ![[ID_9]], ptr %retval, !DIExpression(),
 
 Large sret() {
   Large X = L;
   return X;
 }
 // CHECK-LABEL: define dso_local void @_Z4sretv
-// CHECK:       llvm.dbg.declare
+// CHECK:       #dbg_declare
 
 void byval(Large X) {}
 // CHECK-LABEL: define dso_local void @_Z5byval5Large
-// CHECK:       llvm.dbg.declare
+// CHECK:       #dbg_declare
 
 LCopyCtor indirectReturn() {
   LCopyCtor R;
   return R;
 }
 // CHECK-LABEL: define dso_local void @_Z14indirectReturnv
-// CHECK:       call void @llvm.dbg.declare
+// CHECK:       #dbg_declare
 
 // CHECK-DAG: ![[VAR_0]] = !DILocalVariable(name: "Z",
 // CHECK-DAG: ![[VAR_1]] = !DILocalVariable(name: "A",
diff --git a/clang/test/CodeGen/assignment-tracking/memcpy-fragment.cpp b/clang/test/CodeGen/assignment-tracking/memcpy-fragment.cpp
index 126bc8f54eb43..85ec68066199d 100644
--- a/clang/test/CodeGen/assignment-tracking/memcpy-fragment.cpp
+++ b/clang/test/CodeGen/assignment-tracking/memcpy-fragment.cpp
@@ -23,7 +23,7 @@ void fragmentWhole()
  __builtin_memcpy(&dest.ch, &src, sizeof(char));
 }
 // CHECK: call void @llvm.memcpy{{.+}}, !DIAssignID ![[memberID:[0-9]+]]
-// CHECK-NEXT: call void @llvm.dbg.assign(metadata{{.*}}undef, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_LLVM_fragment, 32, 8), metadata ![[memberID]], metadata ptr %ch, metadata !DIExpression())
+// CHECK-NEXT: #dbg_assign({{.*}}undef, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 32, 8), ![[memberID]], ptr %ch, !DIExpression(),
 
 // Write starting at a field and overlapping part of another.
 void fragmentWholeToPartial()
@@ -38,7 +38,7 @@ void fragmentWholeToPartial()
  __builtin_memcpy(&dest.num1, &src, 5);
 }
 // CHECK: call void @llvm.memcpy{{.+}}, !DIAssignID ![[exceed:[0-9]+]]
-// CHECK-NEXT: call void @llvm.dbg.assign(metadata{{.*}}undef, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_LLVM_fragment, 0, 40), metadata ![[exceed]], metadata ptr %num1, metadata !DIExpression())
+// CHECK-NEXT: #dbg_assign({{.*}}undef, !{{[0-9]+}}, !DIExpression(DW_OP_LLVM_fragment, 0, 40), ![[exceed]], ptr %num1, !DIExpression(),
 
 // Write starting between fields.
 void fragmentPartialToWhole()
@@ -54,4 +54,4 @@ void fragmentPartialToWhole()
  __builtin_memcpy((char*)&(dest.num2) + 3, &src, 5);
 }
 // CHECK: call void @llvm.memcpy{{.+}}, !DIAssignID ![[addendID:[0-9]+]]
-// CHECK-NEXT: call void @llvm.dbg.assign(metadata{{.*}}undef, metadata !{{.*}}, metadata !DIExpression(DW_OP_LLVM_fragment, 56, 40), metadata ![[addendID]], metadata ptr %add.ptr, metadata !DIExpression())
+// CHECK-NEXT: #dbg_assign({{.*}}undef, !{{.*}}, !DIExpression(DW_OP_LLVM_fragment, 56, 40), ![[addendID]], ptr %add.ptr, !DIExpression(),
diff --git a/clang/test/CodeGen/assignment-tracking/nested-scope.cpp b/clang/test/CodeGen/assignment-tracking/nested-scope.cpp
index d94e42a139c1c..7d918821b3e30 100644
--- a/clang/test/CodeGen/assignment-tracking/nested-scope.cpp
+++ b/clang/test/CodeGen/assignment-tracking/nested-scope.cpp
@@ -6,7 +6,7 @@
 // Check that dbg.assign intrinsics get a !dbg with with the same scope as
 // their variable.
 
-// CHECK: call void @llvm.dbg.assign({{.+}}, metadata [[local:![0-9]+]], {{.+}}, {{.+}}, {{.+}}), !dbg [[dbg:![0-9]+]]
+// CHECK: #dbg_assign({{.+}}, [[local:![0-9]+]], {{.+}}, {{.+}}, {{.+}},  [[dbg:![0-9]+]]
 // CHECK-DAG: [[local]] = !DILocalVariable(name: "local", scope: [[scope:![0-9]+]],
 // CHECK-DAG: [[dbg]] = !DILocation({{.+}}, scope: [[scope]])
 // CHECK-DAG: [[scope]] = distinct !DILexicalBlock
diff --git a/clang/test/CodeGen/attr-nodebug.c b/clang/test/CodeGen/attr-nodebug.c
index fde0c912b16dc..75b4089408fcb 100644
--- a/clang/test/CodeGen/attr-nodebug.c
+++ b/clang/test/CodeGen/attr-nodebug.c
@@ -21,7 +21,7 @@ void t2(void)
 
 // Verify those things do occur normally.
 // CHECK-LABEL: @t2
-// CHECK:       call{{.*}}llvm.dbg
+// CHECK:       #dbg_declare
 // CHECK:       !dbg
 // CHECK:       }
 
diff --git a/clang/test/CodeGen/debug-info-block-decl.c b/clang/test/CodeGen/debug-info-block-decl.c
index 8db13c377ede2..6e95ecc54fd5a 100644
--- a/clang/test/CodeGen/debug-info-block-decl.c
+++ b/clang/test/CodeGen/debug-info-block-decl.c
@@ -4,7 +4,7 @@
 // CHECK: define{{.*}}@main()
 // CHECK: store {{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]]
 // CHECK: define {{.*}} @__main_block_invoke
-// CHECK: , !dbg ![[BLOCK_ENTRY:[0-9]+]]
+// CHECK: , ![[BLOCK_ENTRY:[0-9]+]])
 
 int main(void)
 {
diff --git a/clang/test/CodeGen/debug-info-block-expr.c b/clang/test/CodeGen/debug-info-block-expr.c
index 6ca8a826cacfd..712158f271522 100644
--- a/clang/test/CodeGen/debug-info-block-expr.c
+++ b/clang/test/CodeGen/debug-info-block-expr.c
@@ -10,7 +10,7 @@ void noEscapeFunc(__attribute__((noescape)) BlockTy);
 // 'noescape') blocks.
 void test_escape_func(void) {
 // CHECK-LABEL: void @test_escape_func
-// CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[ESCAPE_VAR:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
+// CHECK: #dbg_declare({{.*}}![[ESCAPE_VAR:[0-9]+]], !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
   __block int escape_var;
 // Blocks in dead code branches still capture __block variables.
 #ifdef DEAD_CODE
@@ -22,7 +22,7 @@ void test_escape_func(void) {
 // Verify that the desired DIExpression are generated for noescape blocks.
 void test_noescape_func(void) {
 // CHECK-LABEL: void @test_noescape_func
-// CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[NOESCAPE_VAR:[0-9]+]], metadata !DIExpression())
+// CHECK: #dbg_declare({{.*}}![[NOESCAPE_VAR:[0-9]+]], !DIExpression(),
   __block int noescape_var;
   noEscapeFunc(^{ (void)noescape_var; });
 }
@@ -30,11 +30,11 @@ void test_noescape_func(void) {
 // Verify that the desired DIExpression are generated for blocks.
 void test_local_block(void) {
 // CHECK-LABEL: void @test_local_block
-// CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[BLOCK_VAR:[0-9]+]], metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
+// CHECK: #dbg_declare({{.*}}![[BLOCK_VAR:[0-9]+]], !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
   __block int block_var;
 
 // CHECK-LABEL: @__test_local_block_block_invoke
-// CHECK: call void @llvm.dbg.declare({{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
+// CHECK: #dbg_declare({{.*}}!DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}, DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}){{.*}})
   ^ { block_var = 1; }();
 }
 
@@ -42,7 +42,7 @@ void test_local_block(void) {
 // in any block.
 void test_unused(void) {
 // CHECK-LABEL: void @test_unused
-// CHECK: call void @llvm.dbg.declare({{.*}}metadata ![[UNUSED_VAR:[0-9]+]], metadata !DIExpression())
+// CHECK: #dbg_declare({{.*}}![[UNUSED_VAR:[0-9]+]], !DIExpression(),
   __block int unused_var;
 // Use i (not inside a block).
   ++unused_var;
diff --git a/clang/test/CodeGen/debug-info-block-vars.c b/clang/test/CodeGen/debug-info-block-vars.c
index 4e00721470606..90d1d4b42223c 100644
--- a/clang/test/CodeGen/debug-info-block-vars.c
+++ b/clang/test/CodeGen/debug-info-block-vars.c
@@ -8,14 +8,14 @@
 // CHECK: %.block_descriptor.addr = alloca ptr, align 8
 // CHECK: %block.addr = alloca ptr, align 8
 // CHECK: store ptr %.block_descriptor, ptr %.block_descriptor.addr, align 8
-// CHECK: call void @llvm.dbg.declare(metadata ptr %.block_descriptor.addr,
-// CHECK-SAME:                        metadata !DIExpression())
+// CHECK: #dbg_declare(ptr %.block_descriptor.addr,
+// CHECK-SAME:                        !DIExpression(),
 // CHECK-OPT-NOT: alloca
 // Since the block address is not used anywhere in this function,
 // the optimizer (DeadArgElim) has replaced all the false uses
 // (i.e., metadata users) with poison.
-// CHECK-OPT: call void @llvm.dbg.value(metadata ptr poison,
-// CHECK-OPT-SAME:                      metadata !DIExpression())
+// CHECK-OPT: #dbg_value(ptr poison,
+// CHECK-OPT-SAME:                      !DIExpression(),
 void f(void) {
   a(^{
     b();
diff --git a/clang/test/CodeGen/debug-info-matrix-types.c b/clang/test/CodeGen/debug-info-matrix-types.c
index bc0a70a9ec4fa..c16e35e8d33da 100644
--- a/clang/test/CodeGen/debug-info-matrix-types.c
+++ b/clang/test/CodeGen/debug-info-matrix-types.c
@@ -3,8 +3,8 @@
 typedef double dx2x3_t __attribute__((matrix_type(2, 3)));
 
 void load_store_double(dx2x3_t *a, dx2x3_t *b) {
-  // CHECK-DAG:  @llvm.dbg.declare(metadata ptr %a.addr, metadata [[EXPR_A:![0-9]+]]
-  // CHECK-DAG:  @llvm.dbg.declare(metadata ptr %b.addr, metadata [[EXPR_B:![0-9]+]]
+  // CHECK-DAG:  #dbg_declare(ptr %a.addr, [[EXPR_A:![0-9]+]]
+  // CHECK-DAG:  #dbg_declare(ptr %b.addr, [[EXPR_B:![0-9]+]]
   // CHECK: [[PTR_TY:![0-9]+]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: [[TYPEDEF:![0-9]+]], size: 64)
   // CHECK: [[TYPEDEF]] = !DIDerivedType(tag: DW_TAG_typedef, name: "dx2x3_t", {{.+}} baseType: [[MATRIX_TY:![0-9]+]])
   // CHECK: [[MATRIX_TY]] = !DICompositeType(tag: DW_TAG_array_type, baseType: [[ELT_TY:![0-9]+]], size: 384, elements: [[ELEMENTS:![0-9]+]])
diff --git a/clang/test/CodeGen/debug-info-vla.c b/clang/test/CodeGen/debug-info-vla.c
index 22b3930dfc88c..e9494111d207f 100644
--- a/clang/test/CodeGen/debug-info-vla.c
+++ b/clang/test/CodeGen/debug-info-vla.c
@@ -2,8 +2,8 @@
 
 void testVLAwithSize(int s)
 {
-// CHECK-DAG: dbg.declare({{.*}} %__vla_expr0, metadata ![[VLAEXPR:[0-9]+]]
-// CHECK-DAG: dbg.declare({{.*}} %vla, metadata ![[VAR:[0-9]+]]
+// CHECK-DAG: #dbg_declare({{.*}} %__vla_expr0, ![[VLAEXPR:[0-9]+]]
+// CHECK-DAG: #dbg_declare({{.*}} %vla, ![[VAR:[0-9]+]]
 // CHECK-DAG: ![[VLAEXPR]] = !DILocalVariable(name: "__vla_expr0", {{.*}} flags: DIFlagArtificial
 // CHECK-DAG: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]]
 // CHECK-DAG: !DISubrange(count: ![[VLAEXPR]])
diff --git a/clang/test/CodeGen/debug-label-inline.c b/clang/test/CodeGen/debug-label-inline.c
index c0b089aad8eb9..972a32b5af32d 100644
--- a/clang/test/CodeGen/debug-label-inline.c
+++ b/clang/test/CodeGen/debug-label-inline.c
@@ -16,7 +16,7 @@ int f2(void) {
   int result;
 
   result = f1(ga, gb);
-  // CHECK: call void @llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:!.*]]
+  // CHECK: #dbg_label([[LABEL_METADATA:!.*]],  [[LABEL_LOCATION:![0-9]+]]
 
   return result;
 }
diff --git a/clang/test/CodeGen/debug-label.c b/clang/test/CodeGen/debug-label.c
index 179132ecd6f0a..662b1a7dd2062 100644
--- a/clang/test/CodeGen/debug-label.c
+++ b/clang/test/CodeGen/debug-label.c
@@ -7,7 +7,7 @@ int f1(int a, int b) {
   int sum;
 
 top:
-  // CHECK: call void @llvm.dbg.label(metadata [[LABEL_METADATA:!.*]]), !dbg [[LABEL_LOCATION:!.*]]
+  // CHECK: #dbg_label([[LABEL_METADATA:!.*]],  [[LABEL_LOCATION:![0-9]+]]
   sum = a + b;
   return sum;
 }
diff --git a/clang/test/CodeGenCUDA/debug-info-address-class.cu b/clang/test/CodeGenCUDA/debug-info-address-class.cu
index 5e0f775cbe9e3..876d2de31664a 100644
--- a/clang/test/CodeGenCUDA/debug-info-address-class.cu
+++ b/clang/test/CodeGenCUDA/debug-info-address-class.cu
@@ -14,12 +14,12 @@ __device__ __constant__ int FileVar2;
 
 __device__ void kernel1(
     // CHECK-DAG: ![[ARG:[0-9]+]] = !DILocalVariable(name: "Arg", arg: {{[0-9]+}}, scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-    // CHECK-DAG: call void @llvm.dbg.declare(metadata ptr {{.*}}, metadata ![[ARG]], metadata !DIExpression()), !dbg !{{[0-9]+}}
+    // CHECK-DAG: #dbg_declare(ptr {{.*}}, ![[ARG]], !DIExpression(), !{{[0-9]+}}
     int Arg) {
     // CHECK-DAG: ![[FUNCVAR0:[0-9]+]] = distinct !DIGlobalVariable(name: "FuncVar0", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: true, isDefinition: true)
     // CHECK-DAG: !DIGlobalVariableExpression(var: ![[FUNCVAR0]], expr: !DIExpression(DW_OP_constu, 8, DW_OP_swap, DW_OP_xderef))
   __shared__ int FuncVar0;
   // CHECK-DAG: ![[FUNCVAR1:[0-9]+]] = !DILocalVariable(name: "FuncVar1", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}})
-  // CHECK-DAG: call void @llvm.dbg.declare(metadata ptr {{.*}}, metadata ![[FUNCVAR1]], metadata !DIExpression()), !dbg !{{[0-9]+}}
+  // CHECK-DAG: #dbg_declare(ptr {{.*}}, ![[FUNCVAR1]], !DIExpression(), !{{[0-9]+}}
   int FuncVar1;
 }
diff --git a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
index 78b99f86ee292..7918387edc79a 100644
--- a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
+++ b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
@@ -10,10 +10,10 @@ struct B : A {
 A::A(int i, ...) {}
 // CHECK: define{{.*}} void @{{.*}}foo
 // CHECK-NOT: ret void
-// CHECK: call void @llvm.dbg.declare
+// CHECK: #dbg_declare
 // CHECK-NOT: ret void
-// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[^,]+}},
-// CHECK-SAME: metadata ![[THIS:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC:[0-9]+]]
+// CHECK: #dbg_declare(ptr %{{[^,]+}},
+// CHECK-SAME: ![[THIS:[0-9]+]], !DIExpression(), ![[LOC:[0-9]+]]
 // CHECK: ret void, !dbg ![[NOINL:[0-9]+]]
 // CHECK: ![[FOO:.*]] = distinct !DISubprogram(name: "foo"
 // CHECK-DAG: ![[A:.*]] = distinct !DISubprogram(name: "A", linkageName: "_ZN1BCI11AEiz"
diff --git a/clang/test/CodeGenCXX/debug-info-nrvo.cpp b/clang/test/CodeGenCXX/debug-info-nrvo.cpp
index 6916207b8806a..b36e371910140 100644
--- a/clang/test/CodeGenCXX/debug-info-nrvo.cpp
+++ b/clang/test/CodeGenCXX/debug-info-nrvo.cpp
@@ -27,9 +27,9 @@ int main() {
 // stored in the return register.
 
 // CHECK: %[[RESULT:.*]] = alloca ptr, align 8
-// CHECK: call void @llvm.dbg.declare(metadata ptr %[[RESULT]],
-// CHECK-SAME: metadata !DIExpression(DW_OP_deref)
+// CHECK: #dbg_declare(ptr %[[RESULT]],
+// CHECK-SAME: !DIExpression(DW_...
[truncated]

Copy link
Member

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, your process looks good to me! Thanks for working on this and including such a detailed description. This will surely aid downstream maintainers. 😄

There's one part I did not fully understand. How did you identify the "pre-script fixups"? What's the importance of those changes? I did not seen any mention of that in your PR description.

@SLTozer
Copy link
Contributor Author

SLTozer commented May 13, 2024

There's one part I did not fully understand. How did you identify the "pre-script fixups"? What's the importance of those changes? I did not seen any mention of that in your PR description.

Good question, I'll add my answer to the main description: The pre-script fixups were determined post-script; so I ran the script, looked at the tests that still failed, and examined why - in most cases this isn't hard, because the problem CHECK is the one that fails the test. The pre-script fixups change existing patterns so that the script can handle them correctly, while the post-script fixups cover cases that the script can't fix or otherwise mishandles. In both cases we need to run the script first to identify the problems and manually fixup the check lines, and for a downstream user it may be easier to skip the pre-script stuff and just fix all broken checks manually after the script makes its best effort; my splitting of the pre-script modifications was more to ensure that as much of this review is automated as possible, rather than a necessary step.

Copy link
Member

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying the pre-script fixes. With that resolved, this looks good to me.

@SLTozer
Copy link
Contributor Author

SLTozer commented May 13, 2024

Thanks for clarifying the pre-script fixes. With that resolved, this looks good to me.

TYVM for the LGTM! I'll leave the review up for a bit in case anyone has anything further to add (also there will necessarily be a rebase before landing, as by the nature of this patch there will be a lot of test interference!)

SLTozer added a commit that referenced this pull request Jun 10, 2024
…updates (#91725)

Related review: #91724

This patch updates the RemoveDIs migration document to include details
on the textual IR changes, including steps to update any downstream lit
tests accordingly. These steps are the same as those used to update the
lit tests in the LLVM/Clang lit tests, as detailed in the review linked
above.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Jun 12, 2024
…updates (llvm#91725)

Related review: llvm#91724

This patch updates the RemoveDIs migration document to include details
on the textual IR changes, including steps to update any downstream lit
tests accordingly. These steps are the same as those used to update the
lit tests in the LLVM/Clang lit tests, as detailed in the review linked
above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 backend:AMDGPU backend:X86 clang:openmp OpenMP related changes to Clang clang Clang issues not falling into any other category coroutines C++20 coroutines debuginfo llvm:ir llvm:transforms LTO Link time optimization (regular/full LTO or ThinLTO) mlir:llvm mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants