GCC Middle and Back End API Reference
|
Go to the source code of this file.
Macros | |
#define | CILK_FRAME_UNSYNCHED 0x02 |
#define | CILK_FRAME_DETACHED 0x04 |
#define | CILK_FRAME_EXCEPTING 0x10 |
#define | CILK_FRAME_VERSION (1 << 24) |
#define | cilk_worker_fndecl cilk_trees[CILK_TI_F_WORKER] |
#define | cilk_sync_fndecl cilk_trees[CILK_TI_F_SYNC] |
#define | cilk_synched_fndecl cilk_trees[CILK_TI_F_SYNCED] |
#define | cilk_detach_fndecl cilk_trees[CILK_TI_F_DETACH] |
#define | cilk_enter_fndecl cilk_trees[CILK_TI_F_ENTER] |
#define | cilk_enter_fast_fndecl cilk_trees[CILK_TI_F_ENTER_FAST] |
#define | cilk_leave_fndecl cilk_trees[CILK_TI_F_LEAVE] |
#define | cilk_rethrow_fndecl cilk_trees[CILK_TI_F_RETHROW] |
#define | cilk_pop_fndecl cilk_trees[CILK_TI_F_POP] |
#define | cilk_save_fp_fndecl cilk_trees[CILK_TI_F_SAVE_FP] |
#define | cilk_worker_type_fndecl cilk_trees[CILK_TI_WORKER_TYPE] |
#define | cilk_frame_type_decl cilk_trees[CILK_TI_FRAME_TYPE] |
#define | cilk_frame_ptr_type_decl cilk_trees[CILK_TI_FRAME_PTR] |
#define | cilk_pedigree_type_decl cilk_trees[CILK_TI_PEDIGREE_TYPE] |
Functions | |
void | expand_builtin_cilk_detach (tree) |
void | expand_builtin_cilk_pop_frame (tree) |
tree | cilk_arrow (tree, int, bool) |
tree | cilk_dot (tree, int, bool) |
void | cilk_init_builtins (void) |
void | gimplify_cilk_sync (tree *, gimple_seq *) |
tree | cilk_call_setjmp (tree) |
bool | fn_contains_cilk_spawn_p () |
Variables | |
tree | cilk_trees [CILK_TI_MAX] |
#define cilk_detach_fndecl cilk_trees[CILK_TI_F_DETACH] |
#define cilk_enter_fast_fndecl cilk_trees[CILK_TI_F_ENTER_FAST] |
#define cilk_enter_fndecl cilk_trees[CILK_TI_F_ENTER] |
#define CILK_FRAME_DETACHED 0x04 |
#define CILK_FRAME_EXCEPTING 0x10 |
#define cilk_frame_ptr_type_decl cilk_trees[CILK_TI_FRAME_PTR] |
#define cilk_frame_type_decl cilk_trees[CILK_TI_FRAME_TYPE] |
#define CILK_FRAME_UNSYNCHED 0x02 |
This file is part of the Intel(R) Cilk(TM) Plus support This file contains Cilk Support files. Copyright (C) 2013 Free Software Foundation, Inc. Contributed by Balaji V. Iyer balaj, Intel Corporation i.v. iyer@ inte l.com
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. Frame status bits known to compiler.
#define CILK_FRAME_VERSION (1 << 24) |
#define cilk_leave_fndecl cilk_trees[CILK_TI_F_LEAVE] |
#define cilk_pedigree_type_decl cilk_trees[CILK_TI_PEDIGREE_TYPE] |
#define cilk_pop_fndecl cilk_trees[CILK_TI_F_POP] |
#define cilk_rethrow_fndecl cilk_trees[CILK_TI_F_RETHROW] |
#define cilk_save_fp_fndecl cilk_trees[CILK_TI_F_SAVE_FP] |
#define cilk_sync_fndecl cilk_trees[CILK_TI_F_SYNC] |
#define cilk_synched_fndecl cilk_trees[CILK_TI_F_SYNCED] |
#define cilk_worker_fndecl cilk_trees[CILK_TI_F_WORKER] |
#define cilk_worker_type_fndecl cilk_trees[CILK_TI_WORKER_TYPE] |
enum cilk_tree_index |
void cilk_init_builtins | ( | void | ) |
Creates and initializes all the built-in Cilk keywords functions and three structures: __cilkrts_stack_frame, __cilkrts_pedigree and __cilkrts_worker. Detailed information about __cilkrts_stack_frame and __cilkrts_worker structures are given in libcilkrts/include/internal/abi.h. __cilkrts_pedigree is described in libcilkrts/include/cilk/common.h.
Now build the following __cilkrts_pedigree struct: struct __cilkrts_pedigree { uint64_t rank; struct __cilkrts_pedigree *parent; }
Build the Cilk Stack Frame: struct __cilkrts_stack_frame { uint32_t flags; uint32_t size; struct __cilkrts_stack_frame *call_parent; __cilkrts_worker *worker; void *except_data; void *ctx[4]; uint32_t mxcsr; uint16_t fpcsr; uint16_t reserved; __cilkrts_pedigree pedigree; };
Now add them to a common structure whose fields are #defined to something that is used at a later stage.
We don't care about reserved, so no need to store it in cilk_trees.
Now let's do the following worker struct: struct __cilkrts_worker { __cilkrts_stack_frame *volatile *volatile tail; __cilkrts_stack_frame *volatile *volatile head; __cilkrts_stack_frame *volatile *volatile exc; __cilkrts_stack_frame *volatile *volatile protected_tail; __cilkrts_stack_frame *volatile *ltq_limit; int32_t self; global_state_t *g; local_state *l; cilkred_map *reducer_map; __cilkrts_stack_frame *current_stack_frame; void *reserved; __cilkrts_worker_sysdep_state *sysdep; __cilkrts_pedigree pedigree; }
void __cilkrts_enter_frame_1 (__cilkrts_stack_frame *);
void __cilkrts_enter_frame_fast_1 (__cilkrts_stack_frame *);
void __cilkrts_pop_frame (__cilkrts_stack_frame *);
void __cilkrts_leave_frame (__cilkrts_stack_frame *);
void __cilkrts_sync (__cilkrts_stack_frame *);
void __cilkrts_detach (__cilkrts_stack_frame *);
__cilkrts_rethrow (struct stack_frame *);
__cilkrts_save_fp_ctrl_state (__cilkrts_stack_frame *);
void expand_builtin_cilk_detach | ( | tree | ) |
void expand_builtin_cilk_pop_frame | ( | tree | ) |
|
inline |
Returns true if Cilk Plus is enabled and if F->cilk_frame_decl is not NULL_TREE.
Referenced by gimplify_omp_workshare().
void gimplify_cilk_sync | ( | tree * | , |
gimple_seq * | |||
) |
tree cilk_trees[CILK_TI_MAX] |
This file is part of the Intel(R) Cilk(TM) Plus support This file contains the CilkPlus Intrinsics Copyright (C) 2013 Free Software Foundation, Inc. Contributed by Balaji V. Iyer balaj, Intel Corporation i.v. iyer@ inte l.com
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/. This structure holds all the important fields of the internal structures, internal built-in functions, and Cilk-specific data types. Explanation of all the these fielsd are given in cilk.h.