<div dir="ltr">Hi all,<div><br></div><div>Let's say I have placed statepoints as follows.<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>define @foo() {<br>   %1 = call malloc(4)<br>   ...<br>}<br>define @bar() {<br>   %1 = call malloc(4)<br>   %token = call @llvm..statepoint.p0f_isVoidf(....foo(), ... i8* %2)<br>   %afterRelo = call @llvm.gc.relocate(token %token, i32 7, i32 7)<br>   ...<br>}<br>define @main() {<br>   %1 = call malloc(4)<br>   %token = call @llvm..statepoint.p0f_isVoidf(....bar(), ... i8* %2)<br>}</blockquote></div><div><div><br></div><div>If I check the LLVM StackMap, for the <b>bar </b>function, locations look like this, </div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> Kind : 4<br>        Flags : 0<br>     Location Size : 8<br>     Reg Num : 0<br>   Reserved : 0<br>  Offset : 0<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">     Kind : 4<br>      Flags : 0<br>     Location Size : 8<br>     Reg Num : 0<br>   Reserved : 0<br>  Offset : 0<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">     Kind : 4<br>      Flags : 0<br>     Location Size : 8<br>     Reg Num : 0<br>   Reserved : 0<br>  Offset : 0<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">     Kind : 3<br>      Flags : 0<br>     Location Size : 8<br>     Reg Num : 7<br>   Reserved : 0<br>  Offset : 0<br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">     Kind : 3<br>      Flags : 0<br>     Location Size : 8<br>     Reg Num : 7<br>   Reserved : 0<br>  Offset : 0</blockquote><div><br></div><div>After reading document [1], I figured out that if the kind is 3, the location of heap reference can be found at BP + Offset. But here the offset is 0. Could you please explain me how to interpret this stack frame, and how do we find the location of a given heap reference in the stack map for a given heap reference?</div><div> </div><div>[1]: <a href="https://llvm.org/docs/StackMaps.html#stack-map-format">https://llvm.org/docs/StackMaps.html#stack-map-format</a></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div><div>Thank you in advance,</div><div>Kavindu</div><div><br></div><div>Kavindu Gimhan Zoysa,</div><div>BSc(Hons) | ENTC | UoM,<br></div><div dir="ltr">SSE | WSO2<div><br></div><div><a href="https://github.com/KavinduZoysa" target="_blank">GitHub</a> <a href="https://www.linkedin.com/in/kavindu-gimhan-zoysa-85939a122/" target="_blank">LinkedIn</a> <a href="https://medium.com/@kavindugimhanzoysa" target="_blank">Medium</a></div></div></div></div></div></div></div></div></div></div></div>