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
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 extern "C" {
00052 #include "gspin-wgen-interface.h"
00053 }
00054
00055 #if defined(BUILD_OS_DARWIN)
00056 #include <limits.h>
00057 #else
00058 #include <values.h>
00059 #endif
00060 #include <sys/types.h>
00061 #include <errno.h>
00062 #if defined(BUILD_OS_DARWIN)
00063 #include <darwin_elf.h>
00064 #else
00065 #include <elf.h>
00066 #endif
00067 #include "defs.h"
00068 #include "config.h"
00069 #include "config_opt.h"
00070 #include "config_debug.h"
00071 #include "config_list.h"
00072 #include "config_targ_opt.h"
00073 #include "controls.h"
00074 #include "erglob.h"
00075 #include "erlib.h"
00076 #include "file_util.h"
00077 #include "flags.h"
00078 #include "glob.h"
00079 #include "mempool.h"
00080 #include "tracing.h"
00081 #include "util.h"
00082 #include "errors.h"
00083 #include <stdarg.h>
00084
00085 #include "wn.h"
00086 #include "wn_util.h"
00087 #include "wn_simp.h"
00088 #include "symtab.h"
00089 #include "pu_info.h"
00090 #include "ir_reader.h"
00091 #include "ir_bwrite.h"
00092 #include "wgen_decl.h"
00093 #include "wgen_expr.h"
00094 #include "wgen_dst.h"
00095 #include "wgen_misc.h"
00096 #include "wgen_stmt.h"
00097 #include "c_int_model.h"
00098 #include "wgen_spin_symbol.h"
00099
00100 int WGEN_Keep_Zero_Length_Structs = TRUE;
00101 PU_Info *PU_Tree_Root = NULL;
00102 #ifdef TARG_X8664
00103 int Reg_Parm_Count = 0;
00104 BOOL SSE_Reg_Parm = FALSE;
00105 #endif
00106
00107 extern void Initialize_IRB (void);
00108
00109 #ifdef FE_GNU_4_2_0
00110 extern void WGEN_Omp_Init (void);
00111 #endif
00112
00113 static void WGEN_Stmt_Stack_Init (void);
00114 static void WGEN_Stmt_Stack_Free (void);
00115 #ifdef KEY
00116 static void WGEN_Guard_Var_Init();
00117
00118
00119
00120
00121
00122 bool Did_Not_Terminate_Region = FALSE;
00123
00124 extern int pstatic_as_global;
00125 #endif
00126
00127
00128 enum debug_info_level
00129 {
00130 DINFO_LEVEL_NONE,
00131 DINFO_LEVEL_TERSE,
00132 DINFO_LEVEL_NORMAL,
00133 DINFO_LEVEL_VERBOSE
00134 };
00135
00136
00137 #if 0 // wgen TODO
00138 extern
00139 #endif
00140 enum debug_info_level debug_info_level;
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 # define MAX_MSG_LEVEL 2
00153 # define DEF_MSG_LEVEL 2
00154
00155 #ifdef MONGOOSE_CIF
00156 mUINT32 Cif_Level = 0;
00157 #define MAX_CIF_LEVEL 3
00158 #define DEF_CIF_LEVEL 2
00159 #endif
00160
00161
00162 #define IRB_FILE_EXTENSION ".B"
00163 #define IRD_FILE_EXTENSION ".D"
00164 #define ERR_FILE_EXTENSION ".e"
00165 #define LST_FILE_EXTENSION ".l"
00166 #define TRC_FILE_EXTENSION ".t"
00167 #define DSTDUMP_FILE_EXTENSION ".fe.dst"
00168
00169 int trace_verbose = FALSE;
00170
00171
00172
00173 static INT32 Argc;
00174 static char **Argv;
00175 static INT32 Source_Arg = 0;
00176 static char Dash [] = "-";
00177
00178
00179 static BOOL Echo_Flag = FALSE;
00180 static BOOL Delete_IR_File = FALSE;
00181
00182
00183
00184
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195 void
00196 Cleanup_Files ( BOOL report, BOOL delete_dotofile )
00197 {
00198
00199 Set_Error_Line (ERROR_LINE_UNKNOWN);
00200
00201
00202 if ( Src_File != NULL && Src_File != stdin && fclose (Src_File) ) {
00203 if ( report ) ErrMsg ( EC_Src_Close, Src_File_Name, errno );
00204 }
00205 Src_File = NULL;
00206
00207
00208 if ( IR_File != NULL && fclose (IR_File) ) {
00209 if ( report ) ErrMsg ( EC_IR_Close, IR_File_Name, errno );
00210 }
00211 IR_File = NULL;
00212 if ( Delete_IR_File && unlink (IR_File_Name) ) {
00213 if ( report ) ErrMsg ( EC_IR_Delete, IR_File_Name, errno );
00214 }
00215
00216
00217 if ( Lst_File != NULL && Lst_File != stdout && fclose (Lst_File) ) {
00218 if ( report ) ErrMsg ( EC_Lst_Close, Lst_File_Name, errno );
00219 }
00220 Lst_File = NULL;
00221
00222
00223 Set_Trace_File ( NULL );
00224
00225
00226 Tim_File = NULL;
00227
00228
00229 Set_Error_File ( NULL );
00230 Set_Error_Source ( NULL );
00231 }
00232
00233
00234
00235
00236
00237
00238
00239
00240
00241
00242
00243 void
00244 Terminate ( INT status )
00245 {
00246
00247 Cleanup_Files ( FALSE, FALSE);
00248
00249 exit (status);
00250 }
00251
00252
00253
00254
00255
00256
00257
00258
00259
00260 void
00261 Warning ( const char * msg )
00262 {
00263 fprintf ( stderr, "%s: In function %s:\n", Orig_Src_File_Name, ST_name (Scope_tab[CURRENT_SYMTAB].st) );
00264 fprintf ( stderr, "%s:%d: warning: %s\n", Orig_Src_File_Name, lineno, msg );
00265 }
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282 static void
00283 Prepare_Source ( void )
00284 {
00285 INT16 i;
00286 char *cp;
00287 char *fname;
00288 INT16 len;
00289 BOOL dashdash_flag = FALSE;
00290
00291
00292 Init_Error_Handler ( 100 );
00293 Set_Error_Line ( ERROR_LINE_UNKNOWN );
00294 Set_Error_File ( NULL );
00295 Set_Error_Phase ( "Front End Driver" );
00296
00297
00298 Err_File_Name = Dash;
00299 DSTdump_File_Name = NULL;
00300
00301 Delete_IR_File = FALSE;
00302
00303
00304
00305
00306
00307 fname = Last_Pathname_Component ( Src_File_Name );
00308
00309
00310 if ( Err_File_Name == NULL ) {
00311
00312 Err_File_Name = New_Extension
00313 ( fname, ERR_FILE_EXTENSION );
00314 } else if ( *Err_File_Name == '-' ) {
00315
00316 Err_File_Name = NULL;
00317 }
00318 Set_Error_File ( Err_File_Name );
00319
00320
00321 if ( Trc_File_Name == NULL ) {
00322 if ( Tracing_Enabled ) {
00323
00324 Trc_File_Name = New_Extension
00325 ( fname, TRC_FILE_EXTENSION );
00326 }
00327 } else if ( *Trc_File_Name == '-' ) {
00328
00329 Trc_File_Name = NULL;
00330 }
00331 Set_Trace_File ( Trc_File_Name );
00332 if ( Get_Trace (TKIND_INFO, TINFO_TIME) ) Tim_File = TFile;
00333
00334
00335 IR_File_Name = Src_File_Name;
00336
00337
00338 if ( Irb_File_Name == NULL ) {
00339
00340 Irb_File_Name = New_Extension ( fname, IRB_FILE_EXTENSION );
00341 }
00342
00343 if ( (Irb_File = fopen ( Irb_File_Name, "w" )) == NULL ) {
00344 ErrMsg ( EC_IR_Open, IR_File_Name, errno );
00345 Cleanup_Files ( TRUE, FALSE );
00346 return;
00347 } else {
00348 if ( Get_Trace ( TP_MISC, 1) ) {
00349 fprintf ( TFile,
00350 "\n%sControl Values: Open_Dot_B_File\n%s\n", DBar, DBar );
00351 Print_Controls ( TFile, "", TRUE );
00352 }
00353 }
00354
00355
00356 Configure_Source ( Src_File_Name );
00357 }
00358
00359
00360 void
00361 WGEN_Init (INT argc, char **argv, char **envp )
00362 {
00363 Initialize_C_Int_Model();
00364
00365 MEM_Initialize();
00366
00367 Handle_Signals();
00368
00369
00370 Set_Error_Line ( ERROR_LINE_UNKNOWN );
00371 Set_Error_Phase ( "Front End Driver" );
00372 Preconfigure ();
00373
00374 #ifdef TARG_MIPS
00375 ABI_Name = "n64";
00376 #endif
00377
00378 #ifdef TARG_IA64
00379 ABI_Name = "i64";
00380 #endif
00381
00382 #if defined(TARG_IA32) || defined(TARG_X8664)
00383 if (TARGET_64BIT)
00384 ABI_Name = "n64";
00385 else ABI_Name = "n32";
00386 #endif
00387
00388 #ifdef KEY
00389 if (lang_cplus)
00390 pstatic_as_global = TRUE;
00391 else
00392 pstatic_as_global = FALSE;
00393 #endif
00394
00395 Init_Controls_Tbl();
00396 Argc = argc;
00397 Argv = argv;
00398 Configure ();
00399 IR_reader_init();
00400 Initialize_Symbol_Tables (TRUE);
00401 WGEN_Stmt_Stack_Init ();
00402 WGEN_Stmt_Init ();
00403 #ifdef FE_GNU_4_2_0
00404 WGEN_Omp_Init ();
00405 #endif
00406 WGEN_Expr_Init ();
00407 WHIRL_Mldid_Mstid_On = TRUE;
00408 WN_Simp_Fold_LDA = TRUE;
00409
00410 WHIRL_Keep_Cvt_On = TRUE;
00411
00412 #ifdef KEY
00413 WGEN_Guard_Var_Init ();
00414 #endif
00415
00416 Init_Deferred_Function_Stack();
00417 Init_Deferred_Decl_Init_Stack();
00418 #ifdef KEY // bug 11406: force -OPT:div_split to false in wgen phase
00419 Div_Split_Allowed = FALSE;
00420 Recip_Allowed = FALSE;
00421 #endif
00422 }
00423
00424 void
00425 WGEN_File_Init (INT argc, char **argv)
00426 {
00427
00428 Prepare_Source();
00429 MEM_POOL_Push (&MEM_src_pool);
00430
00431 Restore_Cmd_Line_Ctrls();
00432
00433
00434 Open_Output_Info ( Irb_File_Name );
00435 DST_build(argc, argv);
00436 }
00437
00438 void
00439 WGEN_File_Finish (void)
00440 {
00441 Verify_SYMTAB (GLOBAL_SYMTAB);
00442 Write_Global_Info (PU_Tree_Root);
00443 Close_Output_Info ();
00444 IR_reader_finish ();
00445 MEM_POOL_Pop (&MEM_src_pool);
00446 }
00447
00448 void
00449 WGEN_Finish ()
00450 {
00451 WGEN_Stmt_Stack_Free ();
00452 }
00453
00454 void
00455 WGEN_Check_Errors (int *error_count, int *warning_count, BOOL *need_inliner)
00456 {
00457
00458
00459 Get_Error_Count ( error_count, warning_count);
00460 *need_inliner = wgen_invoke_inliner;
00461 }
00462
00463 #define ENLARGE(x) (x + (x >> 1))
00464 #define WN_STMT_STACK_SIZE 32
00465
00466 typedef struct wn_stmt {
00467 WN *wn;
00468 WGEN_STMT_KIND kind;
00469 } WN_STMT;
00470
00471 static WN_STMT *wn_stmt_stack;
00472 static WN_STMT *wn_stmt_sp;
00473 static WN_STMT *wn_stmt_stack_last;
00474 static INT wn_stmt_stack_size;
00475
00476 char * WGEN_Stmt_Kind_Name [wgen_stmk_last+1] = {
00477 "'unknown'",
00478 "'function entry'",
00479 "'function pragma'",
00480 "'function body'",
00481 "'region pragmas'",
00482 #ifdef KEY
00483 "'region body'",
00484 "'region exits'",
00485 "'call region pragmas'",
00486 "'call region body'",
00487 "'call region exits'",
00488 #endif // KEY
00489 "'scope'",
00490 "'if condition'",
00491 "'if then clause'",
00492 "'if else clause'",
00493 "'while condition'",
00494 "'while body'",
00495 "'dowhile condition'",
00496 "'dowhile body'",
00497 "'for condition'",
00498 "'for body'",
00499 "'switch'",
00500 "'comma'",
00501 "'rcomma'",
00502 #ifdef KEY
00503 "'temp_cleanup'",
00504 "'dummy'",
00505 #endif // KEY
00506 "'last'"
00507 };
00508
00509 static void
00510 WGEN_Stmt_Stack_Init (void)
00511 {
00512 wn_stmt_stack_size = WN_STMT_STACK_SIZE;
00513 wn_stmt_stack = (WN_STMT *) malloc (sizeof (WN_STMT) *
00514 wn_stmt_stack_size );
00515 wn_stmt_sp = wn_stmt_stack - 1;
00516 wn_stmt_stack_last = wn_stmt_stack + wn_stmt_stack_size - 1;
00517 }
00518
00519 static void
00520 WGEN_Stmt_Stack_Free (void)
00521 {
00522 free (wn_stmt_stack);
00523 wn_stmt_stack = NULL;
00524 }
00525
00526 void
00527 WGEN_Stmt_Push (WN* wn, WGEN_STMT_KIND kind, SRCPOS srcpos)
00528 {
00529 INT new_stack_size;
00530
00531 #ifdef KEY
00532
00533
00534
00535 if (opt_regions && wn_stmt_sp)
00536 Check_For_Call_Region ();
00537 #endif
00538
00539 if (wn_stmt_sp == wn_stmt_stack_last) {
00540 new_stack_size = ENLARGE(wn_stmt_stack_size);
00541 wn_stmt_stack =
00542 (WN_STMT *) realloc (wn_stmt_stack, new_stack_size * sizeof (WN_STMT));
00543 wn_stmt_sp = wn_stmt_stack + wn_stmt_stack_size - 1;
00544 wn_stmt_stack_size = new_stack_size;
00545 wn_stmt_stack_last = wn_stmt_stack + wn_stmt_stack_size - 1;
00546 }
00547 ++wn_stmt_sp;
00548 wn_stmt_sp->wn = wn;
00549 wn_stmt_sp->kind = kind;
00550
00551 if (srcpos)
00552 WN_Set_Linenum ( wn, srcpos );
00553 }
00554
00555
00556 WN*
00557 WGEN_Stmt_Top (void)
00558 {
00559 FmtAssert (wn_stmt_sp >= wn_stmt_stack,
00560 ("no more entries on stack in function WGEN_Stmt_Top"));
00561
00562 return (wn_stmt_sp->wn);
00563 }
00564
00565 #ifdef KEY
00566
00567
00568
00569
00570 bool
00571 Check_For_Call_Region (void)
00572 {
00573 if (key_exceptions) {
00574 if (wn_stmt_sp->kind == wgen_stmk_call_region_body) {
00575 Setup_EH_Region();
00576 return TRUE;
00577 }
00578 }
00579 return FALSE;
00580 }
00581 #endif // KEY
00582
00583 void
00584 WGEN_Stmt_Append (WN* wn, SRCPOS srcpos)
00585 {
00586 WN * body;
00587 WN * last;
00588
00589 #ifdef KEY
00590
00591
00592
00593
00594 if (WN_operator(wn) == OPR_BLOCK && WN_first(wn) == NULL)
00595 return;
00596 #endif
00597
00598 if (srcpos) {
00599 WN_Set_Linenum ( wn, srcpos );
00600 if (WN_operator(wn) == OPR_BLOCK && WN_first(wn) != NULL)
00601 WN_Set_Linenum ( WN_first(wn), srcpos );
00602 }
00603
00604 body = WGEN_Stmt_Top ();
00605
00606 if (body) {
00607
00608 last = WN_last(body);
00609 WN_INSERT_BlockAfter (body, last, wn);
00610 }
00611
00612 #ifdef KEY
00613
00614 if (!opt_regions)
00615 Check_For_Call_Region();
00616 else if (wn_stmt_sp->kind == wgen_stmk_call_region_body)
00617 Did_Not_Terminate_Region = TRUE;
00618 #endif // KEY
00619 }
00620
00621
00622 WN*
00623 WGEN_Stmt_Last (void)
00624 {
00625 WN * body;
00626
00627 body = WGEN_Stmt_Top ();
00628 return (WN_last(body));
00629 }
00630
00631
00632 WN *
00633 WGEN_Stmt_Delete ()
00634 {
00635 WN * body;
00636 WN * last;
00637 WN * prev;
00638
00639 body = WGEN_Stmt_Top ();
00640 last = WN_last(body);
00641 prev = WN_prev(last);
00642 if (prev)
00643 WN_next(prev) = NULL;
00644 else
00645 WN_first(body) = NULL;
00646 WN_last(body) = prev;
00647 WN_prev(last) = NULL;
00648
00649 return last;
00650 }
00651
00652
00653 WN*
00654 WGEN_Stmt_Pop (WGEN_STMT_KIND kind)
00655 {
00656 WN * wn;
00657 FmtAssert (wn_stmt_sp >= wn_stmt_stack,
00658 ("no more entries on stack in function WGEN_Stmt_Pop"));
00659
00660 #ifdef KEY
00661
00662 WN * to_be_pushed = 0;
00663 if (key_exceptions && wn_stmt_sp->kind != kind)
00664 {
00665 if (!opt_regions || !Did_Not_Terminate_Region)
00666 {
00667 FmtAssert (wn_stmt_sp->kind == wgen_stmk_call_region_body,
00668 ("mismatch in statements: expected %s, got %s\n",
00669 WGEN_Stmt_Kind_Name [kind],
00670 WGEN_Stmt_Kind_Name [wn_stmt_sp->kind]));
00671
00672 to_be_pushed = WGEN_Stmt_Pop (wgen_stmk_call_region_body);
00673 }
00674 else
00675 {
00676
00677 Check_For_Call_Region ();
00678 Did_Not_Terminate_Region = FALSE;
00679 }
00680 }
00681 #endif // KEY
00682
00683 FmtAssert (wn_stmt_sp->kind == kind,
00684 ("mismatch in statements: expected %s, got %s\n",
00685 WGEN_Stmt_Kind_Name [kind],
00686 WGEN_Stmt_Kind_Name [wn_stmt_sp->kind]));
00687
00688 wn = wn_stmt_sp->wn;
00689 wn_stmt_sp--;
00690
00691 #ifdef KEY
00692 if (to_be_pushed)
00693 WGEN_Stmt_Push (to_be_pushed, wgen_stmk_call_region_body, Get_Srcpos());
00694 #endif
00695
00696 return (wn);
00697 }
00698
00699
00700
00701
00702
00703
00704
00705
00706 #ifdef KEY
00707
00708
00709
00710
00711
00712
00713 void
00714 WGEN_Stmt_Prepend_Last (WN* wn, SRCPOS srcpos)
00715 {
00716 WN * body;
00717 WN * last;
00718
00719 if (srcpos) {
00720 WN_Set_Linenum ( wn, srcpos );
00721 if (WN_operator(wn) == OPR_BLOCK && WN_first(wn) != NULL)
00722 WN_Set_Linenum ( WN_first(wn), srcpos );
00723 }
00724
00725 body = WGEN_Stmt_Top ();
00726
00727 if (body) {
00728
00729 last = WN_last(body);
00730 WN_INSERT_BlockBefore (body, last, wn);
00731 }
00732 }
00733 #endif
00734
00735 #ifdef KEY
00736
00737
00738 std::vector<gs_t > guard_vars;
00739
00740 static void
00741 WGEN_Guard_Var_Init()
00742 {
00743
00744 if (lang_cplus)
00745 guard_vars.clear();
00746 }
00747
00748
00749
00750 void
00751 WGEN_Guard_Var_Push()
00752 {
00753 if (lang_cplus)
00754 guard_vars.push_back(NULL);
00755 }
00756
00757
00758
00759
00760 gs_t
00761 WGEN_Guard_Var_Pop()
00762 {
00763 if (!lang_cplus) return NULL;
00764
00765 FmtAssert (!guard_vars.empty(), ("WGEN_Guard_Var_Pop: no guard vars to pop"));
00766 gs_t t = guard_vars.back();
00767 guard_vars.pop_back();
00768 return t;
00769 }
00770
00771
00772 gs_t
00773 WGEN_Get_Guard_Var()
00774 {
00775 gs_t t;
00776
00777
00778 if (!lang_cplus)
00779 return NULL;
00780
00781
00782 if (guard_vars.empty())
00783 return NULL;
00784
00785
00786 t = guard_vars.back();
00787 if (t != NULL)
00788 return t;
00789
00790
00791
00792 guard_vars.pop_back();
00793 t = gs_build_decl(GS_VAR_DECL, gs_integer_type_node());
00794 Get_ST(t);
00795 guard_vars.push_back(t);
00796 return t;
00797 }
00798
00799
00800
00801 WN *
00802 WGEN_Find_Stmt_In_Stack (WGEN_STMT_KIND kind)
00803 {
00804 WN_STMT * sp = wn_stmt_sp;
00805 Is_True (sp, ("Null WN stack pointer"));
00806
00807 while (sp->kind != wgen_stmk_func_entry)
00808 {
00809 if (sp->kind == kind)
00810 break;
00811 sp--;
00812 Is_True (sp, ("FUNC_ENTRY node not found"));
00813 }
00814 FmtAssert (sp->kind == kind, ("Stmt kind not found in stack"));
00815 Is_True (sp->wn, ("Null WN stmt in apparently valid stack location"));
00816 return sp->wn;
00817 }
00818
00819 #ifdef FE_GNU_4_2_0
00820
00821 static inline BOOL Pragma_is_Parallel_Region (WN_PRAGMA_ID pragma) {
00822
00823 switch (pragma) {
00824 case WN_PRAGMA_PARALLEL_BEGIN:
00825 case WN_PRAGMA_PARALLEL_SECTIONS:
00826 case WN_PRAGMA_PARALLEL_DO:
00827 case WN_PRAGMA_PARALLEL_WORKSHARE:
00828 case WN_PRAGMA_DOACROSS:
00829 return TRUE;
00830 default:
00831 return FALSE;
00832 }
00833 }
00834
00835
00836
00837
00838
00839 void Add_Pragma_To_MP_Regions (WN_VECTOR *wnv,
00840 WN_PRAGMA_ID pragma_id,
00841 ST *st, WN_OFFSET ofst,
00842 WN_MAP parent_map,
00843 BOOL make_compiler_generated,
00844 BOOL parallel_only)
00845 {
00846 if (!parallel_only) {
00847
00848 Add_Pragma_To_MP_Regions (wnv, pragma_id, st, ofst, parent_map,
00849 make_compiler_generated);
00850 return;
00851 }
00852
00853 Is_True (pragma_id == WN_PRAGMA_LOCAL,
00854 ("Add_Pragma_To_MP_Regions: Unexpected pragma"));
00855
00856 for (WN_VECTOR::iterator wni = wnv->begin();
00857 wni != wnv->end();
00858 wni++) {
00859
00860
00861
00862
00863
00864 WN *region_wn = *wni;
00865
00866 WN *pragma_wn = WN_first(WN_region_pragmas(region_wn));
00867
00868 Is_True (WN_opcode(pragma_wn) == OPC_PRAGMA,
00869 ("Add_Pragma: Expected a pragma node"));
00870 WN_PRAGMA_ID pragma = (WN_PRAGMA_ID) WN_pragma(pragma_wn);
00871
00872 if (Pragma_is_Parallel_Region(pragma)) {
00873
00874
00875
00876 {
00877 WN * pwn = pragma_wn;
00878 BOOL match = FALSE;
00879 while (pwn)
00880 {
00881 if (WN_st_idx (pwn) == ST_st_idx (st) &&
00882 (WN_PRAGMA_ID) WN_pragma (pwn) == pragma_id)
00883 {
00884 match = TRUE;
00885 break;
00886 }
00887 pwn = WN_next (pwn);
00888 }
00889 if (match)
00890 break;
00891 }
00892
00893 WN *local_pwn = WN_CreatePragma (pragma_id, st, ofst, 0);
00894 if (make_compiler_generated) {
00895 WN_set_pragma_compiler_generated(local_pwn);
00896 }
00897 WN *last = WN_last(WN_region_pragmas(region_wn));
00898 if (last &&
00899 WN_opcode(last) == OPC_PRAGMA &&
00900 WN_pragma(last) == WN_PRAGMA_END_MARKER)
00901 WN_INSERT_BlockBefore (WN_region_pragmas(region_wn), last, local_pwn); else
00902 WN_INSERT_BlockBefore (WN_region_pragmas(region_wn), NULL, local_pwn);
00903 if (parent_map != WN_MAP_UNDEFINED)
00904 {
00905 WN_MAP_Set(parent_map,local_pwn,(void*)WN_region_pragmas(region_wn));
00906 }
00907
00908 break;
00909 }
00910 }
00911 }
00912 #endif // FE_GNU_4_2_0
00913 #endif // KEY