When we are scheduling the load and addi, if all other heuristic didn't take effect, we will try to schedule the addi before the load, to hide the latency, and avoid the true dependency added by RA. And this only take effects for Power9.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I think we should update the title or summary to indicate that this is P9 only.
llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp | ||
---|---|---|
12 ↗ | (On Diff #199549) | Can this be a lamda or std::function? |
32 ↗ | (On Diff #199549) | These logic are similar to above, just swapped the Candidates. Cand1st= Zone.isTop() ? TryCand.SU->getInstr(): Cand.SU->getInstr(); Cand2nd= Zone.isTop() ? Cand.SU->getInstr(): *TryCand.SU->getInstr(); if(isADDIInstr(*Cand1st)) && Cand2nd->mayLoad())){ ... } .. |
61 ↗ | (On Diff #199549) | Can we add an option to disable this heuristic? |
llvm/lib/Target/PowerPC/PPCMachineScheduler.h | ||
29 ↗ | (On Diff #199549) | I am seeing this as a bias heuristic, so maybe biasAddi? |
llvm/test/CodeGen/PowerPC/schedule-addi-load.mir | ||
1 ↗ | (On Diff #199549) | Can we commit this testcase as a NFC before this patch? So that the only difference in this patch will be the scheduling change. Thanks. |
2 ↗ | (On Diff #199549) | We can also add a test for the newly added option to disable this heuristic |
3 ↗ | (On Diff #199549) | Add a line as a negative test for pwr8 , as it doesn't use FeaturePPCPreRASched. |