wolfgangp updated this revision to Diff 175307.
wolfgangp added a comment.
Rebased on r347577 with some test cases.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D41044/new/
https://reviews.llvm.org/D41044
Files:
include/clang/Driver/Options.td
vsk added a comment.
I have some results from the development build of our kernel ('-O2 -g -flto').
According to dwarfdump -statistics, when compiled with -fextend-lifetimes, the
percentage of covered scope bytes increases from 62% to 69%. The number of
inlined scopes decreases by 4%, and (I
probinson added a comment.
I should note we've had at least one request to make this specifiable
per-function, which would mean defining an attribute to control the emission of
the fake-use intrinsics. Doing the feature that way would be consistent with
'optnone'.
vsk added a project: debug-info.
vsk added a comment.
Thanks for your patches @wolfgangp! I agree with Eli that we should evaluate
enabling this automatically with -Og. I'll test this out on a few internal
projects and report back.
https://reviews.llvm.org/D41044
efriedma added a comment.
This might be something we want to turn on automatically for -Og.
https://reviews.llvm.org/D41044
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wolfgangp added a comment.
A quick note on usage: Compile your source with "clang -O2 -g -c
-fextend-lifetimes foo.cpp" to see the effects (or use -fextend-this-ptr if you
just want to extend the lifetime of 'this').
https://reviews.llvm.org/D41044
wolfgangp created this revision.
Herald added a subscriber: JDevlieghere.
The patch implements the clang support for generating artificial uses of local
variables and parameters to aid with debugging of optimized code. I presented
this concept in my lightning talk "Debugging of optimized code: