|
GCC Middle and Back End API Reference
|
Go to the source code of this file.
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] |
| 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] |
@verbatim
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 balaji.v.iyer@intel.com, Intel Corporation
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.