Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
omp_lower.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 /* ====================================================================
00037  *
00038  * Revision history:
00039  *  26-Jun-97 : First created by Dave Kohr
00040  *
00041  * Description:
00042  * Declarations of global functions from omp_lower.cxx
00043  *
00044  * Exported types:
00045  * None
00046  *
00047  * Exported functions and macros:
00048  * OMP_Prelower() : Perform first step of OpenMP pragma transformation
00049  * ==================================================================== */
00050 
00051 #ifndef omp_lower_h_included
00052 #define omp_lower_h_included
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 
00059 #ifndef wn_INCLUDED
00060 #include "wn.h"
00061 #endif
00062 
00063 #ifndef pu_info_INCLUDED
00064 #include "pu_info.h"
00065 #endif
00066 
00067 extern WN* OMP_Prelower(PU_Info *current_pu, WN* pu);
00068 
00069 #define THREAD_NUM_PREG_NAME "thread_num"
00070 
00071 
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075 
00076 #ifndef symtab_INCLUDED
00077 #include "symtab.h"
00078 #endif
00079 
00080 extern BOOL
00081 WN_Store_Target_Matches_Reduction(WN *store, WN *reduction);
00082 
00083 /*
00084 The generalized lowerer for ATOMIC is available only in the OMP Prelowerer.
00085 However, we want to be able to lower appropriate ATOMIC operations to
00086 Compare-and-Swap and Fetch-And-Op from the MP Lowerer.  So the OMP
00087 Prelowerer exports just enough of the ATOMIC implementation to allow the MP
00088 Lowerer to identify and lower these kinds of ATOMIC.
00089 */
00090 
00091 enum ATOMIC_Lowering_Class {
00092   ALCLASS_CRITICAL,
00093   ALCLASS_SWAP,
00094   ALCLASS_DIRECT,
00095   ALCLASS_ERROR
00096 };
00097 
00098 extern ATOMIC_Lowering_Class WN_ATOMIC_Lowering_Class(WN *atomic);
00099 
00100 extern ATOMIC_Lowering_Class WN_ATOMIC_STORE_Lowering_Class(WN *store);
00101 
00102 typedef void (*Update_Private_Func)(ST *st, WN *wn);
00103 
00104 extern WN *
00105 Atomic_Using_Swap(WN *atomic, WN *store, WN *operation, WN *parent,
00106                   Update_Private_Func upf, ST *x2 = NULL, ST *x3 = NULL);
00107 
00108 extern WN *
00109 Atomic_Direct(WN *atomic, WN *store, WN *operation);
00110 
00111 extern WN *
00112 Get_ATOMIC_Update_LDA(WN *wn);
00113 
00114 #endif /* omp_lower_h_included */
00115 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines