> Am 27.06.2022 um 06:51 schrieb Prathamesh Kulkarni 
> <prathamesh.kulka...@linaro.org>:
> 
> On Mon, 20 Jun 2022 at 12:52, Richard Biener <richard.guent...@gmail.com> 
> wrote:
>> 
>>> On Thu, Jun 16, 2022 at 5:05 PM Prathamesh Kulkarni via Gcc-patches
>>> <gcc-patches@gcc.gnu.org> wrote:
>>> 
>>> Hi,
>>> I just noticed -fdump-statistics supports asmname sub-option, which
>>> according to the doc states:
>>> "If DECL_ASSEMBLER_NAME has been set for a given decl, use that in the dump
>>> instead of DECL_NAME. Its primary use is ease of use working backward from
>>> mangled names in the assembly file."
>>> 
>>> When passed -fdump-statistics-asmname, the dump however still contains the
>>> original name of functions. The patch modifies statistics.cc to emit asm
>>> name of function instead. Also for C++, it helps to better disambiguate
>>> overloaded function names in the stats dump file.
>>> I have attached stats dump for a simple test-case.
>>> 
>>> Does it look OK ?
>> 
>> decl_assembler_name has the side-effect of computing and setting it if it is
>> not set already - I think that's unwanted.  You probably want to use
>> it only if DECL_ASSEMBLER_NAME_SET_P which then means when it
>> gets it later the dump will be split.
> Hi Richard,
> Sorry for late reply. In the attached patch, I checked for
> DECL_ASSEMBLER_NAME_SET_P before calling
> decl_assembler_name.
> Does that look OK ?

Ok.

Richard 


> Thanks,
> Prathamesh
>> 
>> Richard.
>> 
>>> 
>>> Thanks,
>>> Prathamesh
> <stats-asmname-2.txt>

Reply via email to