search for: ptrtoin

Displaying 12 results from an estimated 12 matches for "ptrtoin".

Did you mean: ptrtoint
2013 Nov 12
2
[LLVMdev] sinking address computing in CodeGenPrepare
I wonder why CodeGenPrepare breaks GEP into integer calculations (ptrtoin/add/inttopt) instead of directly sinking the address calculation using GEP into user's block. Thanks, Jun On Nov 12, 2013, at 12:07 PM, Evan Cheng <evan.cheng at apple.com> wrote: > The reason for this is to allow folding of address computation into loads and stores. A lot of moder...
2013 Nov 20
2
[LLVMdev] sinking address computing in CodeGenPrepare
When multiple GEPs or other operations are used for the address calculation, OptimizeMemoryInst() performs address matching and determines a final addressing expression as a simple form (e.g., ptrtoint/add/inttoptr) and sinks it into user's block so that ISel could have better chance to fold address computation into LDRs and STRs. However, OptimizeMemoryInst() seems to do this transformation even when the address calculation derived from a single GEP, resulting in poor alias analysis because...
2013 Nov 13
0
[LLVMdev] sinking address computing in CodeGenPrepare
On Nov 12, 2013, at 11:24 AM, Junbum Lim <junbums at gmail.com> wrote: > > I wonder why CodeGenPrepare breaks GEP into integer calculations (ptrtoin/add/inttopt) instead of directly sinking the address calculation using GEP into user's block. I believe it's primary for address mode matching where only part of the GEP can be folded (depending on the instruction set). Evan > > Thanks, > Jun > > > On Nov 12, 2013, a...
2013 Nov 21
2
[LLVMdev] sinking address computing in CodeGenPrepare
...im <junbums at gmail.com> wrote: > > > > > > > When multiple GEPs or other operations are used for the address > > calculation, OptimizeMemoryInst() performs address matching and > > determines a final addressing expression as a simple form (e.g., > > ptrtoint/add/inttoptr) and sinks it into user's block so that ISel > > could have better chance to fold address computation into LDRs and > > STRs. However, OptimizeMemoryInst() seems to do this > > transformation even when the address calculation derived from a > > single GEP,...
2013 Nov 21
0
[LLVMdev] sinking address computing in CodeGenPrepare
On Nov 20, 2013, at 3:10 PM, Junbum Lim <junbums at gmail.com> wrote: > > > When multiple GEPs or other operations are used for the address calculation, OptimizeMemoryInst() performs address matching and determines a final addressing expression as a simple form (e.g., ptrtoint/add/inttoptr) and sinks it into user's block so that ISel could have better chance to fold address computation into LDRs and STRs. However, OptimizeMemoryInst() seems to do this transformation even when the address calculation derived from a single GEP, resulting in poor alias analysis because...
2013 Nov 21
3
[LLVMdev] sinking address computing in CodeGenPrepare
...; >>> > >>> > >>> When multiple GEPs or other operations are used for the address > >>> calculation, OptimizeMemoryInst() performs address matching and > >>> determines a final addressing expression as a simple form (e.g., > >>> ptrtoint/add/inttoptr) and sinks it into user's block so that > >>> ISel > >>> could have better chance to fold address computation into LDRs > >>> and > >>> STRs. However, OptimizeMemoryInst() seems to do this > >>> transformation even when t...
2013 Nov 21
0
[LLVMdev] sinking address computing in CodeGenPrepare
...l.com> wrote: >> >>> >>> >>> When multiple GEPs or other operations are used for the address >>> calculation, OptimizeMemoryInst() performs address matching and >>> determines a final addressing expression as a simple form (e.g., >>> ptrtoint/add/inttoptr) and sinks it into user's block so that ISel >>> could have better chance to fold address computation into LDRs and >>> STRs. However, OptimizeMemoryInst() seems to do this >>> transformation even when the address calculation derived from a >>>...
2013 Nov 22
0
[LLVMdev] sinking address computing in CodeGenPrepare
...>>>>> >>>>> When multiple GEPs or other operations are used for the address >>>>> calculation, OptimizeMemoryInst() performs address matching and >>>>> determines a final addressing expression as a simple form (e.g., >>>>> ptrtoint/add/inttoptr) and sinks it into user's block so that >>>>> ISel >>>>> could have better chance to fold address computation into LDRs >>>>> and >>>>> STRs. However, OptimizeMemoryInst() seems to do this >>>>> transformat...
2013 Nov 22
2
[LLVMdev] sinking address computing in CodeGenPrepare
...;> >>>>>> When multiple GEPs or other operations are used for the address >>>>>> calculation, OptimizeMemoryInst() performs address matching and >>>>>> determines a final addressing expression as a simple form (e.g., >>>>>> ptrtoint/add/inttoptr) and sinks it into user's block so that >>>>>> ISel >>>>>> could have better chance to fold address computation into LDRs >>>>>> and >>>>>> STRs. However, OptimizeMemoryInst() seems to do this >>>>...
2013 Nov 12
0
[LLVMdev] sinking address computing in CodeGenPrepare
...the main purpose of the transformation. > > FROM : > for.body.lr.ph: > %zzz = getelementptr inbounds %struct.SS* %a2, i32 0, i32 35 > > for.body: > %4 = load double* %zzz, align 8, !tbaa !0 > > TO : > for.body: > %sunkaddr27 = ptrtoint %struct.SS* %a2 to i32 <----- sink address computing into user's block > %sunkaddr28 = add i32 %sunkaddr27, 272 > %sunkaddr29 = inttoptr i32 %sunkaddr28 to double* > %4 = load double* %sunkaddr29, align 8, !tbaa !8 > > > From what I observed, this transformation...
2013 Nov 12
2
[LLVMdev] sinking address computing in CodeGenPrepare
...on ISel's result, but I'm not clear about the main purpose of the transformation. FROM : for.body.lr.ph: %zzz = getelementptr inbounds %struct.SS* %a2, i32 0, i32 35 for.body: %4 = load double* %zzz, align 8, !tbaa !0 TO : for.body: %sunkaddr27 = ptrtoint %struct.SS* %a2 to i32 <----- sink address computing into user's block %sunkaddr28 = add i32 %sunkaddr27, 272 %sunkaddr29 = inttoptr i32 %sunkaddr28 to double* %4 = load double* %sunkaddr29, align 8, !tbaa !8 >From what I observed, this transformation can cause poor alias a...
2013 Nov 26
0
[LLVMdev] sinking address computing in CodeGenPrepare
...gt;>>>> When multiple GEPs or other operations are used for the address >>>>>>> calculation, OptimizeMemoryInst() performs address matching and >>>>>>> determines a final addressing expression as a simple form (e.g., >>>>>>> ptrtoint/add/inttoptr) and sinks it into user's block so that >>>>>>> ISel >>>>>>> could have better chance to fold address computation into LDRs >>>>>>> and >>>>>>> STRs. However, OptimizeMemoryInst() seems to do this...