[flang-commits] [flang] [flang][debug] generate llvm.fake.use for arguments at -g and O0 (PR #187044)

via flang-commits flang-commits at lists.llvm.org
Tue Apr 21 02:30:06 PDT 2026


jeanPerier wrote:

> I ran some testing on this today too -- LGTM. I see the calls to llvm.fake.use being generated. I still see the variables appear as `<optimized-out>` in a debugger after a function call, but I believe this is expected, as you stated that the back-ends are currently ignoring llvm.fake.use. Is my understanding correct?

I just rebased the patch. At O0, I would now expect the dummy argument to not appear optimized our after a call inside the procedure. If you are still seeing it as optimized out inside the debugger, can you share a reproducer?

https://github.com/llvm/llvm-project/pull/187044


More information about the flang-commits mailing list