[all-commits] [llvm/llvm-project] aeccfe: Add option to generate additional debug info for e...
William Junda Huang via All-commits
all-commits at lists.llvm.org
Wed May 29 15:04:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aeccfee348c717165541d8d895b9b0cdfe31415c
https://github.com/llvm/llvm-project/commit/aeccfee348c717165541d8d895b9b0cdfe31415c
Author: William Junda Huang <williamjhuang at google.com>
Date: 2024-05-29 (Wed, 29 May 2024)
Changed paths:
M clang/lib/CodeGen/CGDebugInfo.cpp
M clang/lib/CodeGen/CGDebugInfo.h
M clang/lib/CodeGen/CGExprScalar.cpp
A clang/test/CodeGenCXX/debug-info-ptr-to-ptr.cpp
Log Message:
-----------
Add option to generate additional debug info for expression dereferencing pointer to pointers. (#81545)
Such expression does not correspond to a variable in the source code
thus does not have a debug location. When the user collects perf data on
the program, if the intermediate memory load instruction is sampled, it
could not be attributed to any variable/class member, which causes the
sampling results to be under-counted.
This patch adds an option `-fdebug_info_for_pointer_type` to generate a
psuedo variable and its debug info for intermediate expression with
pointer dereferencing, so that perf data collected on the instruction of
that expression can be attributed to the correct class member.
This is a prototype so comments are needed.
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