[llvm] r354154 - [MCA] Improved code comment. NFC
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 15 10:28:11 PST 2019
Author: adibiagio
Date: Fri Feb 15 10:28:11 2019
New Revision: 354154
URL: http://llvm.org/viewvc/llvm-project?rev=354154&view=rev
Log:
[MCA] Improved code comment. NFC
Modified:
llvm/trunk/include/llvm/MCA/HardwareUnits/Scheduler.h
llvm/trunk/lib/MCA/Instruction.cpp
Modified: llvm/trunk/include/llvm/MCA/HardwareUnits/Scheduler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MCA/HardwareUnits/Scheduler.h?rev=354154&r1=354153&r2=354154&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MCA/HardwareUnits/Scheduler.h (original)
+++ llvm/trunk/include/llvm/MCA/HardwareUnits/Scheduler.h Fri Feb 15 10:28:11 2019
@@ -80,24 +80,26 @@ class Scheduler : public HardwareUnit {
// the instruction stage (see Instruction::InstrStage).
//
// An Instruction dispatched to the Scheduler is added to the WaitSet if not
- // all its register operands are available, and at least one latency is unknown.
- // By construction, the WaitSet only contains instructions that are in the
- // IS_DISPATCHED stage.
+ // all its register operands are available, and at least one latency is
+ // unknown. By construction, the WaitSet only contains instructions that are
+ // in the IS_DISPATCHED stage.
//
// An Instruction transitions from the WaitSet to the PendingSet if the
- // instruction is not ready yet, but the latency of every register read is known.
- // Instructions in the PendingSet are expected to be in the IS_PENDING stage.
+ // instruction is not ready yet, but the latency of every register read is
+ // known. Instructions in the PendingSet can only be in the IS_PENDING or
+ // IS_READY stage. Only IS_READY instructions that are waiting on memory
+ // dependencies can be added to the PendingSet.
//
// Instructions in the PendingSet are immediately dominated only by
- // instructions that have already been issued to the underlying pipelines.
- // In the presence of bottlenecks caused by data dependencies, the PendingSet
- // can be inspected to identify problematic data dependencies between
+ // instructions that have already been issued to the underlying pipelines. In
+ // the presence of bottlenecks caused by data dependencies, the PendingSet can
+ // be inspected to identify problematic data dependencies between
// instructions.
//
// An instruction is moved to the ReadySet when all register operands become
// available, and all memory dependencies are met. Instructions that are
- // moved from the PendingSet to the ReadySet transition in state from
- // 'IS_PENDING' to 'IS_READY'.
+ // moved from the PendingSet to the ReadySet must transition to the 'IS_READY'
+ // stage.
//
// On every cycle, the Scheduler checks if it can promote instructions from the
// PendingSet to the ReadySet.
Modified: llvm/trunk/lib/MCA/Instruction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MCA/Instruction.cpp?rev=354154&r1=354153&r2=354154&view=diff
==============================================================================
--- llvm/trunk/lib/MCA/Instruction.cpp (original)
+++ llvm/trunk/lib/MCA/Instruction.cpp Fri Feb 15 10:28:11 2019
@@ -127,7 +127,8 @@ void Instruction::dispatch(unsigned RCUT
RCUTokenID = RCUToken;
// Check if input operands are already available.
- update();
+ if (updateDispatched())
+ updatePending();
}
void Instruction::execute() {
More information about the llvm-commits
mailing list