moved struct DU_ICODE into ICODE, alse replaced newRegArg pointer params with iterators

This commit is contained in:
Artur K
2012-02-28 16:50:15 +01:00
parent fbf8cc3a7a
commit e0503c71a3
4 changed files with 24 additions and 28 deletions

View File

@@ -118,7 +118,7 @@ public:
void structLoops(derSeq *derivedG);
void buildCFG();
void controlFlowAnalysis();
void newRegArg(ICODE *picode, ICODE *ticode);
void newRegArg(iICODE picode, iICODE ticode);
protected:
// TODO: replace those with friend visitor ?
void propLongReg(Int loc_ident_idx, const ID &pLocId);

View File

@@ -247,17 +247,6 @@ struct DU
byte u;
};
/* Def/Use of registers and stack variables */
struct DU_ICODE
{
std::bitset<32> def; // For Registers: position in bitset is reg index
//dword def; // For Registers: position in dword is reg index
//dword def; // For Registers: position in dword is reg index
std::bitset<32> use; // For Registers: position in dword is reg index
std::bitset<32> lastDefRegi;// Bit set if last def of this register in BB
};
/* Definition-use chain for level 1 (within a basic block) */
#define MAX_REGS_DEF 2 /* 2 regs def'd for long-reg vars */
#define MAX_USES 5
@@ -347,6 +336,13 @@ struct LLInst : public llvm::MCInst
/* Icode definition: LOW_LEVEL and HIGH_LEVEL */
struct ICODE
{
/* Def/Use of registers and stack variables */
struct DU_ICODE
{
std::bitset<32> def; // For Registers: position in bitset is reg index
std::bitset<32> use; // For Registers: position in dword is reg index
std::bitset<32> lastDefRegi;// Bit set if last def of this register in BB
};
struct DU1
{
struct DefUse