[Lldb-commits] [lldb] r180899 - Since the IR interpreter does not (currently)

Sean Callanan scallanan at apple.com
Wed May 1 17:33:44 PDT 2013


Author: spyffe
Date: Wed May  1 19:33:44 2013
New Revision: 180899

URL: http://llvm.org/viewvc/llvm-project?rev=180899&view=rev
Log:
Since the IR interpreter does not (currently)
support operands with vector types, it now reports
that it cannot interpret expressions that use
vector types.  They get sent to the JIT instead.

<rdar://problem/13733651>

Modified:
    lldb/trunk/source/Expression/IRInterpreter.cpp

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=180899&r1=180898&r2=180899&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Wed May  1 19:33:44 2013
@@ -409,6 +409,7 @@ public:
 };
 
 static const char *unsupported_opcode_error         = "Interpreter doesn't handle one of the expression's opcodes";
+static const char *unsupported_operand_error        = "Interpreter doesn't handle one of the expression's operands";
 //static const char *interpreter_initialization_error = "Interpreter couldn't be initialized";
 static const char *interpreter_internal_error       = "Interpreter encountered an internal error";
 static const char *bad_value_error                  = "Interpreter couldn't resolve a value during execution";
@@ -505,7 +506,29 @@ IRInterpreter::CanInterpret (llvm::Modul
             case Instruction::ZExt:
                 break;
             }
+            
+            for (int oi = 0, oe = ii->getNumOperands();
+                 oi != oe;
+                 ++oi)
+            {
+                Value *operand = ii->getOperand(oi);
+                Type *operand_type = operand->getType();
+                
+                switch (operand_type->getTypeID())
+                {
+                default:
+                    break;
+                case Type::VectorTyID:
+                    {
+                        if (log)
+                            log->Printf("Unsupported operand type: %s", PrintType(operand_type).c_str());
+                        error.SetErrorString(unsupported_operand_error);
+                        return false;
+                    }
+                }
+            }
         }
+        
     }
     
     return true;}





More information about the lldb-commits mailing list