This one-linear fix improves compilation time for about ~40% on ASAN enabled code.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | ||
---|---|---|
995 | Maybe adjust the debug statement to say it's unchanged |
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | ||
---|---|---|
995 | Plus this is mayCauseSpilling and falsely claiming true, should this check be in the caller? |
Interesting. Why exactly does this improve compile time so much? I thought reverting scheduling wasn't exactly expensive and the RP tracking was the problem.
llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp | ||
---|---|---|
995 | Agreed. Can we put it in the base class shouldRevertScheduling? |
The number of reverted regions dropped from 34813 to 1289 in my testcase but they're RP measured anyway and this is strange.
I was a bit inaccurate in wording - ~40% improvement is only for scheduling, not the overall compile time.
Rebased, moved the check into shouldRevertScheduling of two stages:
OccInitialScheduleStage
ClusteredLowOccStage
I don't add it to the unclustered stage as this schedule should only be kept if some improvement in RP is achieved.
Maybe adjust the debug statement to say it's unchanged