[PATCH] D90144: [Scheduling] Fall back to the fast cluster algorithm if the DAG is too complex
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 26 03:22:43 PDT 2020
steven.zhang created this revision.
steven.zhang added reviewers: foad, resistor, arsenm, fhahn, evandro, jsji, PowerPC.
Herald added subscribers: ecnelises, mgrang, javed.absar, hiraditya, kristof.beyls, MatzeB.
Herald added a project: LLVM.
steven.zhang requested review of this revision.
Herald added a subscriber: wdng.
We have added a new load/store cluster algorithm in D85517 <https://reviews.llvm.org/D85517>. However, AArch64 see some compiling deg with the new algorithm as the IsReachable() is not cheap if the DAG is complex. O(M+N) See https://bugs.llvm.org/show_bug.cgi?id=47966
So, this patch added a heuristic to switch to old cluster algorithm if the DAG is too complex. For now, I used the heuristic value 5M for NumOfStores * NumOfSUnits. This is a rough threshold as I don't see compiling time impact with it and it is large enough I think. Welcome for more comments.
The case in https://bugs.llvm.org/show_bug.cgi?id=47966 is that, we have ~10000 LdSt and ~15000 SUnits in one region, which blow up the compiling time.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90144
Files:
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/test/CodeGen/AArch64/aarch64-stp-cluster.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90144.300613.patch
Type: text/x-patch
Size: 6410 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201026/2a42a46e/attachment-0001.bin>
More information about the llvm-commits
mailing list