================ @@ -412,6 +412,20 @@ New Compiler Flags only for thread-local variables, and none (which corresponds to the existing ``-fno-c++-static-destructors`` flag) skips all static destructors registration. +- The ``-fextend-variable-liveness`` flag has been added to allow for improved + debugging of optimized code. Using ``-fextend-variable-liveness`` will cause + Clang to generate code that tries to preserve the liveness of source variables + through optimizations, meaning that variables will typically be visible in a + debugger more often. The flag has two levels: ``-fextend-variable-liveness``, + or ``-fextend-variable-liveness=all``, extendes the liveness of all user + variables and the ``this`` pointer. Alternatively ``-fextend-this-ptr``, or + ``-fextend-variable-liveness=this``, has the same behaviour but applies only + to the ``this`` variable in C++ class member functions, meaning its effect is + a strict subset of ``-fextend-variable-liveness``. Note that this flag + modifies the results of optimizations that Clang performs, which will result + in reduced performance in generated code; however, this feature will not + extend the liveness of some variables in cases where doing so would likely + have a severe impact on generated code performance. ---------------- SLTozer wrote:
The intention here is just to specify to the user that some variables won't have their liveness extended, so that they're not caught off-guard if they notice some variables getting excluded. https://github.com/llvm/llvm-project/pull/118026 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits