Skip to content

Commit aa8b54e

Browse files
committed
add clarifying comment
1 parent ca3aa71 commit aa8b54e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CustomStages/MCADFetchDelayStage.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ llvm::Error MCADFetchDelayStage::forwardDueInstrs() {
2626
}
2727

2828
llvm::Error MCADFetchDelayStage::execute(llvm::mca::InstRef &IR) {
29+
// We (ab-)use the LastGenericEventType to create a notification when the instruction first enters this stage.
30+
// We use this elsewhere to calculate the number of cycles between when an instruction first enters the pipeline and the end of its execution.
2931
notifyEvent<llvm::mca::HWInstructionEvent>(llvm::mca::HWInstructionEvent(llvm::mca::HWInstructionEvent::LastGenericEventType, IR));
3032
const llvm::mca::Instruction *I = IR.getInstruction();
3133
const llvm::mca::InstrDesc &ID = I->getDesc();

0 commit comments

Comments
 (0)