[all-commits] [llvm/llvm-project] a9dff3: [Clang] Enable -fextend-lifetimes at -Og (#118026)
Stephen Tozer via All-commits
all-commits at lists.llvm.org
Thu Apr 17 08:38:05 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a9dff35ad251cd20376ab25b26d1e5394e18ff4c
https://github.com/llvm/llvm-project/commit/a9dff35ad251cd20376ab25b26d1e5394e18ff4c
Author: Stephen Tozer <stephen.tozer at sony.com>
Date: 2025-04-17 (Thu, 17 Apr 2025)
Changed paths:
M clang/docs/CommandGuide/clang.rst
M clang/docs/ReleaseNotes.rst
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/extend-variable-liveness.c
Log Message:
-----------
[Clang] Enable -fextend-lifetimes at -Og (#118026)
Recently, a new flag -fextend-variable-liveness was added that prevents
optimizations from removing the values of source variables in some cases,
improving the quality of debugging for optimized builds where it is
enabled.
Following the inclusion of the flag, this patch enables it by default
when `-Og` is set. Currently, `-Og` is equivalent to `-O1` - it is
effectively just an alias. By enabling `-fextend-lifetimes`, this patch
changes the code generated by Clang with `-Og` to have reduced
optimization and greater debuggability than `-O1`, differentiating the
two according to their respective purposes. This idea was discussed
previously on Discourse where there was general agreement with the
principle of this change:
https://discourse.llvm.org/t/rfc-redefine-og-o1-and-add-a-new-level-of-og
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list