X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCcse.h;h=1926dd84a4112b19ddf87caa6e0f9d5ddf0da0ae;hb=3bd25d75bcad68055bb616dcc29dde8a2965965e;hp=023afd1adc105b425efb8e2c14060298cbdf4c79;hpb=c6dacaa60503208dcaf4756be76d412ff1c59905;p=fw%2Fsdcc diff --git a/src/SDCCcse.h b/src/SDCCcse.h index 023afd1a..1926dd84 100644 --- a/src/SDCCcse.h +++ b/src/SDCCcse.h @@ -31,10 +31,13 @@ typedef struct cseDef { - unsigned int key; + int key; operand *sym; /* defining symbol */ iCode *diCode; /* defining instruction */ - + bitVect *ancestors; /* keys of the symbol's ancestors */ + int fromGlobal:1; /* defining symbol's value computed from a global */ + int fromAddrTaken:1; /* defining symbol's value computed from a */ + /* symbol whose address was taken */ } cseDef; @@ -42,7 +45,6 @@ cseDef; cseDef *newCseDef (operand *, iCode *); int isCseDefEqual (void *, void *); int pcseDef (void *, va_list); -void algebraicOpts (iCode *); DEFSETFUNC (ifDiCodeIsX); int ifDiCodeIs (set *, iCode *); DEFSETFUNC (ifDefSymIsX); @@ -50,12 +52,12 @@ int ifDefSymIs (set *, operand *); DEFSETFUNC (findPrevIc); DEFSETFUNC (ifOperandsHave); DEFSETFUNC (findCheaperOp); -int cseBBlock (eBBlock *, int, eBBlock **, int); -int cseAllBlocks (eBBlock **, int); -void ifxOptimize (iCode *, set *, int, eBBlock *, int *, eBBlock **, int); +int cseBBlock (eBBlock *, int, ebbIndex *); +int cseAllBlocks (ebbIndex *, int computeOnly); void unsetDefsAndUses (iCode *); void updateSpillLocation (iCode * ic,int); void setUsesDefs (operand *, bitVect *, bitVect *, bitVect **); void replaceAllSymBySym (iCode *, operand *, operand *, bitVect **); iCode *findBackwardDef(operand *,iCode *); +void ReplaceOpWithCheaperOp(operand **op, operand *cop); #endif