[Bug fortran/38111] unneeded temporary
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38111 Thomas Koenig changed: What|Removed |Added CC||tkoenig at gcc dot gnu.org --- Comment #5 from Thomas Koenig --- One way of handling this would be to create a DO loop from the array assignment. Of course, we would have to make sure check for dependencies, for example a = [(a(4)+3,i=1,n)]
[Bug fortran/38111] unneeded temporary
--- Comment #4 from dfranke at gcc dot gnu dot org 2010-05-09 20:49 --- Enhancement only - and probably a dupe of PR33341?! -- dfranke at gcc dot gnu dot org changed: What|Removed |Added CC||dfranke at gcc dot gnu dot ||org Severity|normal |enhancement http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38111
[Bug fortran/38111] unneeded temporary
--- Comment #3 from jv244 at cam dot ac dot uk 2010-04-27 18:07 --- still fails with current trunk. -- jv244 at cam dot ac dot uk changed: What|Removed |Added Known to fail||4.6.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38111
[Bug fortran/38111] unneeded temporary
--- Comment #2 from jv244 at cam dot ac dot uk 2008-11-19 13:18 --- (In reply to comment #1) > Do you know of any compilers that catch this? As you say, it is not so easy > to > fix. I believe ifort gets this right (compiled with 'ifort -S -heap-arrays 64), but this is just looking at the assembly, which normally contains calls to for_allocate if a temp is generated: s1_: # parameter 1: %rdi ..B1.1: # Preds ..B1.0 ..___tag_value_s1_.1: #1.12 movq 48(%rdi), %rsi#4.1 movl $1, %r8d #4.1 testq %rsi, %rsi#4.1 jle ..B1.5# Prob 10% #4.1 # LOE rbx rbp rsi rdi r8 r12 r13 r14 r15 ..B1.2: # Preds ..B1.1 movq (%rdi), %rax #4.1 movq 56(%rdi), %rcx#4.1 movq %rcx, %rdx#4.1 subq %rcx, %rax# # LOE rax rdx rcx rbx rbp rsi r8 r12 r13 r14 r15 ..B1.3: # Preds ..B1.3 ..B1.2 movl %r8d, (%rdx,%rax) #4.1 addq %rcx, %rdx#4.1 addq $1, %r8 #4.1 cmpq %rsi, %r8 #4.1 jle ..B1.3# Prob 82% #4.1 # LOE rax rdx rcx rbx rbp rsi r8 r12 r13 r14 r15 ..B1.5: # Preds ..B1.3 ..B1.1 ret #5.1 .align2,0x90 > > BTW you say that this another case where an unneeded temp is created. I can > see your PRs after this. Which ones come before? I've added a number of these as blocking PR36854. As mentioned before, all derived from CP2K. I believe these are relatively important to fix, the performance inpact of generating an unneeded temp can be very large. Joost > > Paul > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38111
[Bug fortran/38111] unneeded temporary
--- Comment #1 from pault at gcc dot gnu dot org 2008-11-18 19:57 --- Joost, Do you know of any compilers that catch this? As you say, it is not so easy to fix. BTW you say that this another case where an unneeded temp is created. I can see your PRs after this. Which ones come before? Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2008-11-18 19:57:17 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38111