1 /*-------------------------------------------------------------------------
3 pcoderegs.h - post code generation register optimizations
5 Written By - Scott Dattalo scott@dattalo.com
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
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.
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.
21 -------------------------------------------------------------------------*/
23 #ifndef __PCODEREGS_H__
24 #define __PCODEREGS_H__
30 /*************************************************
34 Records the set of registers used in a flow object.
36 **************************************************/
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 */
45 void pCodeRegMapLiveRanges(struct pBlock *pb);
46 void pCodeRegOptimizeRegUsage(int level);
47 void RegsUnMapLiveRanges(void);
48 void RemoveUnusedRegisters(void);
50 #endif // __PCODEREGS_H__