OSDN Git Service

Subzero, MIPS32: UnimplementedError removed from most common crashers
authorSrdjan Obucina <Srdjan.Obucina@imgtec.com>
Wed, 22 Jun 2016 15:57:02 +0000 (08:57 -0700)
committerJim Stichnoth <stichnot@chromium.org>
Wed, 22 Jun 2016 15:57:02 +0000 (08:57 -0700)
UnimplementedError is removed from three functions because it causes
crashes in almost every test from tests_lit/llvm2ice_tests.

emitVariable appears as correct, UnimplementedError may be there by mistake.

lowerConstants is unimplemented, but its obvious without UnimeplementedError.

lowerJumpTables is unimplemented, but its obvious without UnimeplementedError.

We comment these three anyway while changing and testing, so removing them will
not affect final results anyway.

R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/2086423002 .

Patch from Srdjan Obucina <Srdjan.Obucina@imgtec.com>.

src/IceTargetLoweringMIPS32.cpp

index f17b02d..430820e 100644 (file)
@@ -480,14 +480,12 @@ void TargetMIPS32::emitVariable(const Variable *Var) const {
   const Type FrameSPTy = IceType_i32;
   if (Var->hasReg()) {
     Str << '$' << getRegName(Var->getRegNum(), Var->getType());
-    return;
   } else {
     int32_t Offset = Var->getStackOffset();
     Str << Offset;
     Str << "($" << getRegName(getFrameOrStackReg(), FrameSPTy);
     Str << ")";
   }
-  UnimplementedError(getFlags());
 }
 
 TargetMIPS32::CallingConv::CallingConv()
@@ -2123,13 +2121,11 @@ void TargetDataMIPS32::lowerGlobals(const VariableDeclarationList &Vars,
 void TargetDataMIPS32::lowerConstants() {
   if (getFlags().getDisableTranslation())
     return;
-  UnimplementedError(getFlags());
 }
 
 void TargetDataMIPS32::lowerJumpTables() {
   if (getFlags().getDisableTranslation())
     return;
-  UnimplementedError(getFlags());
 }
 
 // Helper for legalize() to emit the right code to lower an operand to a