- LI/LI8 are also some form of ADDI
- Fixed the function to check it, the second one should be mayLoad, not !isADDI
According to generated inc file, mtctr is also seen as mayLoad.
Paths
| Differential D105617
[PowerPC] Fix addi-load bias scheduling heuristics AbandonedPublic Authored by qiucf on Jul 8 2021, 2:27 AM.
Details
Diff Detail
Unit TestsFailed Event TimelineHerald added subscribers: javed.absar, kbarton, hiraditya, MatzeB. · View Herald TranscriptJul 8 2021, 2:27 AM
Comment Actions Thanks for the review and explaining the background. Besides changes here, I was trying to refactor tryCandidate to return bool, so that target hooks may reuse it better. However, we still cannot if (GenericScheduler::tryCandidate(...)) return ... since that will not be not an NFC. However that will make this heuristic hack in higher priority. I need to evaluate it and see if we should proceed.
Revision Contents
Diff 357173 llvm/lib/Target/PowerPC/PPCMachineScheduler.cpp
llvm/test/CodeGen/PowerPC/aix-p9-xxinsertw-xxextractuw.ll
llvm/test/CodeGen/PowerPC/aix-vec_extract_p9.ll
llvm/test/CodeGen/PowerPC/aix-vec_extract_p9_2.ll
llvm/test/CodeGen/PowerPC/aix-vec_insert_elt.ll
llvm/test/CodeGen/PowerPC/global-address-non-got-indirect-access.ll
llvm/test/CodeGen/PowerPC/loop-instr-form-prepare.ll
llvm/test/CodeGen/PowerPC/pcrel-got-indirect.ll
llvm/test/CodeGen/PowerPC/pr48519.ll
llvm/test/CodeGen/PowerPC/sms-simple.ll
llvm/test/CodeGen/PowerPC/unaligned-addressing-mode.ll
llvm/test/CodeGen/PowerPC/vec_insert_elt.ll
|
This heuristics was intended for the addi in loop induction variable calculation, not for all addi.
So LI/LI8 shouldn't be counted.
Do you have any specific example that we have LI/LI8 in loop and should schedule them earlier?