Hi,

Regarding address spaces, I saw that there is a pass to remove address 
space casts. But if I generate IR using `*llvm-goc -dump-ir -enable-gc=1 
test.go*` for the following go file, I still can see the *addrspacecast* 
instruction. What is the reason to see that *addrspacecast? *I feel that 
pass is not running. Can you help me to understand this problem?


*package main*

*func main() {*
*   _ = stackIt2()*
*}*
*//go:noinline*
*func stackIt2() *int {*
*   y := 2*
*   res := y * 2*
*   return &res*
*}*

Thank you,
Kavindu
On Tuesday, 29 June 2021 at 18:22:14 UTC+5:30 th...@google.com wrote:

> See https://llvm.org/docs/Statepoints.html for more on this. 
>
> Thanks, Than
>
>
> On Mon, Jun 28, 2021 at 5:40 AM Kavindu Gimhan Zoysa <kavin...@gmail.com> 
> wrote:
>
>> Hi all,
>>
>> Can you please explain the reason to use different address space when GC 
>> is enabled as shown in the below line?
>>
>>
>> https://go.googlesource.com/gollvm/+/refs/heads/master/driver/CompileGo.cpp#559
>>
>> Thank you,
>> Kavindu
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "golang-nuts" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to golang-nuts...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/d95934ca-4488-4071-8c07-bb33122be387n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/d95934ca-4488-4071-8c07-bb33122be387n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c26ff4b9-84a9-4aa2-a450-5d1796aba1c0n%40googlegroups.com.

Reply via email to