Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037 #ifndef anl_loop_construct_INCLUDED
00038 #define anl_loop_construct_INCLUDED
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class ANL_FUNC_ENTRY;
00052 class ANL_PRAGMA_ATTRIBUTE;
00053
00054 class ANL_LOOP_CONSTRUCT
00055 {
00056 private:
00057
00058 enum ANL_LOOP_KIND
00059 {
00060 ANL_DO_LOOP,
00061 ANL_WHILE_LOOP,
00062 ANL_WHILE_AS_DO_LOOP,
00063 ANL_DOACROSS_LOOP,
00064 ANL_PARALLELDO_LOOP,
00065 ANL_PDO_LOOP
00066 };
00067
00068 INT64 _id;
00069 ANL_LOOP_KIND _loop_kind;
00070 WN *_loop_region;
00071 WN *_loop;
00072 INT32 _construct_level;
00073 ANL_FUNC_ENTRY *_func_entry;
00074 MEM_POOL *_pool;
00075
00076 WN *_First_Loop_Stmt();
00077 WN *_Last_Loop_Stmt();
00078
00079 static BOOL Is_Valid_Dir(ANL_PRAGMA_ATTRIBUTE *dir,
00080 INT32 construct_level);
00081 static BOOL Is_End_Of_Loop_Comment(WN *end_stmt);
00082 static void Remove_Stmt_In_Block(WN *stmt);
00083
00084 BOOL _Is_Parallel_Loop() const
00085 {
00086 return (_loop_kind == ANL_DOACROSS_LOOP ||
00087 _loop_kind == ANL_PARALLELDO_LOOP ||
00088 _loop_kind == ANL_PDO_LOOP);
00089 }
00090
00091 void _Loop_Srcpos_Range(ANL_SRCPOS *min, ANL_SRCPOS *max);
00092 void _Write_Loop_Header(ANL_CBUF *cbuf);
00093 void _Write_Loop_Directive(ANL_CBUF *cbuf);
00094
00095 public:
00096
00097
00098
00099 ANL_LOOP_CONSTRUCT(WN *loop,
00100 INT32 construct_level,
00101 ANL_FUNC_ENTRY *func_entry,
00102 MEM_POOL *pool);
00103
00104
00105
00106
00107 WN *Next_Stmt();
00108
00109 void Write(ANL_CBUF *cbuf);
00110
00111
00112 };
00113
00114 #endif