Skip to main content

ensure_must_run

Function ensure_must_run 

Source
fn ensure_must_run<'tcx, C: QueryCache, const FLAGS: QueryFlags>(
    query: SemiDynamicQueryDispatcher<'tcx, C, FLAGS>,
    qcx: QueryCtxt<'tcx>,
    key: &C::Key,
    check_cache: bool,
) -> (bool, Option<DepNode>)
Expand description

Ensure that either this query has all green inputs or been executed. Executing query::ensure(D) is considered a read of the dep-node D. Returns true if the query should still run.

This function is particularly useful when executing passes for their side-effects – e.g., in order to report errors for erroneous programs.

Note: The optimization is only available during incr. comp.