[PATCH] D141017: [MachineCombiner] Use default latency model when no detailed model available
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 5 07:45:18 PST 2023
reames added a comment.
In D141017#4027369 <https://reviews.llvm.org/D141017#4027369>, @lebedev.ri wrote:
>> the default latency information available from TargetSchedule.
>
> Could you add some more wording here please?
> Where does it come from?
TargetSchedModel::computeOperandLatency and computeInstrLatency, end up calling defaultDefLatency. That in turns end up returning 0 for transient instructions, MCSchedModel.LoadLatency for loads, MCSchedModel.HighLatency for "high latency defs", and 1 for everything else.
The TargeSchedModel is initialized from the MCSchedModule and the subtarget info. It mostly just pulls information from the MCSchedModel. The MCSchedModel is initialized (when no mcpu is defined) to a default initialized instance of the class (see GetDefaultSchedModel and MCSchedule.cpp Ln 25). The default values for LoadLatency and HighLatency are 4 and 10 respectively.
isHighLatencyDef defaults to false, and only x86 and AMDGPU override it. AMDGPU isn't interesting as it doesn't use MachineCombiner. X86 lists a set of divides, sqrts, scatter, and gather instructions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141017/new/
https://reviews.llvm.org/D141017
More information about the llvm-commits
mailing list