commit | a9dff35ad251cd20376ab25b26d1e5394e18ff4c | [log] [tgz] |
---|---|---|
author | Stephen Tozer <stephen.tozer@sony.com> | Thu Apr 17 17:37:42 2025 +0200 |
committer | GitHub <noreply@github.com> | Thu Apr 17 16:37:42 2025 +0100 |
tree | 5b818ed3fa180d686e0e64661c3d745cd0c69675 | |
parent | 70e2acf0c5650b8862c41f2697a9e0485ecb17be [diff] |
[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
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.