Displaying 2 results from an estimated 2 matches for "_pp".
Did you mean:
_p
2019 Aug 08
2
Suboptimal code generated by clang+llc in quite a common scenario (?)
...cfi_def_cfa_register %ebp
pushl %esi
.cfi_offset %esi, -12
movb 16(%ebp), %al
movb 12(%ebp), %cl
movb 8(%ebp), %dl
movl _scscx, %esi
movb %dl, (%esi)
movl _scscx, %edx
movb %cl, 1(%edx)
movl _scscx, %ecx
movb %al, 2(%ecx)
xorl %eax, %eax
popl %esi
popl %ebp
retl
.cfi_endproc
.comm _pp,3,0
.section __DATA,__data
.globl _scscx
.p2align 3
_scscx:
.long _pp
Again, the _scscx is loaded three times instead of reusing a register, which is suboptimal.
NOW, if I replace the original code by this:
int pp[3];
int *scscx = pp;
int tst( int i, int j, int k )
{
scscx[0] = i;
scsc...
2019 Aug 08
3
Suboptimal code generated by clang+llc in quite a common scenario (?)
...dl
> > movl _scscx, %esi
> > movb %dl, (%esi)
> > movl _scscx, %edx
> > movb %cl, 1(%edx)
> > movl _scscx, %ecx
> > movb %al, 2(%ecx)
> > xorl %eax, %eax
> > popl %esi
> > popl %ebp
> > retl
> > .cfi_endproc
> >
> > .comm _pp,3,0
> > .section __DATA,__data
> > .globl _scscx
> > .p2align 3
> > _scscx:
> > .long _pp
> >
> >
> > Again, the _scscx is loaded three times instead of reusing a register,
> which is suboptimal.
> >
> >
> > NOW, if I replace the...