aliasing again
Sergei Organov
osv at javad.com
Fri May 25 10:22:51 UTC 2007
Steven Johnson <sjohnson at sakuraindustries.com> writes:
> Kate Feng wrote:
>> I think I am missing something practical here.
>>
>> In 4.7.1, I noticed the code :
>> RTEMS_INLINE_ROUTINE void _Heap_Block_remove (
>> Heap_Block *the_block
>> )
>> {
>> Heap_Block *block = the_block;
>>
>> Heap_Block *next = block->next;
>> Heap_Block *prev = block->prev;
>> prev->next = next;
>> next->prev = prev;
>> }
>>
>> What is the effect of this discussion of alias in
>> Heap_Block_remove ?
>>
>> I extended the test with gcc-4.1.1 with either
>> -fstrict-aliasing or -fno-strict-aliasing with or
>> without -O -fschedule-insns. However, I got the
>> same result :
>>
[...]
> My suggestion is always build system software with
> -fno-strict-aliasing, then your code will perform exactly as you have
> written it and it is doubtful the "potential" optimisations will make
> one stick of difference to the quality or speed of the code produced
> by the compiler.
I fail to see how your post is relevant. Did you miss the fact that
-fno-strict-aliasing *does not help* in the particular case Till has
encountered?
-- Sergei.
More information about the users
mailing list