Andrew Scull | aa6c109 | 2015-09-03 17:50:30 -0700 | [diff] [blame] | 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 | |
Manasij Mukherjee | adf352b | 2016-07-19 13:31:36 -0700 | [diff] [blame] | 21 | struct Loop { |
| 22 | 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 |
Andrew Scull | aa6c109 | 2015-09-03 17:50:30 -0700 | [diff] [blame] | 27 | }; |
| 28 | |
Manasij Mukherjee | adf352b | 2016-07-19 13:31:36 -0700 | [diff] [blame] | 29 | CfgVector<Loop> ComputeLoopInfo(Cfg *Func); |
| 30 | |
Andrew Scull | aa6c109 | 2015-09-03 17:50:30 -0700 | [diff] [blame] | 31 | } // end of namespace Ice |
| 32 | |
| 33 | #endif // SUBZERO_SRC_ICELOOPANALYZER_H |