[llvm] r274082 - [bugpoint] Treat token type the same as ehpad w.r.t deletion

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 17:15:35 PDT 2016


Author: reames
Date: Tue Jun 28 19:15:35 2016
New Revision: 274082

URL: http://llvm.org/viewvc/llvm-project?rev=274082&view=rev
Log:
[bugpoint] Treat token type the same as ehpad w.r.t deletion


Modified:
    llvm/trunk/tools/bugpoint/CrashDebugger.cpp

Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=274082&r1=274081&r2=274082&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original)
+++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Tue Jun 28 19:15:35 2016
@@ -374,9 +374,9 @@ bool ReduceCrashingBlocks::TestBlocks(st
           (*SI)->removePredecessor(&*BB);
 
         TerminatorInst *BBTerm = BB->getTerminator();
-        if (BBTerm->isEHPad())
+        if (BBTerm->isEHPad() || BBTerm->getType()->isTokenTy())
           continue;
-        if (!BBTerm->getType()->isVoidTy() && !BBTerm->getType()->isTokenTy())
+        if (!BBTerm->getType()->isVoidTy())
           BBTerm->replaceAllUsesWith(Constant::getNullValue(BBTerm->getType()));
 
         // Replace the old terminator instruction.
@@ -477,8 +477,8 @@ bool ReduceCrashingInstructions::TestIns
       for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
         Instruction *Inst = &*I++;
         if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
-            !Inst->isEHPad()) {
-          if (!Inst->getType()->isVoidTy() && !Inst->getType()->isTokenTy())
+            !Inst->isEHPad() && !Inst->getType()->isTokenTy()) {
+          if (!Inst->getType()->isVoidTy())
             Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
           Inst->eraseFromParent();
         }




More information about the llvm-commits mailing list