From 116347e269b421f9ec197da75a796f940cdeb582 Mon Sep 17 00:00:00 2001 From: "Arnaud A. de Grandmaison" Date: Fri, 13 Feb 2015 12:04:42 +0000 Subject: [PATCH] [PBQP] Conservativelly allocatable nodes can be spilled and give a better solution Although such nodes are allocatable, the cost of spilling may be less than allocating to register, so spilling the node may provide a better solution. The assert does not account for this case, so remove it for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229103 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/RegAllocPBQP.h | 3 --- lib/CodeGen/RegAllocPBQP.cpp | 2 -- 2 files changed, 5 deletions(-) diff --git a/include/llvm/CodeGen/RegAllocPBQP.h b/include/llvm/CodeGen/RegAllocPBQP.h index 80d232a215a..6d709d2b5e0 100644 --- a/include/llvm/CodeGen/RegAllocPBQP.h +++ b/include/llvm/CodeGen/RegAllocPBQP.h @@ -257,9 +257,6 @@ public: assert(RS >= this->RS && "A node's reduction state can not be downgraded"); this->RS = RS; } - bool isSpillable() const { - return RS == NotProvablyAllocatable || RS == OptimallyReducible; - } void handleAddEdge(const MatrixMetadata& MD, bool Transpose) { DeniedOpts += Transpose ? MD.getWorstRow() : MD.getWorstCol(); diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp index 0fb4ef62eff..bdc669ce4ef 100644 --- a/lib/CodeGen/RegAllocPBQP.cpp +++ b/lib/CodeGen/RegAllocPBQP.cpp @@ -621,8 +621,6 @@ bool RegAllocPBQP::mapPBQPToRegAlloc(const PBQPRAGraph &G, assert(PReg != 0 && "Invalid preg selected."); VRM.assignVirt2Phys(VReg, PReg); } else { - assert(G.getNodeMetadata(NId).isSpillable() && - "Spilling a node which can not be spilled."); // Spill VReg. If this introduces new intervals we'll need another round // of allocation. SmallVector NewVRegs; -- 2.34.1