[PATCH] D62401: [AMDGPU] Speed up live-in virtual register set computaion in GCNScheduleDAGMILive
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 09:06:34 PDT 2019
vpykhtin created this revision.
vpykhtin added a reviewer: rampitec.
Herald added subscribers: llvm-commits, mgrang, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm, MatzeB.
Herald added a project: LLVM.
On functions with large number of basic block live-in virtual register set computation on every BB in the scheduler takes very long time. Currently it has complexity:
C1 = O(NumVirtRegs * lg(averageLiveRangeSegmentsPerReg) * BBNumber).
This patch changes the complexity to:
C2 = O(NumVirtRegs * averageLiveRangeSegmentsPerReg * lg(BBNumber)).
For this purpose live-ins are calculated all at once for all BBs. BB's starting SlotIndexes are collected and sorted and then searched using binary seach from within LiveRange segments giving logarithm on BB number. This gives almost 3 times speedup on luxmark hotel scene.
Repository:
rL LLVM
https://reviews.llvm.org/D62401
Files:
include/llvm/CodeGen/LiveInterval.h
lib/Target/AMDGPU/GCNRegPressure.cpp
lib/Target/AMDGPU/GCNRegPressure.h
lib/Target/AMDGPU/GCNSchedStrategy.cpp
lib/Target/AMDGPU/GCNSchedStrategy.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62401.201265.patch
Type: text/x-patch
Size: 6572 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/a03388d0/attachment.bin>
More information about the llvm-commits
mailing list