Displaying 5 results from an estimated 5 matches for "pi_addr".
Did you mean:
ip_addr
2009 May 24
3
[LLVMdev] mixing static/dynamic code
Hi,
I have the following code, the lines preceded by `>` being added at runtime
(the snipped was also printed at runtime)
define i32 @myfunc(i32 %pi) {
entry:
%pi_addr = alloca i32 ; <i32*> [#uses=3]
%retval = alloca i32 ; <i32*> [#uses=2]
%tmp = alloca i32 ; <i32*> [#uses=2]
> %ptr32 = alloca i32 ; <i32*> [#uses=2]
%"alloca point" = bitcast i32 0 to...
2009 May 24
2
[LLVMdev] mixing static/dynamic code
...<nicholas at mxc.ca> wrote:
> Paul Martin wrote:
> > Hi,
> > I have the following code, the lines preceded by `>` being added at
> > runtime (the snipped was also printed at runtime)
> >
> > define i32 @myfunc(i32 %pi) {
> > entry:
> > %pi_addr = alloca i32 ; <i32*> [#uses=3]
> > %retval = alloca i32 ; <i32*> [#uses=2]
> > %tmp = alloca i32 ; <i32*> [#uses=2]
> > > %ptr32 = alloca i32 ; <i32*> [#uses=2]
> > %&qu...
2009 May 24
0
[LLVMdev] mixing static/dynamic code
Paul Martin wrote:
> Hi,
> I have the following code, the lines preceded by `>` being added at
> runtime (the snipped was also printed at runtime)
>
> define i32 @myfunc(i32 %pi) {
> entry:
> %pi_addr = alloca i32 ; <i32*> [#uses=3]
> %retval = alloca i32 ; <i32*> [#uses=2]
> %tmp = alloca i32 ; <i32*> [#uses=2]
> > %ptr32 = alloca i32 ; <i32*> [#uses=2]
> %"alloca point"...
2009 May 24
0
[LLVMdev] mixing static/dynamic code
...s which is a
> problem if the same variable has different addresses for the
> static/dynamic code - as far I see this is what it's happening but I
> have no clue why.
If you look at the LLVM IR you can see two distinct alloca instructions,
the one your static code had named "%pi_addr" and the one you created
named "%ptr32".
It sounds like what you want to do is instead of creating your own stack
spot to store %pi into, you should look at the first user of %pi which
should be a store of %pi into its stack space, as generated by the
static compilation, and pul...
2009 May 24
1
[LLVMdev] mixing static/dynamic code
...oblem if the same variable has different addresses for the
> > static/dynamic code - as far I see this is what it's happening but I
> > have no clue why.
>
> If you look at the LLVM IR you can see two distinct alloca instructions,
> the one your static code had named "%pi_addr" and the one you created
> named "%ptr32".
>
> It sounds like what you want to do is instead of creating your own stack
> spot to store %pi into, you should look at the first user of %pi which
> should be a store of %pi into its stack space, as generated by the
> st...