aboutsummaryrefslogtreecommitdiff
path: root/libcilkrts/runtime
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2014-02-19 03:43:21 +0000
committerBalaji V. Iyer <bviyer@gcc.gnu.org>2014-02-18 19:43:21 -0800
commit0cfe1b4698da3b3ef6b75142f0daef9687e4d63a (patch)
tree122619ab8476ac382844c8e13cb6a27127b78948 /libcilkrts/runtime
parentb9809dc4cf74a31f6b7a059c48b0995518e6e782 (diff)
downloadgcc-0cfe1b4698da3b3ef6b75142f0daef9687e4d63a.zip
gcc-0cfe1b4698da3b3ef6b75142f0daef9687e4d63a.tar.gz
gcc-0cfe1b4698da3b3ef6b75142f0daef9687e4d63a.tar.bz2
+ * include/cilk/common.h (__CILKRTS_ABI_VERSION): Set the ABI version + to 1 instead of 0.
2014-02-18 Balaji V. Iyer <balaji.v.iyer@intel.com> + + * include/cilk/common.h (__CILKRTS_ABI_VERSION): Set the ABI version + to 1 instead of 0. + * runtime/cilk-abi-cilk-for.cpp (cilk_for_recursive): Added a fix to + initialize stack frame correctly. + From-SVN: r207870
Diffstat (limited to 'libcilkrts/runtime')
-rw-r--r--libcilkrts/runtime/cilk-abi-cilk-for.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libcilkrts/runtime/cilk-abi-cilk-for.cpp b/libcilkrts/runtime/cilk-abi-cilk-for.cpp
index 4fa6dce..4cd04f5 100644
--- a/libcilkrts/runtime/cilk-abi-cilk-for.cpp
+++ b/libcilkrts/runtime/cilk-abi-cilk-for.cpp
@@ -256,9 +256,19 @@ tail_recurse:
// argument list of the spawned function, hence the call to
// capture_spawn_arg_stack_frame().
__cilkrts_stack_frame *sf;
+#if defined(__GNUC__) && ! defined(__INTEL_COMPILER) && ! defined(__clang__)
+ // The current version of gcc initializes the sf structure eagerly.
+ // We can take advantage of this fact to avoid calling
+ // `capture_spawn_arg_stack_frame` when compiling with gcc.
+ // Remove this if the "shrink-wrap" optimization is implemented.
+ sf = w->current_stack_frame;
+ _Cilk_spawn cilk_for_recursive(low, mid, body, data, grain, w,
+ loop_root_pedigree);
+#else
_Cilk_spawn cilk_for_recursive(low, mid, body, data, grain,
capture_spawn_arg_stack_frame(sf, w),
loop_root_pedigree);
+#endif
w = sf->worker;
low = mid;