Basic block is purer range now, it does not hold start and length members, it can be used in range based fors now

This commit is contained in:
Artur K
2012-03-08 00:20:13 +01:00
parent fc0d35cf06
commit 69d848ca78
17 changed files with 403 additions and 400 deletions

View File

@@ -132,12 +132,17 @@ bool Idiom4::match(iICODE pIcode)
if (pIcode->ll()->testFlags(I) )
{
m_param_count = (int16_t)pIcode->ll()->src.op();
return true;
}
return false;
}
int Idiom4::action()
{
for(size_t idx=0; idx<m_icodes.size()-1; ++idx) // don't invalidate last entry
m_icodes[idx]->invalidate();
if( ! m_icodes.empty()) // if not an empty RET[F] N
{
for(size_t idx=0; idx<m_icodes.size()-1; ++idx) // invalidate all but the RET
m_icodes[idx]->invalidate();
}
if(m_param_count)
{
m_func->cbParam = (int16_t)m_param_count;

View File

@@ -127,7 +127,7 @@ bool Idiom10::match(iICODE pIcode)
int Idiom10::action()
{
m_icodes[0]->ll()->set(iCMP,I);
m_icodes[0]->ll()->src.SetImmediateOp(0); // todo check if proc should be zeroed too
m_icodes[0]->ll()->src.SetImmediateOp(0); //TODO: check if proc should be zeroed too
m_icodes[0]->du.def = 0;
m_icodes[0]->du1.numRegsDef = 0;
return 2;