[llvm] r174985 - Minor code simplification.

Dan Gohman dan433584 at gmail.com
Tue Feb 12 10:38:36 PST 2013


Author: djg
Date: Tue Feb 12 12:38:36 2013
New Revision: 174985

URL: http://llvm.org/viewvc/llvm-project?rev=174985&view=rev
Log:
Minor code simplification.

Modified:
    llvm/trunk/lib/Transforms/Scalar/GVN.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=174985&r1=174984&r2=174985&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Tue Feb 12 12:38:36 2013
@@ -2445,7 +2445,7 @@ bool GVN::performPRE(Function &F) {
         if (P == CurrentBlock) {
           NumWithout = 2;
           break;
-        } else if (!DT->dominates(&F.getEntryBlock(), P))  {
+        } else if (!DT->isReachableFromEntry(P))  {
           NumWithout = 2;
           break;
         }





More information about the llvm-commits mailing list