Review Board 2.0.15


ARM/Alpha/Cpu: Change prefetchs to be more like normal loads.

Review Request #256 - Created Oct. 2, 2010 and submitted

Information
Ali Saidi
gem5
Reviewers
Default
ARM/Alpha/Cpu: Change prefetchs to be more like normal loads.

This change modifies the way prefetches work. They are now like normal loads
that don't writeback a register. Previously prefetches were supposed to call
prefetch() on the exection context, so they executed with execute() methods
instead of initiateAcc() completeAcc(). The prefetch() methods for all the CPUs
are blank, meaning that they get executed, but don't actually do anything.

On Alpha dead cache copy code was removed and prefetches are now normal ops.
They count as executed operations, but still don't do anything and IsMemRef is
not longer set on them.

On ARM IsDataPrefetch or IsInstructionPreftech is now set on all prefetch
instructions. The timing simple CPU doesn't try to do anything special for
prefetches now and they execute with the normal memory code path.

   
Posted (Nov. 5, 2010, 10:27 a.m.)



  
src/cpu/simple/timing.cc (Diff revision 3)
 
 
I still didn't fix this change, but it is fixed in my local patch
Posted (Nov. 6, 2010, 6:44 p.m.)
Most of these comments are pretty minor, but I think my comment for timing.cc is fairly important. It's not life or death, but there's some low hanging performance there.
src/arch/alpha/isa/mem.isa (Diff revision 3)
 
 
You might want to leave out this new blank line.
src/arch/alpha/isa/mem.isa (Diff revision 3)
 
 
And getting rid of this blank line.
src/arch/alpha/isa/mem.isa (Diff revision 3)
 
 
This doesn't need to be on its own line.
src/cpu/simple/timing.cc (Diff revision 3)
 
 
Could this be supressed in initiateAcc itself? That won't work in other models where the fault doesn't go through initiateAcc on its way back to the CPU, but it would make this check unnecessary.
src/cpu/static_inst.hh (Diff revision 3)
 
 
You could use isInstPrefetch and isDataPrefetch internally here. It's not likely to ever make a difference, but if those other functions ever get more complicated isPrefetch would pick it up automatically. It's fine if you don't, but I thought I'd suggest it.