[PATCH] D150664: MachineCombiner: use height in improvesCriticialPathLen()
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 17 00:04:08 PDT 2023
shiva0217 added a comment.
Theoretically, NewRootHeight and OldRootHeight should be equal.
Does it make sense to remove the Heights calculations?
================
Comment at: llvm/lib/CodeGen/MachineCombiner.cpp:269
+ MachineInstr *UseInstr = UI->getParent();
+ HeightOp = BlockTrace.getInstrCycles(*UseInstr).Height;
+ int DefIdx = DefInstr->findRegisterDefOperandIdx(MO.getReg());
----------------
In MachineTraceMetrics::Ensemble::computeInstrHeights function, Loop header PHI heights are all 0.
It seems it could be addressed by defining.
unsigned
MachineTraceMetrics::Trace::getPHIHeight(const MachineInstr &PHI) const{
// Loop header PHI heights are all 0.
return TBI.Succ ? getInstrCycles(PHI).Height : 0;
}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150664/new/
https://reviews.llvm.org/D150664
More information about the llvm-commits
mailing list