[llvm] r335977 - [llvm-mca] Remove field HasReadAdvanceEntries from class ReadDescriptor.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 07:24:46 PDT 2018
Author: adibiagio
Date: Fri Jun 29 07:24:46 2018
New Revision: 335977
URL: http://llvm.org/viewvc/llvm-project?rev=335977&view=rev
Log:
[llvm-mca] Remove field HasReadAdvanceEntries from class ReadDescriptor.
This simplifies the logic that updates RAW dependencies in the DispatchStage.
There is no advantage in storing that flag in the ReadDescriptor; we should
simply rely on the call to `STI.getReadAdvanceCycles()` to obtain the
ReadAdvance cycles. If there are no read-advance entries, then method
`getReadAdvanceCycles()` quickly returns 0.
No functional change intended.
Modified:
llvm/trunk/tools/llvm-mca/DispatchStage.cpp
llvm/trunk/tools/llvm-mca/InstrBuilder.cpp
llvm/trunk/tools/llvm-mca/Instruction.h
Modified: llvm/trunk/tools/llvm-mca/DispatchStage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/DispatchStage.cpp?rev=335977&r1=335976&r2=335977&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/DispatchStage.cpp (original)
+++ llvm/trunk/tools/llvm-mca/DispatchStage.cpp Fri Jun 29 07:24:46 2018
@@ -82,12 +82,6 @@ void DispatchStage::updateRAWDependencie
// For each write, check if we have ReadAdvance information, and use it
// to figure out in how many cycles this read becomes available.
const ReadDescriptor &RD = RS.getDescriptor();
- if (!RD.HasReadAdvanceEntries) {
- for (WriteRef &WR : DependentWrites)
- WR.getWriteState()->addUser(&RS, /* ReadAdvance */ 0);
- return;
- }
-
const MCSchedModel &SM = STI.getSchedModel();
const MCSchedClassDesc *SC = SM.getSchedClassDesc(RD.SchedClassID);
for (WriteRef &WR : DependentWrites) {
Modified: llvm/trunk/tools/llvm-mca/InstrBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/InstrBuilder.cpp?rev=335977&r1=335976&r2=335977&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/InstrBuilder.cpp (original)
+++ llvm/trunk/tools/llvm-mca/InstrBuilder.cpp Fri Jun 29 07:24:46 2018
@@ -265,8 +265,6 @@ static void populateReads(InstrDesc &ID,
const MCSchedClassDesc &SCDesc,
const MCSubtargetInfo &STI) {
unsigned SchedClassID = MCDesc.getSchedClass();
- bool HasReadAdvanceEntries = SCDesc.NumReadAdvanceEntries > 0;
-
unsigned i = 0;
unsigned NumExplicitDefs = MCDesc.getNumDefs();
// Skip explicit definitions.
@@ -295,7 +293,6 @@ static void populateReads(InstrDesc &ID,
ReadDescriptor &Read = ID.Reads[CurrentUse];
Read.OpIndex = i + CurrentUse;
Read.UseIndex = CurrentUse;
- Read.HasReadAdvanceEntries = HasReadAdvanceEntries;
Read.SchedClassID = SchedClassID;
LLVM_DEBUG(dbgs() << "\t\tOpIdx=" << Read.OpIndex);
}
@@ -305,7 +302,6 @@ static void populateReads(InstrDesc &ID,
Read.OpIndex = ~CurrentUse;
Read.UseIndex = NumExplicitUses + CurrentUse;
Read.RegisterID = MCDesc.getImplicitUses()[CurrentUse];
- Read.HasReadAdvanceEntries = HasReadAdvanceEntries;
Read.SchedClassID = SchedClassID;
LLVM_DEBUG(dbgs() << "\t\tOpIdx=" << Read.OpIndex
<< ", RegisterID=" << Read.RegisterID << '\n');
Modified: llvm/trunk/tools/llvm-mca/Instruction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/Instruction.h?rev=335977&r1=335976&r2=335977&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/Instruction.h (original)
+++ llvm/trunk/tools/llvm-mca/Instruction.h Fri Jun 29 07:24:46 2018
@@ -77,11 +77,6 @@ struct ReadDescriptor {
// Scheduling Class Index. It is used to query the scheduling model for the
// MCSchedClassDesc object.
unsigned SchedClassID;
- // True if there may be a local forwarding logic in hardware to serve a
- // write used by this read. This information, along with SchedClassID, is
- // used to dynamically check at Instruction creation time, if the input
- // operands can benefit from a ReadAdvance bonus.
- bool HasReadAdvanceEntries;
bool isImplicitRead() const { return OpIndex < 0; };
};
More information about the llvm-commits
mailing list