Applied patch #2762516
[fw/sdcc] / src / SDCCcse.h
index e398dcc927f085a3c786125b64b393724023a235..1926dd84a4112b19ddf87caa6e0f9d5ddf0da0ae 100644 (file)
 #ifndef SDCCCSE_H
 #define SDCCCSE_H 1
 
-typedef struct cseDef {
-    
-    unsigned int key;
-    operand *sym    ;            /* defining symbol */
-    iCode  *diCode ;             /* defining instruction */
+typedef struct cseDef
+  {
 
-} cseDef ;
+    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;
 
 
 cseDef *newCseDef (operand *, iCode *);
-int isCseDefEqual ( void *, void *);
-int pcseDef (void *, va_list );
-void algebraicOpts (iCode *);
-DEFSETFUNC(ifDiCodeIsX);
-int ifDiCodeIs (set *,iCode *);
-DEFSETFUNC(ifDefSymIsX);
-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);
-void unsetDefsAndUses ( iCode *) ;
-void updateSpillLocation ( iCode *ic);
-void setUsesDefs (operand *,bitVect *,bitVect *,bitVect **);
-void replaceAllSymBySym (iCode *,operand *,operand *,bitVect **);
+int isCseDefEqual (void *, void *);
+int pcseDef (void *, va_list);
+DEFSETFUNC (ifDiCodeIsX);
+int ifDiCodeIs (set *, iCode *);
+DEFSETFUNC (ifDefSymIsX);
+int ifDefSymIs (set *, operand *);
+DEFSETFUNC (findPrevIc);
+DEFSETFUNC (ifOperandsHave);
+DEFSETFUNC (findCheaperOp);
+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