TrimSyntaxTree.Apply Method

Definition

Applies the transformation that removes from the syntax tree all callables that are unused, meaning they are not a descendant of at least one entry point in the call graph. If keepAllIntrinsics is true, callables with an intrinsic body will not be trimmed, regardless of usage. Any callables that later transformations will depend on should be passed in and will not be trimmed, regardless of usage. Note that unused type constructors will be subject to trimming as any other callable.

public static Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation Apply (Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation compilation, bool keepAllIntrinsics, System.Collections.Generic.IEnumerable<Microsoft.Quantum.QsCompiler.SyntaxTree.QsQualifiedName>? dependencies = default);
static member Apply : Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation * bool * seq<Microsoft.Quantum.QsCompiler.SyntaxTree.QsQualifiedName> -> Microsoft.Quantum.QsCompiler.SyntaxTree.QsCompilation
Public Shared Function Apply (compilation As QsCompilation, keepAllIntrinsics As Boolean, Optional dependencies As IEnumerable(Of QsQualifiedName) = Nothing) As QsCompilation

Parameters

compilation
QsCompilation
keepAllIntrinsics
Boolean

Returns

QsCompilation

Applies to