Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-05 Thread 'Keith Randall' via golang-nuts
On Fri, Jul 5, 2019 at 9:16 PM Mohit Verma wrote: > Thanks Keith. > > Yes, the function call takes a variadic interface argument, so it would > cause the variables to escape if it existed before. To take care of this, I > allocate space for the interface during buildSSA & then call > *runtime.con

Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-05 Thread Mohit Verma
Thanks Keith. Yes, the function call takes a variadic interface argument, so it would cause the variables to escape if it existed before. To take care of this, I allocate space for the interface during buildSSA & then call *runtime.convT2E** functions. *1. How do I turn off escape analysis with c

Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-05 Thread 'Keith Randall' via golang-nuts
On Fri, Jul 5, 2019 at 2:05 PM Mohit Verma wrote: > Thanks Keith, Ian. > > Specifically, I am trying to catch all the memory stores/moves during the > build SSA phase, and instead call a function that can do things like record > the old/new values in a journal. > So I changed the methods like (*s

Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-05 Thread Mohit Verma
Thanks Keith, Ian. Specifically, I am trying to catch all the memory stores/moves during the build SSA phase, and instead call a function that can do things like record the old/new values in a journal. So I changed the methods like (*state).assign, (*state).storeType in gc/ssa.go and injected equi

Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-03 Thread 'Keith Randall' via golang-nuts
On Wed, Jul 3, 2019 at 9:04 PM Ian Lance Taylor wrote: > [ +khr ] > > On Wed, Jul 3, 2019 at 4:46 PM Mohit Verma wrote: > > > > Hi All, > > > > I am trying to change the ssa phase of Go compiler to do extra work > during memory stores. > > For example whenever there is a memory store, I want to

Re: [go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-03 Thread Ian Lance Taylor
[ +khr ] On Wed, Jul 3, 2019 at 4:46 PM Mohit Verma wrote: > > Hi All, > > I am trying to change the ssa phase of Go compiler to do extra work during > memory stores. > For example whenever there is a memory store, I want to make a function call > to one of my Go packages instead of the store.

[go-nuts] Tools for developing Go compiler/ Go code from SSA

2019-07-03 Thread Mohit Verma
Hi All, I am trying to change the ssa phase of Go compiler to do extra work during memory stores. For example whenever there is a memory store, I want to make a function call to one of my Go packages instead of the store. So, far I have some working changes and I can see the new SSA nodes when I d