[llvm] [AArch64] Improve scheduling latency into Bundles (PR #86310)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 23 06:24:13 PDT 2024
================
@@ -472,6 +472,52 @@ void AArch64Subtarget::overrideSchedPolicy(MachineSchedPolicy &Policy,
Policy.DisableLatencyHeuristic = DisableLatencySchedHeuristic;
}
+void AArch64Subtarget::adjustSchedDependency(
+ SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep,
+ const TargetSchedModel *SchedModel) const {
+ if (!SchedModel || Dep.getKind() != SDep::Kind::Data || !Dep.getReg() ||
+ !Def->isInstr() || !Use->isInstr() ||
+ (Def->getInstr()->getOpcode() != TargetOpcode::BUNDLE &&
+ Use->getInstr()->getOpcode() != TargetOpcode::BUNDLE))
+ return;
+
+ // If the Def is a BUNDLE, find the last instruction in the bundle that defs
----------------
arsenm wrote:
I think most of this code would disappear if you used mi_bundle_ops or AnalyzeVirtRegInBundle
https://github.com/llvm/llvm-project/pull/86310
More information about the llvm-commits
mailing list