View source code
Display the source code in dmd/backend/cgelem.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.backend.cgelem

Compiler implementation of the D programming language.



cost(n) Compute the 'cost' of evaluating a elem. Could be done as Sethi-Ullman numbers, but that ain't worth the bother. We'll fake it.
doptelem(e, goal) Optimize and canonicalize an expression tree. Fiddle with double operators so that the rvalue is a pointer (this is needed by the 8086 code generator).
elddtor(e, goal) Handle OPddtor
elmsw(e, goal) Handle OPmsw.
elpair(e, goal) Handle OPpair, OPrpair.
elstruct(e, goal) See if we can replace struct operations with simpler ones. For OPstreq and OPstrpar.
fcost(e) For floating point expressions, the cost would be the number of registers in the FPU stack needed.
fillinops(ops, opsi, maxops, oper, e) Fill in ops[maxops] with operands of repeated operator oper.
postoptelem(e) Do optimizations after bltailrecursion() and before common subexpressions.
swaprel(op) Swap relational operators (like if we swapped the leaves).


Walter Bright


Boost License 1.0