[core] codegen: Remove obsolete comments

Comments regarding the need for `llvm.stack{save,restore}` is obsolete
now that `NDIter::indices` is allocated at the beginning of the
function.
This commit is contained in:
David Mak 2025-01-15 16:08:55 +08:00
parent 8e614d83de
commit 762a2447c3
2 changed files with 0 additions and 9 deletions

View File

@ -163,11 +163,6 @@ impl<'ctx> NDIterType<'ctx> {
} }
/// Allocate an [`NDIter`] that iterates through the given `ndarray`. /// Allocate an [`NDIter`] that iterates through the given `ndarray`.
///
/// Note: This function allocates an array on the stack at the current builder location, which
/// may lead to stack explosion if called in a hot loop. Therefore, callers are recommended to
/// call `llvm.stacksave` before calling this function and call `llvm.stackrestore` after the
/// [`NDIter`] is no longer needed.
#[must_use] #[must_use]
pub fn construct<G: CodeGenerator + ?Sized>( pub fn construct<G: CodeGenerator + ?Sized>(
&self, &self,

View File

@ -137,10 +137,6 @@ impl<'ctx> NDArrayValue<'ctx> {
/// ///
/// `body` has access to [`BreakContinueHooks`] to short-circuit and [`NDIterValue`] to /// `body` has access to [`BreakContinueHooks`] to short-circuit and [`NDIterValue`] to
/// get properties of the current iteration (e.g., the current element, indices, etc.) /// get properties of the current iteration (e.g., the current element, indices, etc.)
///
/// Note: The caller is recommended to call `llvm.stacksave` and `llvm.stackrestore` before and
/// after invoking this function respectively. See [`NDIterType::construct`] for an explanation
/// on why this is suggested.
pub fn foreach<'a, G, F>( pub fn foreach<'a, G, F>(
&self, &self,
generator: &mut G, generator: &mut G,