Imported Upstream version 2.9.0
[debian/cc1111] / src / pic / pcoderegs.h
1 /*-------------------------------------------------------------------------
2
3    pcoderegs.h - post code generation register optimizations
4
5    Written By -  Scott Dattalo scott@dattalo.com
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 -------------------------------------------------------------------------*/
22
23 #ifndef __PCODEREGS_H__
24 #define __PCODEREGS_H__
25
26 #include "common.h"
27
28 #include "pcode.h"
29
30 /*************************************************
31
32   pCodeRegLives 
33
34   Records the set of registers used in a flow object.
35
36 **************************************************/
37
38 typedef struct pCodeRegLives {
39         set *usedpFlows;       /* set of pFlow objects that use this register */
40         set *assignedpFlows;   /* set of pFlow objects that assign values to this register */
41         set *usedpCodes;       /* set of all instructions that use this register */
42
43 } pCodeRegLives;
44
45 void pCodeRegMapLiveRanges(struct pBlock *pb);
46 void pCodeRegOptimizeRegUsage(int level);
47 void RegsUnMapLiveRanges(void);
48 void RemoveUnusedRegisters(void);
49
50 #endif //  __PCODEREGS_H__