[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Chris Lattner sabre at nondot.org
Mon Oct 30 23:33:27 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAGISel.cpp updated: 1.308 -> 1.309
---
Log message:

Turn an assert into an error message.  This is commonly triggered when
we don't support a specific constraint yet.  When this happens, print the
unsupported constraint.



---
Diffs of the changes:  (+5 -1)

 SelectionDAGISel.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.308 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.309
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.308	Mon Oct 30 02:00:44 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp	Tue Oct 31 01:33:13 2006
@@ -2417,7 +2417,11 @@
         GetRegistersForValue(ConstraintCode, ConstraintVTs[i],
                              true, UsesInputRegister, 
                              OutputRegs, InputRegs);
-      assert(!Regs.Regs.empty() && "Couldn't allocate output reg!");
+      if (Regs.Regs.empty()) {
+        std::cerr << "Couldn't allocate output reg for contraint '"
+                  << ConstraintCode << "'!\n";
+        exit(1);
+      }
 
       if (!Constraints[i].isIndirectOutput) {
         assert(RetValRegs.Regs.empty() &&






More information about the llvm-commits mailing list