Use 'ao-dbg' instead of 's51' to communicate with TeleMetrum
[fw/sdcc] / src / SDCCcse.h
1 /*-------------------------------------------------------------------------
2
3   SDCCcse.h - header file for Common Subexpressions
4
5              Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1998)
6
7    This program is free software; you can redistribute it and/or modify it
8    under the terms of the GNU General Public License as published by the
9    Free Software Foundation; either version 2, or (at your option) any
10    later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20    
21    In other words, you are welcome to use, share and improve this program.
22    You are forbidden to forbid anyone else to use, share and improve
23    what you give them.   Help stamp out software-hoarding!  
24 -------------------------------------------------------------------------*/
25
26 #include "SDCCicode.h"
27
28 #ifndef SDCCCSE_H
29 #define SDCCCSE_H 1
30
31 typedef struct cseDef
32   {
33
34     int key;
35     operand *sym;               /* defining symbol */
36     iCode *diCode;              /* defining instruction */
37     bitVect *ancestors;         /* keys of the symbol's ancestors */
38     int fromGlobal:1;           /* defining symbol's value computed from a global */
39     int fromAddrTaken:1;        /* defining symbol's value computed from a */
40                                 /*   symbol whose address was taken */
41   }
42 cseDef;
43
44
45 cseDef *newCseDef (operand *, iCode *);
46 int isCseDefEqual (void *, void *);
47 int pcseDef (void *, va_list);
48 DEFSETFUNC (ifDiCodeIsX);
49 int ifDiCodeIs (set *, iCode *);
50 DEFSETFUNC (ifDefSymIsX);
51 int ifDefSymIs (set *, operand *);
52 DEFSETFUNC (findPrevIc);
53 DEFSETFUNC (ifOperandsHave);
54 DEFSETFUNC (findCheaperOp);
55 int cseBBlock (eBBlock *, int, ebbIndex *);
56 int cseAllBlocks (ebbIndex *, int computeOnly);
57 void unsetDefsAndUses (iCode *);
58 void updateSpillLocation (iCode * ic,int);
59 void setUsesDefs (operand *, bitVect *, bitVect *, bitVect **);
60 void replaceAllSymBySym (iCode *, operand *, operand *, bitVect **);
61 iCode *findBackwardDef(operand *,iCode *);
62 void ReplaceOpWithCheaperOp(operand **op, operand *cop);
63 #endif