H1 2015 Priorities and Bare-Metal Programming

Johannes Pfau via Digitalmars-d digitalmars-d at puremagic.com
Mon Feb 2 09:15:23 PST 2015


Am Mon, 02 Feb 2015 08:55:59 -0800
schrieb Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org>:

> On 2/2/15 8:42 AM, Johannes Pfau wrote:
> > Again the problem is not volatileLoad/Store which
> > translate to single instructions it's wrappers.
> 
> So does the argument boil down to better inlining control and 
> enforcement? -- Andrei

Mostyl that, but not only that. It's also necessary that the compiler
knows after inlining that the address is a literal. Loading data from
fixed literal addresses produces different, more efficient code than
loading from an runtime address. As the function code will generally be
written for runtime values the compiler must optimize after inlining
to recognize the inlined code deals with literals.

The GCC backend performs these optimizations only if optimization is
enabled. We could always do this in the dmd frontend inliner but LDC and
GDC don't/can't use the frontend inliner.

That's lot of work given that pragma(address) is a simple, consistent
solution and not even a real language change.


More information about the Digitalmars-d mailing list