This one enhances the infrastructure ... now each port (target/architecture)
what is are best candidates for Common sub expression elimination.
port->cseOk (iCode *ic, iCode *pdic) -- is called whenever the compiler
finds a common
sub expression that it can eliminate... although cse's are generally good
they also increase
register pressure.... essentially the cseOk function is called to ask the
I can replace "ic" with "pdic" is it worth it ?.. I have created a small
estimation function for
ds390 & mcs51 port to start with ("cseCostEstimation").. this function will
not allow cross block elimination of add, subtract & bit wise operations..
the savings are
substantial ...for the little routine in rt.c (attached).. see
rt.ds390.oldcse.asm (it has
4 slocs).. whereas rt.ds390.newcse.asm has only ONE ...the code size
decrease is also
As usual feedback & comments are more than welcome...
I must take this opportunity to thank Michael Hope, his additions to the
the separation of the port->* structure ) make these kinds of optimizations
"A little paranoia is a good propeller" -- Don Van Vliet.