[llvm-commits] [llvm] r48751 - /llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Evan Cheng
evan.cheng at apple.com
Mon Mar 24 16:28:21 PDT 2008
Author: evancheng
Date: Mon Mar 24 18:28:21 2008
New Revision: 48751
URL: http://llvm.org/viewvc/llvm-project?rev=48751&view=rev
Log:
Add an assertion to catch register of illegal class.
Modified:
llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
Modified: llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp?rev=48751&r1=48750&r2=48751&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp (original)
+++ llvm/trunk/lib/CodeGen/RegAllocLinearScan.cpp Mon Mar 24 18:28:21 2008
@@ -886,6 +886,7 @@
// Scan for the first available register.
TargetRegisterClass::iterator I = RC->allocation_order_begin(*mf_);
TargetRegisterClass::iterator E = RC->allocation_order_end(*mf_);
+ assert(I != E && "No allocatable register in this register class!");
for (; I != E; ++I)
if (prt_->isRegAvail(*I)) {
FreeReg = *I;
More information about the llvm-commits
mailing list