summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp
AgeCommit message (Collapse)Author
2025-03-06[Assignment Tracking] Replace `undef` debug info with `poison` (#129755)Pedro Lobo
`undef` debug info can be replaced with `poison` debug info.
2024-06-14 [RemoveDIs] Print IR with debug records by default (#91724)Stephen Tozer
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. If this patch has broken your downstream tests (or upstream tests on a configuration I wasn't able to run): 1. If you need to immediately unblock a build, pass `--write-experimental-debuginfo=false` to LLVM's option processing for all failing tests (remember to use `-mllvm` for clang/flang to forward arguments to LLVM). 2. For most test failures, the changes are trivial and mechanical, enough that they can be done by script; see the migration guide for a guide on how to do this: https://llvm.org/docs/RemoveDIsDebugInfo.html#test-updates 3. If any tests fail for reasons other than FileCheck check lines that need updating, such as assertion failures, that is most likely a real bug with this patch and should be reported as such. For more information, see the recent PSA: https://discourse.llvm.org/t/psa-ir-output-changing-from-debug-intrinsics-to-debug-records/79578
2023-03-29[Assignment Tracking] Follow up for D147129 - fix broken clang testsOCHyams
D147129 causes the assignment tracking pass to skip optnone functions, which ends up overriding the "-fexperimental-assignment-tracking=forced" option at O0. Add -disable-O0-optnone to the tests so that optnone doesn't interfere. Buildbot example: https://lab.llvm.org/buildbot/#/builders/216/builds/18986
2023-03-29[Assignment Tracking] Give -fexperimental-assignment-tracking flag 3 optionsOCHyams
Without this patch assignment tracking is enabled with `-fexperimental-assignment-tracking` and disabled with `-fno-experimental-assignment-tracking` (default). This patch removes the `-fno-` version and changes `-fexperimental-assignment-tracking` to take 3 values: `enabled`, `disabled` (default), and `forced`. `clang -Xclang -fexperimental-assignment-tracking=enabled` enables the feature if some other conditions are met and `=forced` enables it without any further checks. If `enabled` is specified the feature will remain disabled if any of the following are true: it's an LTO or ThinLTO build, optimisations are not enabled, or lldb debugger tuning has been specified. See this short RFC for more info: https://discourse.llvm.org/t/rfc-enable-assignment-tracking/69399 Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D146615
2022-11-09Reapply: [Assignment Tracking][7/*] Add assignment tracking functionality to ↵OCHyams
clang Reverted in 98fa95492f3bbd5befdeb36c88a3ac5ef2740b4e. The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir This patch plumbs the AssignmentTrackingPass (AKA declare-to-assign), added in the previous patch in this set, into the optimisation pipeline from clang. clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp is the main test for this patch. Note: while clang (with the help of the declare-to-assign pass) can now emit Assignment Tracking metadata, the llvm middle and back ends don't yet understand it. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D132226
2022-11-08Revert "[Assignment Tracking][7/*] Add assignment tracking functionality to ↵OCHyams
clang" This reverts commit 28f9636edd7d4e5f3eba1e3d0d37ec53d616481f. Bot failure: https://lab.llvm.org/buildbot/#/builders/109/builds/50251
2022-11-08[Assignment Tracking][7/*] Add assignment tracking functionality to clangOCHyams
The Assignment Tracking debug-info feature is outlined in this RFC: https://discourse.llvm.org/t/ rfc-assignment-tracking-a-better-way-of-specifying-variable-locations-in-ir This patch plumbs the AssignmentTrackingPass (AKA declare-to-assign), added in the previous patch in this set, into the optimisation pipeline from clang. clang/test/CodeGen/assignment-tracking/assignment-tracking.cpp is the main test for this patch. Note: while clang (with the help of the declare-to-assign pass) can now emit Assignment Tracking metadata, the llvm middle and back ends don't yet understand it. Reviewed By: jmorse Differential Revision: https://reviews.llvm.org/D132226