[PATCH] D46634: RegAllocGreedy-ForceGlobal should use number of Allocatable registers
Muhammad Sarahneh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 02:42:19 PDT 2018
smohser updated this revision to Diff 145887.
smohser added a reviewer: atrick.
smohser added a comment.
delete personal mail
Repository:
rL LLVM
https://reviews.llvm.org/D46634
Files:
lib/CodeGen/RegAllocGreedy.cpp
Index: lib/CodeGen/RegAllocGreedy.cpp
===================================================================
--- lib/CodeGen/RegAllocGreedy.cpp
+++ lib/CodeGen/RegAllocGreedy.cpp
@@ -700,7 +700,7 @@
bool ReverseLocal = TRI->reverseLocalAssignment();
const TargetRegisterClass &RC = *MRI->getRegClass(Reg);
bool ForceGlobal = !ReverseLocal &&
- (Size / SlotIndex::InstrDist) > (2 * RC.getNumRegs());
+ (Size / SlotIndex::InstrDist) > (2 * RegClassInfo.getNumAllocatableRegs(&RC));
if (ExtraRegInfo[Reg].Stage == RS_Assign && !ForceGlobal && !LI->empty() &&
LIS->intervalIsInOneMBB(*LI)) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46634.145887.patch
Type: text/x-patch
Size: 626 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180509/02d34574/attachment.bin>
More information about the llvm-commits
mailing list