[PATCH] D126277: [Debug] [Coroutines] Add deref operator for non complex expression

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 02:33:20 PDT 2022


jmorse accepted this revision.
jmorse added a comment.
This revision is now accepted and ready to land.

(All away for the UK holiday week sorry),

Thanks for the detail on how salvaging happens with coroutines -- I was curious why it would depend on what was already in the DIExpression. The deref is indeed necessary because the pointer is in an alloca. I suspect the check for `isComplex()` wasn't completely necessary (but only because of DIExpression quirks, unfortunately).

LGTM, but could you put an extra CHECK in where I've marked to capture FramePtr_RESUME using the alloca instruction. When reading the test, it wasn't clear to me where the dbg.declare was going to point, this will make it easier for future readers to understand.



================
Comment at: llvm/test/Transforms/Coroutines/coro-debug-coro-frame.ll:12
 ; CHECK:       define internal fastcc void @f.resume(
 ; CHECK:       entry.resume:
+; CHECK:            call void @llvm.dbg.declare(metadata %f.Frame** %[[FramePtr_RESUME:.*]], metadata ![[CORO_FRAME_IN_RESUME:[0-9]+]], metadata !DIExpression(DW_OP_deref)
----------------
Could you put a CHECK in here for the FramePtr_RESUME variable that checks it's coming from an alloca?


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

https://reviews.llvm.org/D126277



More information about the llvm-commits mailing list