[llvm] r372759 - AggressiveAntiDepBreaker - silence static analyzer null dereference warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 06:57:51 PDT 2019


Author: rksimon
Date: Tue Sep 24 06:57:51 2019
New Revision: 372759

URL: http://llvm.org/viewvc/llvm-project?rev=372759&view=rev
Log:
AggressiveAntiDepBreaker - silence static analyzer null dereference warning. NFCI.

Assert that we've found the critical path.

Modified:
    llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp

Modified: llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp?rev=372759&r1=372758&r2=372759&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp (original)
+++ llvm/trunk/lib/CodeGen/AggressiveAntiDepBreaker.cpp Tue Sep 24 06:57:51 2019
@@ -790,7 +790,7 @@ unsigned AggressiveAntiDepBreaker::Break
         CriticalPathSU = SU;
       }
     }
-
+    assert(CriticalPathSU && "Failed to find SUnit critical path");
     CriticalPathMI = CriticalPathSU->getInstr();
   }
 




More information about the llvm-commits mailing list