Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
anl_pragma_construct.h
Go to the documentation of this file.
00001 /*
00002 
00003   Copyright (C) 2000, 2001 Silicon Graphics, Inc.  All Rights Reserved.
00004 
00005   This program is free software; you can redistribute it and/or modify it
00006   under the terms of version 2 of the GNU General Public License as
00007   published by the Free Software Foundation.
00008 
00009   This program is distributed in the hope that it would be useful, but
00010   WITHOUT ANY WARRANTY; without even the implied warranty of
00011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
00012 
00013   Further, this software is distributed without any warranty that it is
00014   free of the rightful claim of any third person regarding infringement 
00015   or the like.  Any license provided herein, whether implied or 
00016   otherwise, applies only to this software file.  Patent licenses, if 
00017   any, provided herein do not apply to combinations of this program with 
00018   other software, or any other product whatsoever.  
00019 
00020   You should have received a copy of the GNU General Public License along
00021   with this program; if not, write the Free Software Foundation, Inc., 59
00022   Temple Place - Suite 330, Boston MA 02111-1307, USA.
00023 
00024   Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pky,
00025   Mountain View, CA 94043, or:
00026 
00027   http://www.sgi.com
00028 
00029   For further information regarding this notice, see:
00030 
00031   http://oss.sgi.com/projects/GenInfo/NoticeExplan
00032 
00033 */
00034 
00035 
00036 /* -*-Mode: c++;-*- (Tell emacs to use c++ mode) */
00037 #ifndef anl_pragma_construct_INCLUDED
00038 #define anl_pragma_construct_INCLUDED
00039 
00040 // ==============================================================
00041 // ==============================================================
00042 //
00043 //
00044 // Description:
00045 //
00046 //
00047 // ==============================================================
00048 // ==============================================================
00049 
00050 
00051 class ANL_FUNC_ENTRY;
00052 class ANL_PRAGMA_ATTRIBUTE;
00053 
00054 class ANL_PRAGMA_CONSTRUCT
00055 {
00056 private:
00057 
00058    enum ANL_PRAGMA_KIND
00059    {
00060       ANL_UNKNOWN_PRAGMA,
00061       ANL_SECTION_PRAGMA,
00062       ANL_BARRIER_PRAGMA,
00063       ANL_ORDERED_PRAGMA,
00064       ANL_ATOMIC_PRAGMA,
00065       ANL_CRITICAL_SECTION_PRAGMA
00066    };
00067 
00068    INT64            _id;
00069    ANL_PRAGMA_KIND  _pragma_kind;
00070    WN              *_pragma_begin;
00071    WN              *_pragma_end;           // If applicable; otherwise NULL
00072    BOOL             _pr_end_part_of_body ; // is pragma_end last part of construct body
00073    BOOL             _is_omp ;
00074    INT32            _construct_level;
00075    ANL_FUNC_ENTRY  *_func_entry;
00076    MEM_POOL        *_pool;
00077 
00078    BOOL _End_Is_Part_Of_Construct(BOOL for_id);
00079    void _Find_Pragma_End_Stmt();
00080    void _Get_Max_Construct_Srcpos(ANL_SRCPOS *max);
00081    void _Write_Pragma_Directives(ANL_CBUF *cbuf);
00082 
00083 public:
00084 
00085    // =================== Class Utilities ====================
00086 
00087    static BOOL Is_ProMpf_Pragma_Construct(WN *stmt);
00088    static BOOL Is_Valid_Dir(ANL_PRAGMA_ATTRIBUTE *dir,
00089                             INT32                 construct_level);
00090 
00091 
00092    // ============== Constructors & Destructors ==============
00093 
00094    ANL_PRAGMA_CONSTRUCT(WN             *pragma_begin,
00095                         INT32           construct_level,
00096                         ANL_FUNC_ENTRY *func_entry,
00097                         MEM_POOL       *pool);
00098 
00099 
00100    // ============== Analysis and Output =============
00101 
00102    WN *Next_Stmt();
00103 
00104    void Write(ANL_CBUF *cbuf);
00105 
00106 
00107 }; // class ANL_PRAGMA_CONSTRUCT
00108 
00109 #endif /* anl_pragma_construct_INCLUDED */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines