[PATCH] D99107: [clang][CodeGen] Do not emit NVRO debug helper when not emitting debug info

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 23 13:26:49 PDT 2021


rnk added a comment.

In D99107#2642599 <https://reviews.llvm.org/D99107#2642599>, @nick wrote:

> Is this hack actually needed? I could not reproduce a problem with https://bugs.chromium.org/p/chromium/issues/detail?id=860398#c13 repro, the breakpoint fires for me and I see the variable.
>
> The difference with the hack and without, using `clang.exe src.cpp -S -masm=intel -O2 -g -o out.asm` is

You enabled optimizations, so I wouldn't expect there to be any difference. The main purpose of taking the sret pointer and storing it into a local alloca is to make it easier to find in unoptimized builds. Otherwise we have this variable value living in the first register parameter, and at the time, the backend would quickly lose track of it. It's always safer to anchor your variable location info in memory.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99107/new/

https://reviews.llvm.org/D99107



More information about the cfe-commits mailing list