Re: [coldfire-gnu-discuss] Control deferred writes?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coldfire-gnu-discuss] Control deferred writes?
- To: coldfire-gnu-discuss@xxxxxxxxxxxxxxxx
- Subject: Re: [coldfire-gnu-discuss] Control deferred writes?
- From: "Oliver Betz" <list_ob@xxxxxxx>
- Date: Fri, 03 Dec 2010 17:05:48 +0100
42Bastian wrote:
(I sent a direct reply by accident, now to the list as intended)
> > can I tell gcc not to defer writes, possibly only to certain
> > variables?
>
> No, not at all. If you need such, write assembly.
>
> The compiler has no idea of the underlying hardware.
> It might schedule instructions if it knows the CPU core, but not w.r.t.
> bus timing.
I wasn't asking for such optimizations, but I find many deferred
writes where I can't see any benefit.
If the variable will be be written at some later time *) anyway, why
does the compiler delay this write at all, IOW what is the intended
benefit?
It doesn't require less code, and it doesn't save execution time as
far as I see.
Oliver
*) e.g. "volatile". gcc of course respects "6.7.3 Type qualifiers"
(including footnote 114) of ISO/IEC 9899:1999.
--
Oliver Betz, Muenchen