Displaying 3 results from an estimated 3 matches for "mem_base66".
Did you mean:
mem_base60
2020 Jul 23
2
How to optimize out the duplicated memory load instructions?
Hi there,
The raw input IR is composed by my tool and the below one is produced by
llvm opt tool with O3 optimization level. I am pretty sure that the two
load instructions( %mem_base60 and %mem_base66) are referring to the same
memory location. How can I instruct llvm optimization pass to optimize out
the %mem_base66 and make the subsequent code reuse the %mem_base60? I
tried with metadata 'alias.scope' and 'noalias' and it doesn't help. Thanks
for any advice.
392542 check...
2020 Jul 23
2
How to optimize out the duplicated memory load instructions?
...,
!alias.scope !3
246003 %offset161 = add i32 %call56, 4
246004 %12 = sext i32 %offset161 to i64
246005 %maddr62 = getelementptr inbounds i8, i8* %mem_base60, i64 %12
246006 %data_ptr63 = bitcast i8* %maddr62 to i64*
**246007 store i64 0, i64* %data_ptr63, align 1, !noalias !3
**246008 %mem_base66 = load i8*, i8** %mem_base_addr_ptr, align 8,
!alias.scope !3
246009 %offset167 = add i32 %call56, 12
246010 %13 = sext i32 %offset167 to i64
....
382681 !3 = !{!3}
382682 !4 = !{!4}
BR,
Terry
On Thu, Jul 23, 2020 at 11:43 PM Johannes Doerfert <
johannesdoerfert at gmail.com> wrote:
&g...
2020 Jul 23
2
How to optimize out the duplicated memory load instructions?
...all56, 4
> > 246004 %12 = sext i32 %offset161 to i64
> > 246005 %maddr62 = getelementptr inbounds i8, i8* %mem_base60, i64 %12
> > 246006 %data_ptr63 = bitcast i8* %maddr62 to i64*
> > **246007 store i64 0, i64* %data_ptr63, align 1, !noalias !3
> > **246008 %mem_base66 = load i8*, i8** %mem_base_addr_ptr, align 8,
> > !alias.scope !3
> > 246009 %offset167 = add i32 %call56, 12
> > 246010 %13 = sext i32 %offset167 to i64
> > ....
> > 382681 !3 = !{!3}
> > 382682 !4 = !{!4}
> >
> > BR,
> > Terry
> >
&g...