1 //===- subzero/src/IceLoopAnalyzer.h - Loop Analysis ------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 /// 10 /// \file 11 /// \brief This analysis identifies loops in the CFG. 12 //===----------------------------------------------------------------------===// 13 14 #ifndef SUBZERO_SRC_ICELOOPANALYZER_H 15 #define SUBZERO_SRC_ICELOOPANALYZER_H 16 17 #include "IceDefs.h" 18 19 namespace Ice { 20 21 struct Loop { LoopLoop22 Loop(CfgNode *Header, CfgNode *PreHeader, CfgUnorderedSet<SizeT> Body) 23 : Header(Header), PreHeader(PreHeader), Body(Body) {} 24 CfgNode *Header; 25 CfgNode *PreHeader; 26 CfgUnorderedSet<SizeT> Body; // Node IDs 27 }; 28 29 CfgVector<Loop> ComputeLoopInfo(Cfg *Func); 30 31 } // end of namespace Ice 32 33 #endif // SUBZERO_SRC_ICELOOPANALYZER_H 34