[llvm] r299924 - Simplify the code and remove dead code

Sylvestre Ledru via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 01:21:27 PDT 2017


Author: sylvestre
Date: Tue Apr 11 03:21:27 2017
New Revision: 299924

URL: http://llvm.org/viewvc/llvm-project?rev=299924&view=rev
Log:
Simplify the code and remove dead code

Summary: Fix coverity cid 1374240

Reviewers: dberlin

Reviewed By: dberlin

Differential Revision: https://reviews.llvm.org/D31928

Modified:
    llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp

Modified: llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp?rev=299924&r1=299923&r2=299924&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PredicateInfo.cpp Tue Apr 11 03:21:27 2017
@@ -210,11 +210,9 @@ struct ValueDFS_Compare {
     auto LookupResult = OBBMap.find(BB);
     if (LookupResult != OBBMap.end())
       return LookupResult->second->dominates(AInst, BInst);
-    else {
-      auto Result = OBBMap.insert({BB, make_unique<OrderedBasicBlock>(BB)});
-      return Result.first->second->dominates(AInst, BInst);
-    }
-    return std::tie(ADef, A.U) < std::tie(BDef, B.U);
+
+    auto Result = OBBMap.insert({BB, make_unique<OrderedBasicBlock>(BB)});
+    return Result.first->second->dominates(AInst, BInst);
   }
 };
 




More information about the llvm-commits mailing list