[llvm-branch-commits] [llvm] 9293b25 - [Analysis/Interval] Remove isLoop (NFC)

Kazu Hirata via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Dec 12 10:14:37 PST 2020


Author: Kazu Hirata
Date: 2020-12-12T10:09:35-08:00
New Revision: 9293b251b55bdc87a14b4b3be6874624cb83cfd9

URL: https://github.com/llvm/llvm-project/commit/9293b251b55bdc87a14b4b3be6874624cb83cfd9
DIFF: https://github.com/llvm/llvm-project/commit/9293b251b55bdc87a14b4b3be6874624cb83cfd9.diff

LOG: [Analysis/Interval] Remove isLoop (NFC)

The last use of isLoop was removed on Apr 29, 2002 in commit
09bbb5c015c6e40b3d45da057f955ddb7c8f8485 as part of an effort to
remove "old induction varaible cannonicalization pass built on top of
interval analysis".

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/Interval.h
    llvm/lib/Analysis/Interval.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/Interval.h b/llvm/include/llvm/Analysis/Interval.h
index 5c9a4535bc7f..9afe659d00dd 100644
--- a/llvm/include/llvm/Analysis/Interval.h
+++ b/llvm/include/llvm/Analysis/Interval.h
@@ -89,9 +89,6 @@ class Interval {
     return HeaderNode == I.HeaderNode;
   }
 
-  /// isLoop - Find out if there is a back edge in this interval...
-  bool isLoop() const;
-
   /// print - Show contents in human readable format...
   void print(raw_ostream &O) const;
 };

diff  --git a/llvm/lib/Analysis/Interval.cpp b/llvm/lib/Analysis/Interval.cpp
index 07d6e27c13be..e228ec4f2126 100644
--- a/llvm/lib/Analysis/Interval.cpp
+++ b/llvm/lib/Analysis/Interval.cpp
@@ -22,17 +22,6 @@ using namespace llvm;
 // Interval Implementation
 //===----------------------------------------------------------------------===//
 
-// isLoop - Find out if there is a back edge in this interval...
-bool Interval::isLoop() const {
-  // There is a loop in this interval iff one of the predecessors of the header
-  // node lives in the interval.
-  for (::pred_iterator I = ::pred_begin(HeaderNode), E = ::pred_end(HeaderNode);
-       I != E; ++I)
-    if (contains(*I))
-      return true;
-  return false;
-}
-
 void Interval::print(raw_ostream &OS) const {
   OS << "-------------------------------------------------------------\n"
        << "Interval Contents:\n";


        


More information about the llvm-branch-commits mailing list