Fix for https://github.com/llvm/llvm-project/issues/185432. This patch extends the lifetime of procedure dummy arguments using llvm.fake.use so that they are accessible in debugger during the whole lifetime of the function. This is done by: - adding a new fir.fake_use operation and emitting it in AddDebugInfo.cpp for dummy arguments at the end of the procedure scope. - lower this new fir.fake_use to the llvm.fake.use intrinsic. This is done under -g at O0 only to avoid pessimizing the generated code when optimizations are requested.
46 KiB
46 KiB