[Bug target/9703] [arm] Accessing data through constant pool more times could be solved in less instructions
lac@rgai.hu
gcc-bugzilla@gcc.gnu.org
Tue May 27 14:31:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9703
------- Additional Comments From lac@rgai.hu 2003-05-27 14:05 -------
Subject: Re: [arm] Accessing data through constant pool
more times could be solved in less instructions
Hello!
Thanks for your question! The problem still exists... I commented your
code below. The relevant part is function f1. The ldr insn is unnecessary
at (*) when in (**) offset is used. With sequential cpool accesses 1 insn
per access should be dropped.
Regards,
Laszlo
On Mon, 26 May 2003, dhazeghi@yahoo.com wrote:
> PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9703
>
>
>
> ------- Additional Comments From dhazeghi@yahoo.com 2003-05-26 20:59 -------
> Hello,
>
> with gcc 3.3 branch and mainline (20030509) I get the following code. Could you confirm whether
> this still exhibits the problem you noted? Thanks,
>
> Dara
>
> .file "01.i"
> .global globvar1
> .bss
> .global globvar1
> .align 2
> .type globvar1, %object
> .size globvar1, 4
> globvar1:
> .space 4
> .global globvar2
> .global globvar2
> .align 2
> .type globvar2, %object
> .size globvar2, 4
> globvar2:
> .space 4
> .text
> .align 2
> .global f1
> .type f1, %function
> f1:
> @ args = 0, pretend = 0, frame = 0
> @ frame_needed = 0, uses_anonymous_args = 0
> @ link register save eliminated.
> ldr r3, .L2
> mov r2, #12
> str r2, [r3, #0]
> ldr r3, .L2+4 ; (*) can be removed
> mov r0, #11
> @ lr needed for prologue
> str r0, [r3, #0] ; (**) with offset instead of #0
> mov pc, lr
> .L3:
> .align 2
> .L2:
> .word globvar2
> .word globvar1
> .size f1, .-f1
> .align 2
> .global main
> .type main, %function
> main:
> @ args = 0, pretend = 0, frame = 0
> @ frame_needed = 0, uses_anonymous_args = 0
> @ link register save eliminated.
> @ lr needed for prologue
> b f1
> .size main, .-main
> .ident "GCC: (GNU) 3.3 20030508 (prerelease)"
>
>
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the Gcc-bugs
mailing list