#include <Renamer.h>
Onikiri::Renamerに対する継承グラフ
typedef PipelineNodeBase Onikiri::Renamer::BaseType [protected] |
typedef fixed_sized_buffer< OpIterator, MAX_RENAMING_OPS, Renamer > Onikiri::Renamer::RenamingOpArray [protected] |
Renamer::~Renamer | ( | ) | [virtual] |
void Renamer::BackupOnCheckpoint | ( | OpIterator | op, | |
bool | before | |||
) | [protected] |
Renamer.cpp の 187 行で定義されています。
参照先 Onikiri::Core::IsRequiredCheckpointAfter()・Onikiri::Core::IsRequiredCheckpointBefore()・Onikiri::CheckpointMaster::SLOT_RENAME.
参照元 ProcessNOP()・Update().
00188 { 00189 Core* core = op->GetCore(); 00190 PC pc = op->GetPC(); 00191 OpInfo* opInfo = op->GetOpInfo(); 00192 00193 if( before && core->IsRequiredCheckpointBefore( pc, opInfo ) ){ 00194 CheckpointMaster* master = op->GetThread()->GetCheckpointMaster(); 00195 master->Backup( op->GetBeforeCheckpoint(), CheckpointMaster::SLOT_RENAME ); 00196 } 00197 00198 if( !before && core->IsRequiredCheckpointAfter( pc, opInfo ) ){ 00199 CheckpointMaster* master = op->GetThread()->GetCheckpointMaster(); 00200 master->Backup( op->GetAfterCheckpoint(), CheckpointMaster::SLOT_RENAME ); 00201 } 00202 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
Onikiri::Renamer::BEGIN_PARAM_PATH | ( | GetResultPath() | ) |
Onikiri::Renamer::BEGIN_PARAM_PATH | ( | GetParamPath() | ) |
bool Renamer::CanRename | ( | RenamingOpArray * | renamingOps | ) | [protected] |
Renamer.cpp の 204 行で定義されています。
参照先 ASSERT・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::at()・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::begin()・Onikiri::PipelineNodeBase::CanAllocate()・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::data()・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::end()・m_memDepPred・m_memOrderManager・m_regDepPred・m_stallCycles・Onikiri::Renamer::StallCycles::memDepPred・Onikiri::Renamer::StallCycles::memOrderManager・Onikiri::Renamer::StallCycles::regDepPred・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::size()・THROW_RUNTIME_ERROR.
参照元 Evaluate().
00205 { 00206 if( renamingOps->size() == 0 ){ 00207 THROW_RUNTIME_ERROR("Renaming 0 op."); 00208 } 00209 00210 // Stall rename stages if there are any threads that can not allocate RMT etc.. entries. 00211 int numOps = 0; 00212 int numMemOps = 0; // 00213 int localTID = renamingOps->at(0)->GetLocalTID(); 00214 00215 for( RenamingOpArray::iterator i = renamingOps->begin(); i != renamingOps->end(); ++i ){ 00216 ASSERT( 00217 (*i)->GetLocalTID() == localTID, 00218 "Mixed thread ops can not be renamed in one cycle." 00219 ); 00220 numOps++; 00221 if( (*i)->GetOpClass().IsMem() ) { 00222 numMemOps++; 00223 } 00224 } 00225 00226 // regDepPred `FbN 00227 if( !m_regDepPred[localTID]->CanAllocate( renamingOps->data(), numOps ) ) { 00228 ++m_stallCycles.regDepPred; 00229 return false; 00230 } 00231 00232 // memDepPred `FbN 00233 if( !m_memDepPred[localTID]->CanAllocate( renamingOps->data(), numOps ) ) { 00234 ++m_stallCycles.memDepPred; 00235 return false; 00236 } 00237 00238 // memOrderManager `FbN 00239 if( !m_memOrderManager[localTID]->CanAllocate( renamingOps->data(), numOps ) ) { 00240 ++m_stallCycles.memOrderManager; 00241 return false; 00242 } 00243 00244 return true; 00245 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::Commit | ( | OpIterator | op | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Renamer.cpp の 341 行で定義されています。
参照先 Onikiri::LatPred::Commit()・m_latPred.
参照元 Onikiri::InorderList::NotifyCommit().
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::CreateMemOrderManagerEntry | ( | OpIterator | op | ) | [protected] |
Renamer.cpp の 162 行で定義されています。
参照元 Update().
00163 { 00164 if( op->GetOpClass().IsMem() ){ 00165 op->GetThread()->GetMemOrderManager()->Allocate( op ); 00166 } 00167 }
Here is the caller graph for this function:
void Renamer::EnterPipeline | ( | OpIterator | op | ) | [protected] |
Renamer.cpp の 268 行で定義されています。
参照先 Onikiri::DS_RENAME・Onikiri::Dumper::Dump()・Onikiri::Pipeline::EnterPipeline()・Onikiri::g_dumper・Onikiri::PipelineNodeBase::GetLowerPipeline()・Onikiri::PipelineNodeBase::GetLowerPipelineNode()・m_renameLatency・Onikiri::OpStatus::OS_RENAME.
参照元 Update().
00269 { 00270 GetLowerPipeline()->EnterPipeline( op, m_renameLatency - 1, GetLowerPipelineNode() ); 00271 op->SetStatus( OpStatus::OS_RENAME ); 00272 g_dumper.Dump( DS_RENAME, op ); 00273 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::Evaluate | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Renamer.cpp の 276 行で定義されています。
参照先 Onikiri::PipelineLatch::begin()・CanRename()・Onikiri::PipelineLatch::end()・Onikiri::ClockedResourceBase::Evaluate()・HOOK_SECTION_OP・Onikiri::PipelineNodeBase::m_latch・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::push_back()・s_renameEvaluateHook・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::size()・Onikiri::PipelineNodeBase::StallThisNodeAndUpperThisCycle().
00277 { 00278 BaseType::Evaluate(); 00279 RenamingOpArray renamingOps; 00280 00281 for( PipelineLatch::iterator i = m_latch.begin(); i != m_latch.end(); ++i ){ 00282 HOOK_SECTION_OP( s_renameEvaluateHook, *i ){ 00283 renamingOps.push_back( *i ); 00284 } 00285 } 00286 00287 if( renamingOps.size() > 0 && !CanRename( &renamingOps ) ){ 00288 // Stall this node and upper pipelines. 00289 // Do not stall ops where renaming is already 00290 // started before this cycle. 00291 StallThisNodeAndUpperThisCycle(); 00292 } 00293 }
関数の呼び出しグラフ:
void Renamer::Finalize | ( | ) | [virtual] |
Onikiri::PhysicalResourceNodeを再定義しています。
Renamer.cpp の 110 行で定義されています。
参照先 Onikiri::ClockedResourceBase::GetStalledCycles()・m_stallCycles・Onikiri::Renamer::StallCycles::memDepPred・Onikiri::Renamer::StallCycles::memOrderManager・Onikiri::Renamer::StallCycles::others・Onikiri::Renamer::StallCycles::regDepPred・Onikiri::PhysicalResourceNode::ReleaseParam()・Onikiri::Renamer::StallCycles::total.
00111 { 00112 m_stallCycles.total = GetStalledCycles(); 00113 00114 m_stallCycles.others = 00115 m_stallCycles.total - 00116 m_stallCycles.regDepPred - 00117 m_stallCycles.memDepPred - 00118 m_stallCycles.memOrderManager; 00119 00120 ReleaseParam(); 00121 }
関数の呼び出しグラフ:
void Renamer::ForEachOp | ( | RenamingOpArray * | c, | |
void(Renamer::*)(OpIterator) | func | |||
) | [inline, protected] |
Renamer.cpp の 124 行で定義されています。
参照先 Onikiri::fixed_sized_buffer< T, SIZE, Tag >::begin()・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::end().
参照元 Update().
00127 { 00128 for( RenamingOpArray::iterator i = c->begin(); i != c->end(); ++i ){ 00129 (this->*func)(*i); 00130 } 00131 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::ForEachOp1 | ( | RenamingOpArray * | c, | |
T1 | arg1, | |||
void(Renamer::*)(OpIterator, T1) | func | |||
) | [inline, protected] |
Renamer.cpp の 134 行で定義されています。
参照先 Onikiri::fixed_sized_buffer< T, SIZE, Tag >::begin()・Onikiri::fixed_sized_buffer< T, SIZE, Tag >::end().
参照元 Update().
00138 { 00139 for( RenamingOpArray::iterator i = c->begin(); i != c->end(); ++i ){ 00140 (this->*func)( *i, arg1 ); 00141 } 00142 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
DispatchSteererIF* Onikiri::Renamer::GetSteerer | ( | ) | const [inline] |
参照先 m_steerer.
参照元 Onikiri::InorderSystem::Run().
00096 { return m_steerer; }
Here is the caller graph for this function:
void Renamer::Initialize | ( | InitPhase | phase | ) | [virtual] |
Onikiri::PipelineNodeBaseを再定義しています。
Renamer.cpp の 78 行で定義されています。
参照先 Onikiri::PipelineNodeBase::GetCore()・Onikiri::Core::GetThreadCount()・Onikiri::PhysicalResourceNode::INIT_POST_CONNECTION・Onikiri::PhysicalResourceNode::INIT_PRE_CONNECTION・Onikiri::PipelineNodeBase::Initialize()・Onikiri::ParamExchange::LoadParam()・m_memDepPred・m_memOrderManager・m_regDepPred・m_renameLatency・THROW_RUNTIME_ERROR.
00079 { 00080 PipelineNodeBase::Initialize(phase); 00081 00082 if( phase == INIT_PRE_CONNECTION ){ 00083 LoadParam(); 00084 } 00085 else if( phase == INIT_POST_CONNECTION ){ 00086 00087 int threadCount = GetCore()->GetThreadCount(); 00088 if( m_regDepPred.GetSize() != threadCount || 00089 m_memDepPred.GetSize() != threadCount || 00090 m_memOrderManager.GetSize() != threadCount 00091 ){ 00092 THROW_RUNTIME_ERROR( 00093 "The counts of the " 00094 "'regDepPred' (%d), m_memDepPred(%d), memOrderManager(%d) " 00095 "are not equal to the thread coount of the core(%d)." , 00096 m_regDepPred.GetSize(), 00097 m_memDepPred.GetSize(), 00098 m_memOrderManager.GetSize(), 00099 threadCount 00100 ); 00101 } 00102 00103 // member `FbN 00104 if( m_renameLatency == 0 ){ 00105 THROW_RUNTIME_ERROR( "rename latency is zero." ); 00106 } 00107 } 00108 }
関数の呼び出しグラフ:
void Renamer::ProcessNOP | ( | OpIterator | op | ) | [protected] |
Renamer.cpp の 249 行で定義されています。
参照先 ASSERT・BackupOnCheckpoint()・Onikiri::CP_ALL・Onikiri::DS_COMMITTABLE・Onikiri::Dumper::Dump()・Onikiri::g_dumper・Onikiri::OpStatus::OS_NOP.
参照元 Update().
00250 { 00251 ASSERT( op->GetDstRegNum() == 0, "NOP has a destination operand." ); 00252 00253 Core* core = op->GetCore(); 00254 if( core->GetCheckpointingPolicy() == CP_ALL ){ 00255 BackupOnCheckpoint( op, true ); 00256 BackupOnCheckpoint( op, false ); 00257 } 00258 00259 // Set an op finished. 00260 op->SetStatus( OpStatus::OS_NOP ); 00261 g_dumper.Dump( DS_COMMITTABLE, op ); 00262 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::Rename | ( | OpIterator | ) | [protected] |
Renamer.cpp の 145 行で定義されています。
参照先 HOOK_SECTION_OP・m_memDepPred・m_numRenamedOps・m_regDepPred・s_renameUpdateHook.
参照元 Update().
00146 { 00147 // WOHook 00148 HOOK_SECTION_OP( s_renameUpdateHook, op ){ 00149 int tid = op->GetLocalTID(); 00150 // { 00151 m_regDepPred[ tid ]->Resolve( op ); 00152 m_regDepPred[ tid ]->Allocate( op ); 00153 00154 m_memDepPred[ tid ]->Resolve( op ); 00155 m_memDepPred[ tid ]->Allocate( op ); 00156 } 00157 00158 m_numRenamedOps++; 00159 }
Here is the caller graph for this function:
void Renamer::Steer | ( | OpIterator | op | ) | [protected] |
Renamer.cpp の 171 行で定義されています。
参照先 HOOK_SECTION_OP・m_latPred・m_steerer・Onikiri::LatPred::Predict()・s_steerHook・Onikiri::DispatchSteererIF::Steer().
参照元 Update().
00172 { 00173 // Steering 00174 HOOK_SECTION_OP( s_steerHook, op ) 00175 { 00176 Scheduler* sched = m_steerer->Steer( op ); 00177 op->SetScheduler( sched ); 00178 } 00179 00180 // Process after renaming 00181 // - Steer ops to schedulers. 00182 // - Predict latency of an op. 00183 // Latency prediction is done on renaming stages. 00184 m_latPred->Predict( op ); 00185 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Renamer::Update | ( | ) | [virtual] |
Onikiri::ClockedResourceBaseを再定義しています。
Renamer.cpp の 296 行で定義されています。
参照先 ASSERT・BackupOnCheckpoint()・Onikiri::PipelineLatch::begin()・CreateMemOrderManagerEntry()・Onikiri::PipelineLatch::end()・EnterPipeline()・Onikiri::PipelineLatch::erase()・ForEachOp()・ForEachOp1()・Onikiri::OpClassCode::IsNop()・Onikiri::PipelineNodeBase::m_latch・ProcessNOP()・Rename()・Steer().
00297 { 00298 00299 for( PipelineLatch::iterator i = m_latch.begin(); i != m_latch.end(); /*Do not ++i*/ ){ 00300 00301 RenamingOpArray ops; 00302 00303 // Pack micro-ops that belong to one instruction to 'ops' 00304 // for processing one instruction as a unit. 00305 PC orgPC = (*i)->GetPC(); 00306 do{ 00307 ops.push_back( *i ); 00308 i = m_latch.erase( i ); 00309 } 00310 while( i != m_latch.end() && orgPC == (*i)->GetPC() ); 00311 00312 // Process NOP 00313 if( ops[0]->GetOpClass().IsNop() ) { 00314 ASSERT( ops.size() == 1, "NOP is divided to multiple ops." ); 00315 ProcessNOP( ops[0] ); 00316 continue; 00317 } 00318 00319 // Create a checkpoint 00320 ForEachOp1( &ops, true/*before*/, &Renamer::BackupOnCheckpoint ); 00321 00322 // rename 00323 ForEachOp( &ops, &Renamer::Rename ); 00324 00325 // Create a checkpoint 00326 ForEachOp1( &ops, false/*before*/, &Renamer::BackupOnCheckpoint ); 00327 00328 // Create an entry of MemOrderManager 00329 ForEachOp( &ops, &Renamer::CreateMemOrderManagerEntry ); 00330 00331 // Do latency prediction 00332 ForEachOp( &ops, &Renamer::Steer ); 00333 00334 // All processes are done and now enter ops to pipeline. 00335 ForEachOp( &ops, &Renamer::EnterPipeline ); 00336 00337 } 00338 00339 }
関数の呼び出しグラフ:
s64 Onikiri::Renamer::m_numRenamedOps [protected] |
int Onikiri::Renamer::m_renameLatency [protected] |
struct Onikiri::Renamer::StallCycles Onikiri::Renamer::m_stallCycles [protected] |
参照元 CanRename()・Finalize().
DispatchSteererIF* Onikiri::Renamer::m_steerer [protected] |
const int Onikiri::Renamer::MAX_RENAMING_OPS = 16 [static, protected] |
HookPoint< Renamer > Onikiri::Renamer::s_renameEvaluateHook [static] |
HookPoint< Renamer > Onikiri::Renamer::s_renameUpdateHook [static] |
HookPoint< Renamer > Onikiri::Renamer::s_steerHook [static] |