[llvm] cc5f6ae - Move a definition into cpp from header in advance of other changes [nfc]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri May 21 09:18:13 PDT 2021


Author: Philip Reames
Date: 2021-05-21T09:18:04-07:00
New Revision: cc5f6ae4b4a2f812cc8d3964532c60a337fa79e9

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

LOG: Move a definition into cpp from header in advance of other changes [nfc]

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h b/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
index 5f332e3cac16..9226dd455801 100644
--- a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
+++ b/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
@@ -83,7 +83,7 @@ class UnrolledInstAnalyzer : private InstVisitor<UnrolledInstAnalyzer, bool> {
 
   bool simplifyInstWithSCEV(Instruction *I);
 
-  bool visitInstruction(Instruction &I) { return simplifyInstWithSCEV(&I); }
+  bool visitInstruction(Instruction &I);
   bool visitBinaryOperator(BinaryOperator &I);
   bool visitLoad(LoadInst &I);
   bool visitCastInst(CastInst &I);

diff  --git a/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp b/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
index 66deb353044e..68d769664c60 100644
--- a/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
+++ b/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
@@ -218,3 +218,7 @@ bool UnrolledInstAnalyzer::visitPHINode(PHINode &PN) {
   // The loop induction PHI nodes are definitionally free.
   return PN.getParent() == L->getHeader();
 }
+
+bool UnrolledInstAnalyzer::visitInstruction(Instruction &I) {
+  return simplifyInstWithSCEV(&I);
+}


        


More information about the llvm-commits mailing list