[all-commits] [llvm/llvm-project] e4f153: [flang][debug] generate llvm.fake.use for argument...
jeanPerier via All-commits
all-commits at lists.llvm.org
Fri Apr 24 00:21:22 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e4f1530edcc95a41e8fd8d13dca295aad814f75d
https://github.com/llvm/llvm-project/commit/e4f1530edcc95a41e8fd8d13dca295aad814f75d
Author: jeanPerier <jperier at nvidia.com>
Date: 2026-04-24 (Fri, 24 Apr 2026)
Changed paths:
M flang/include/flang/Optimizer/Dialect/FIROps.td
M flang/include/flang/Optimizer/Transforms/Passes.td
M flang/lib/Optimizer/CodeGen/CodeGen.cpp
M flang/lib/Optimizer/Passes/Pipelines.cpp
M flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
A flang/test/Fir/fake_use-codegen.fir
A flang/test/Transforms/debug-fake-use.fir
Log Message:
-----------
[flang][debug] generate llvm.fake.use for arguments at -g and O0 (#187044)
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.
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