[PATCH] powerpc: Fix POWER7/PPC64 performance regression on LE

Richard Henderson rth@twiddle.net
Wed Jan 14 05:18:00 GMT 2015


On 01/13/2015 05:18 PM, Adhemerval Zanella wrote:
> On 13-01-2015 18:11, Richard Henderson wrote:
>> On 01/13/2015 11:43 AM, Adhemerval Zanella wrote:
>>> +	std	rWORD8, rWORD8SAVE(r1)
>>> +	cfi_offset(rWORD8, rWORD8SAVE)
>>> +	std	rWORD7, rWORD7SAVE(r1)
>>> +	cfi_offset(rWORD7, rWORD7SAVE)
>>> +	std	rOFF8, rOFF8SAVE(r1)
>>> +	cfi_offset(rWORD7, rOFF8SAVE)
>>> +	std	rOFF16, rOFF16SAVE(r1)
>>> +	cfi_offset(rWORD7, rOFF16SAVE)
>>> +	std	rOFF24, rOFF24SAVE(r1)
>>> +	cfi_offset(rWORD7, rOFF24SAVE)
>>> +	std	rOFF32, rOFF32SAVE(r1)
>>> +	cfi_offset(rWORD7, rOFF32SAVE)
>> Given a sequence of stores like this, it's better to
>> put all of the cfi_offset annotations after the last store.
>>
>> By interspersing them like this, you're just adding unnecessary
>> DW_CFA_advance opcodes to the unwind info.
>>
>>
>> r~
>>
> I was not aware of this, but I think the performance implications for such
> organization is just to unwind and debuggers, right?
> 

True, and that's why this is interesting as a size optimization,
because it'll "almost never" be used.


r~



More information about the Libc-alpha mailing list