diff --git a/src/internal/core.rs b/src/internal/core.rs index 15bf176a..a4c189bc 100644 --- a/src/internal/core.rs +++ b/src/internal/core.rs @@ -79,6 +79,7 @@ impl State { } /// Add an incompatibility to the state. + #[cold] pub(crate) fn add_incompatibility_from_dependencies( &mut self, package: Id, @@ -105,6 +106,7 @@ impl State { /// Unit propagation is the core mechanism of the solving algorithm. /// CF + #[cold] pub(crate) fn unit_propagation( &mut self, package: Id, @@ -187,6 +189,7 @@ impl State { /// Return the root cause or the terminal incompatibility. /// CF #[allow(clippy::type_complexity)] + #[cold] fn conflict_resolution( &mut self, incompatibility: IncompDpId, diff --git a/src/internal/partial_solution.rs b/src/internal/partial_solution.rs index 7d4d2c8e..c6328aac 100644 --- a/src/internal/partial_solution.rs +++ b/src/internal/partial_solution.rs @@ -267,6 +267,7 @@ impl PartialSolution { } } + #[cold] pub(crate) fn pick_highest_priority_pkg( &mut self, prioritizer: impl Fn(Id, &DP::VS) -> DP::Priority, diff --git a/src/solver.rs b/src/solver.rs index ac032913..a8aff4bf 100644 --- a/src/solver.rs +++ b/src/solver.rs @@ -70,6 +70,7 @@ use crate::{DependencyConstraints, Map, Package, PubGrubError, SelectedDependenc /// Main function of the library. /// Finds a set of packages satisfying dependency bounds for a given package + version pair. +#[cold] pub fn resolve( dependency_provider: &DP, package: DP::P,