[PATCH] D25848: [PM/OptBisect] Don't crash with some particular values of -opt-bisect-limit=

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 16:26:03 PDT 2016


davide updated this revision to Diff 75365.
davide added a comment.

updated a new patch with context


https://reviews.llvm.org/D25848

Files:
  include/llvm/Analysis/LoopPass.h
  lib/Analysis/LoopPass.cpp


Index: lib/Analysis/LoopPass.cpp
===================================================================
--- lib/Analysis/LoopPass.cpp
+++ lib/Analysis/LoopPass.cpp
@@ -205,7 +205,7 @@
                                     : CurrentLoop->getHeader()->getName());
       dumpPreservedSet(P);
 
-      if (LoopWasDeleted) {
+      if (LoopWasDeleted || P->skipLoop(CurrentLoop)) {
         // Notify passes that the loop is being deleted.
         deleteSimpleAnalysisLoop(CurrentLoop);
       } else {
Index: include/llvm/Analysis/LoopPass.h
===================================================================
--- include/llvm/Analysis/LoopPass.h
+++ include/llvm/Analysis/LoopPass.h
@@ -87,7 +87,7 @@
   /// associated analysis values can be deleted.
   virtual void deleteAnalysisLoop(Loop *L) {}
 
-protected:
+public:
   /// Optional passes call this function to check whether the pass should be
   /// skipped. This is the case when Attribute::OptimizeNone is set or when
   /// optimization bisect is over the limit.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25848.75365.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161020/828aa911/attachment.bin>


More information about the llvm-commits mailing list