removed some more dependencies on array indices, refactored out forward Long Defs checking

This commit is contained in:
Artur K
2012-02-26 00:11:55 +01:00
parent 9a6788fd2d
commit 268a015d01
40 changed files with 242 additions and 2339 deletions

View File

@@ -120,11 +120,12 @@ public:
void newRegArg(ICODE *picode, ICODE *ticode);
protected:
// TODO: replace those with friend visitor ?
void propLongReg(Int loc_ident_idx, ID *pLocId);
void propLongReg(Int loc_ident_idx, const ID *pLocId);
void propLongStk(Int i, ID *pLocId);
void propLongGlb(Int i, ID *pLocId);
int checkBackwarLongDefs(int loc_ident_idx, ID *pLocId, int pLocId_idx, Assignment &assign);
int checkBackwarLongDefs(int loc_ident_idx, const ID &pLocId, iICODE iter, Assignment &assign);
int checkForwardLongDefs(int loc_ident_idx, const ID &pLocId, iICODE beg, Assignment &asgn);
void structCases();
void findExps();
void genDU1();

View File

@@ -204,8 +204,8 @@ Int power2 (Int);
void inverseCondOp (COND_EXPR **);
/* Exported funcions from locident.c */
boolT checkLongEq (LONG_STKID_TYPE, iICODE, Int, Int, Function *, COND_EXPR **,COND_EXPR **, Int);
boolT checkLongRegEq (LONGID_TYPE, iICODE, Int, Int, Function *, COND_EXPR *&, COND_EXPR *&, Int);
boolT checkLongEq (LONG_STKID_TYPE, iICODE, Int, Function *, COND_EXPR **, COND_EXPR **, Int);
boolT checkLongRegEq (LONGID_TYPE, iICODE, Int, Function *, COND_EXPR *&, COND_EXPR *&, Int);
byte otherLongRegi (byte, Int, LOCAL_ID *);
void insertIdx (IDX_ARRAY *, Int);

View File

@@ -7,9 +7,12 @@
#pragma once
#include <vector>
#include <set>
#include <algorithm>
#include "icode.h"
/* Type definition */
// this array has to stay in-order of addition i.e. not std::set<iICODE,std::less<iICODE> >
// TODO: why ?
struct IDX_ARRAY : public std::vector<iICODE>
{
bool inList(iICODE idx)