Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cilk2c_inlined] Add dummy function to prevent LLVM's optimizer from … #42

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions runtime/cilk2c_inlined.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,16 @@ __cilk_helper_epilogue_exn(__cilkrts_stack_frame *sf,
__cilkrts_pause_frame(sf, parent, exn, spawner);
}

// Internal helper function to ensure the __cilkrts_stack_frame type is present
// in the bitcode file. Does not end up in compiled Cilk code nor the OpenCilk
// runtime library.
CHEETAH_INTERNAL __cilkrts_stack_frame
__internal_preserve_stack_frame_type_helper(void) {
__cilkrts_stack_frame sf;
__cilkrts_enter_frame(&sf);
return sf;
}

/// Computes a grainsize for a cilk_for loop, using the following equation:
///
/// grainsize = min(2048, ceil(n / (8 * nworkers)))
Expand Down
Loading