Displaying 4 results from an estimated 4 matches for "bit_addr".
Did you mean:
bindaddr
2011 Jul 26
2
[LLVMdev] XOR Optimization
...Daniel,
> Hi folks,
>
> I couldn't find a specific XOR (OR and AND) optimization on llvm, and
> therefore I am about to implement it.
> But first I would like to check with you guys that it really does not exist.
>
> For a simple loop like this:
>
> nbits = 128;
> bit_addr = 0;
> while(nbits--)
> {
> bindex=bit_addr>>5; /* Index is number /32 */
> bitnumb=bit_addr % 32; /* Bit number in longword */
> bitmap[bindex]^=(1L<<bitnumb);
> bit_addr++;
> }
>
>
> The -O3 set of optimizations generates a code like this:
>...
2011 Jul 26
2
[LLVMdev] XOR optimization
Hi folks,
I couldn't find a specific XOR (OR and AND) optimization on llvm, and
therefore I am about to implement it.
But first I would like to check with you guys that it really does not exist.
For a simple loop like this:
nbits = 128;
bit_addr = 0;
while(nbits--)
{
bindex=bit_addr>>5; /* Index is number /32 */
bitnumb=bit_addr % 32; /* Bit number in longword */
bitmap[bindex]^=(1L<<bitnumb);
bit_addr++;
}
The -O3 set of optimizations generates a code like this:
entry:
br label %while.body
while.body:...
2011 Jul 26
0
[LLVMdev] XOR Optimization
...dn't find a specific XOR (OR and AND) optimization on llvm, and
> > therefore I am about to implement it.
> > But first I would like to check with you guys that it really does not
> exist.
> >
> > For a simple loop like this:
> >
> > nbits = 128;
> > bit_addr = 0;
> > while(nbits--)
> > {
> > bindex=bit_addr>>5; /* Index is number /32 */
> > bitnumb=bit_addr % 32; /* Bit number in longword */
> > bitmap[bindex]^=(1L<<bitnumb);
> > bit_addr++;
> > }
> >
> >
> > The -O3 set...
2011 Jul 26
0
[LLVMdev] XOR optimization
Den 26.07.2011 03:25, skrev Daniel Nicácio:
> - Do you know why a OR instruction is used for increments? instead of
> using a INC or ADD?
You mean "bit_addr++;" ?
It's add'ing (+4 due to loop unrolling i guess)
%inc.3 = add i32 %0, 4