[Scheduling] Fall back to the fast cluster algorithm if the DAG is too complex
authorQingShan Zhang <qshanz@cn.ibm.com>
Mon, 2 Nov 2020 02:06:14 +0000 (02:06 +0000)
committerQingShan Zhang <qshanz@cn.ibm.com>
Mon, 2 Nov 2020 02:11:52 +0000 (02:11 +0000)
commit1d178d600af77599b398930a640991c9c965a47c
treebb7d2bbbef9514890e9c4aec790fcf64b4929621
parent0949f96dc6521be80ebb8ebc1e1c506165c22aac
[Scheduling] Fall back to the fast cluster algorithm if the DAG is too complex

We have added a new load/store cluster algorithm in 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.

Reviewed By: Owen Anderson

Differential Revision: https://reviews.llvm.org/D90144
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/test/CodeGen/AArch64/aarch64-stp-cluster.ll