Re: [fpc-devel] Optimization of redundant mov's

2017-03-24 Thread Florian Klämpfl
Am 20.03.2017 um 08:50 schrieb Jonas Maebe: >> And again, I've seen this happen more than once on i386 code, where it even >> creates "fake" register pressure (by using 2 or more registers to hold >> exactly >> the same temporary) > > That's again something that needs to be solved at the

Re: [fpc-devel] Optimization of redundant mov's

2017-03-20 Thread Jonas Maebe
On 19/03/17 21:28, Martok wrote: It's called register spilling: once there are no registers left to hold values, the compiler has to pick registers whose value will be kept in memory instead. I thought it would be something like that... Still, my main issue was with the repeated fetches. I'd

Re: [fpc-devel] Optimization of redundant mov's

2017-03-20 Thread Martok
Hi, > It's called register spilling: once there are no registers left to hold > values, the compiler has to pick registers whose value will be kept in > memory instead. I thought it would be something like that... Still, my main issue was with the repeated fetches. I'd (naively!) say that it

Re: [fpc-devel] Optimization of redundant mov's

2017-03-19 Thread Jonas Maebe
Martok wrote: > a:= CurrentHash[0]; b:= CurrentHash[1]; c:= CurrentHash[2]; d:= > CurrentHash[3]; > 000100074943 488b8424a002 mov0x2a0(%rsp),%rax > 00010007494B 4c8b5038 mov0x38(%rax),%r10 > 00010007494F 488b8424a002 mov