Commit Graph
25 Commits
Author SHA1 Message Date
OCHyams de6da6ad55 Reapply D146987 "[Assignment Tracking] Enable by default"
See https://discourse.llvm.org/t/rfc-enable-assignment-tracking/69399

This sets the -Xclang -fexperimental-assignment-tracking flag to the value
enabled which means it will be enabled so long as none of the following are
true: it's an LTO build, LLDB debugger tuning has been specified, or it's an O0
build (no work is done in any case if -g is not specified or -gmlt is used).

This reverts commit 9e7f14a821 which reverts
https://reviews.llvm.org/D146987
2023-06-13 12:43:46 +01:00
Fangrui Song 9e7f14a821 Revert "Reapply D146987 "[Assignment Tracking] Enable by default""
This reverts commit 8dec295af0.

See https://github.com/llvm/llvm-project/issues/62838
2023-05-22 08:53:15 -07:00
OCHyams 8dec295af0 Reapply D146987 "[Assignment Tracking] Enable by default"
See https://discourse.llvm.org/t/rfc-enable-assignment-tracking/69399

This sets the -Xclang -fexperimental-assignment-tracking flag to the value
enabled which means it will be enabled so long as none of the following are
true: it's an LTO build, LLDB debugger tuning has been specified, or it's an O0
build (no work is done in any case if -g is not specified or -gmlt is used).

This reverts commit 0ba922f600 which reverts
https://reviews.llvm.org/D146987
2023-04-28 11:34:53 +01:00
Carlos Alberto Enciso 0ba922f600 Revert "Reapply D146987 "[Assignment Tracking] Enable by default""
This reverts commit b74aeaccba.
Note: The author (Orlando) asked to revert this commit.
2023-04-21 09:11:40 +01:00
OCHyams b74aeaccba Reapply D146987 "[Assignment Tracking] Enable by default"
See https://discourse.llvm.org/t/rfc-enable-assignment-tracking/69399

This sets the -Xclang -fexperimental-assignment-tracking flag to the value
enabled which means it will be enabled so long as none of the following are
true: it's an LTO build, LLDB debugger tuning has been specified, or it's an O0
build (no work is done in any case if -g is not specified or -gmlt is used).

This reverts commit a65ca4546b which reverts
https://reviews.llvm.org/D146987
2023-04-20 15:08:01 +01:00
OCHyams a65ca4546b Revert D146987 "[Assignment Tracking] Enable by default"
This reverts commit 89d27854ec.

See https://reviews.llvm.org/D146987 for issues.
2023-04-19 19:16:40 +01:00
OCHyams 89d27854ec Reapply D146987 "[Assignment Tracking] Enable by default"
This reverts commit 7674ae7231 which
reverts D146987.

See https://reviews.llvm.org/D146987 for issues.
2023-04-19 14:15:58 +01:00
OCHyams 7674ae7231 Revert D146987 "[Assignment Tracking] Enable by default"
This reverts commit 107b307bd6 due
to build errors in a parent commit fca3e8e024
2023-04-19 10:03:32 +01:00
OCHyams 107b307bd6 Reapply D146987 "[Assignment Tracking] Enable by default"
This reverts commit efc8b52cbd
which reverts D146987.

See https://reviews.llvm.org/D146987 for issues.
2023-04-19 09:32:09 +01:00
Fangrui Song efc8b52cbd Revert D146987 "[Assignment Tracking] Enable by default"
This reverts commit 3820e9a2b2.

See https://reviews.llvm.org/D146987 for issues.
2023-04-12 15:01:04 -07:00
OCHyams 3820e9a2b2 Reapply (4) "[Assignment Tracking] Enable by default"
Re-land D146987.

This reverts commit 8af575657b
which reverts D146987.
2023-04-12 12:35:17 +01:00
OCHyams 8af575657b Revert (4) "[Assignment Tracking] Enable by default"
This reverts commit a0525f09ac which
lands D146987.

Buildbot: https://lab.llvm.org/buildbot/#/builders/70/builds/36214
2023-04-11 22:25:16 +01:00
OCHyams a0525f09ac Reapply (3) "[Assignment Tracking] Enable by default"
Re-land D146987.

This reverts commit 4f1954ed67 which
reverts D146987.
2023-04-11 21:15:03 +01:00
OCHyams 4f1954ed67 Revert (3) "[Assignment Tracking] Enable by default"
Revert D146987.

This reverts commit f11e1475c9 which
reapplies D146987.

Buildbot: https://lab.llvm.org/buildbot/#/builders/70/builds/36103
2023-04-09 11:21:55 +01:00
OCHyams f11e1475c9 Reapply (2) "[Assignment Tracking] Enable by default"
Re-land D146987.

This reverts commit 64fba207a6
which reverts D146987.
2023-04-09 09:59:26 +01:00
OCHyams 64fba207a6 Revert (2) "[Assignment Tracking] Enable by default"
Revert D146987 for the 2nd time.

This reverts commit 91a0740474

Buildbot: https://lab.llvm.org/buildbot/#/builders/70/builds/36007
2023-04-06 16:32:58 +01:00
OCHyams 91a0740474 Reapply "[Assignment Tracking] Enable by default"
Re-land D146987.

This reverts commit 43825d1931 (revert)
which reverts aa32490bfe (original commit).
2023-04-06 15:29:18 +01:00
Haowei Wu 43825d1931 Revert "[Assignment Tracking] Enable by default"
This reverts commit aa32490bfe, which
breaks llvm runtimes builds on armv7 linux.
2023-03-31 11:27:18 -07:00
OCHyams aa32490bfe [Assignment Tracking] Enable by default
See https://discourse.llvm.org/t/rfc-enable-assignment-tracking/69399

This sets the `-Xclang -fexperimental-assignment-tracking` flag to the value
`enabled` which means it will be enabled so long as none of the following are
true: it's an LTO build, LLDB debugger tuning has been specified, or it's an O0
build (no work is done in any case if -g is not specified or -gmlt is used).

Reviewed By: jmorse

Differential Revision: https://reviews.llvm.org/D146987
2023-03-31 12:38:48 +01:00
OCHyams 78b0689ff2 [Assignment Tracking] Follow up for D147129 - fix broken clang tests
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 13:54:10 +01:00
OCHyams 41c92c0dc6 [Assignment Tracking] Give -fexperimental-assignment-tracking flag 3 options
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
2023-03-29 12:47:54 +01:00
OCHyams 0a996c82a7 [Assignment Tracking] Fix -fexperimental-assignment-tracking cc1 flag
This change allows `-fexperimental-assignment-tracking` to be negated using the
negative equivalent `-fno-experimental-assignment-tracking`, and fixes the flag
so that the default behaviour can be changed (currently the default is still
false / disabled).

Reviewed By: StephenTozer

Differential Revision: https://reviews.llvm.org/D142029
2023-01-20 14:36:16 +00:00
OCHyams 4b6b2b1a42 Reapply: [Assignment Tracking][7/*] Add assignment tracking functionality to clang
Reverted in 98fa95492f.

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-09 09:28:41 +00:00
OCHyams 98fa95492f Revert "[Assignment Tracking][7/*] Add assignment tracking functionality to clang"
This reverts commit 28f9636edd.

Bot failure: https://lab.llvm.org/buildbot/#/builders/109/builds/50251
2022-11-08 18:43:05 +00:00
OCHyams 28f9636edd [Assignment Tracking][7/*] Add assignment tracking functionality to clang
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-08 17:49:08 +00:00