[PATCH] D141381: [codegen] Store address of indirect arguments on the stack

Felipe de Azevedo Piovezan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 08:49:35 PST 2023


fdeazeve added a comment.

In hindsight, this should have been obvious.
While SROA will not touch this:

  define @foo(ptr %arg) {
     call void @llvm.dbg.declare(%arg, [...], metadata !DIExpression())

It completely destroys the debug information provided by:

  define @foo(ptr %arg) {
     %ptr_storage = alloca ptr
     store ptr %arg, ptr %ptr_storage
     call void @llvm.dbg.declare(%ptr_storage, [...], metadata !DIExpression(DW_OP_deref))


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141381



More information about the cfe-commits mailing list