68 references to CodeOptimizations
illink (68)
Linker.Dataflow\DynamicallyAccessedMembersTypeHierarchy.cs (1)
88
bool applyOptimizeTypeHierarchyAnnotations = (annotation != DynamicallyAccessedMemberTypes.None) && !_context.IsOptimizationEnabled (
CodeOptimizations
.OptimizeTypeHierarchyAnnotations, type);
Linker.Steps\BodySubstitutionParser.cs (1)
31
bool stripSubstitutions = _context.IsOptimizationEnabled (
CodeOptimizations
.RemoveSubstitutions, _resource?.Assembly);
Linker.Steps\DescriptorMarker.cs (1)
49
bool stripDescriptors = _context.IsOptimizationEnabled (
CodeOptimizations
.RemoveDescriptors, _resource?.Assembly);
Linker.Steps\LinkAttributesParser.cs (1)
35
bool stripLinkAttributes = _context.IsOptimizationEnabled (
CodeOptimizations
.RemoveLinkAttributes, _resource?.Assembly);
Linker.Steps\MarkStep.cs (9)
528
bool unusedInterfacesOptimizationEnabled = Context.IsOptimizationEnabled (
CodeOptimizations
.UnusedInterfaces, type);
666
if (!Context.IsOptimizationEnabled (
CodeOptimizations
.OverrideRemoval, overrideInformation.Override))
690
if (Context.IsOptimizationEnabled (
CodeOptimizations
.OverrideRemoval, overrideInformation.Override) && Annotations.IsInstantiated (overrideInformation.Override.DeclaringType)) {
694
Debug.Assert (!Context.IsOptimizationEnabled (
CodeOptimizations
.OverrideRemoval, overrideInformation.Override) || overrideInformation.Base.IsAbstract);
843
if (Context.CanApplyOptimization (
CodeOptimizations
.RemoveDynamicDependencyAttribute, member.DeclaringType.Module.Assembly)) {
1115
if (type.IsBeforeFieldInit && Context.IsOptimizationEnabled (
CodeOptimizations
.BeforeFieldInit, type))
2345
if (!Context.IsOptimizationEnabled (
CodeOptimizations
.UnusedInterfaces, type))
3471
if (Context.IsOptimizationEnabled (
CodeOptimizations
.UnreachableBodies, body.Method) && IsUnreachableBody (processedMethodBody)) {
3663
if (!Context.CanApplyOptimization (
CodeOptimizations
.UnusedTypeChecks, method.DeclaringType.Module.Assembly))
Linker.Steps\RootAssemblyInputStep.cs (10)
73
CodeOptimizations
.Sealer |
74
CodeOptimizations
.UnusedTypeChecks |
75
CodeOptimizations
.UnreachableBodies |
76
CodeOptimizations
.UnusedInterfaces |
77
CodeOptimizations
.RemoveDescriptors |
78
CodeOptimizations
.RemoveLinkAttributes |
79
CodeOptimizations
.RemoveSubstitutions |
80
CodeOptimizations
.RemoveDynamicDependencyAttribute |
81
CodeOptimizations
.OptimizeTypeHierarchyAnnotations |
82
CodeOptimizations
.SubstituteFeatureGuards, assembly.Name.Name);
Linker.Steps\SealerStep.cs (1)
21
if (!Context.CanApplyOptimization (
CodeOptimizations
.Sealer, assembly))
Linker.Steps\UnreachableBlocksOptimizer.cs (1)
233
if (!_context.IsOptimizationEnabled (
CodeOptimizations
.IPConstantPropagation, method))
Linker\Driver.cs (16)
196
var set_optimizations = new List<(
CodeOptimizations
, string?, bool)> ();
286
if (!GetBoolParam (token, l => set_optimizations.Add ((
CodeOptimizations
.RemoveDescriptors, null, l))))
292
if (!GetBoolParam (token, l => set_optimizations.Add ((
CodeOptimizations
.RemoveSubstitutions, null, l))))
298
if (!GetBoolParam (token, l => set_optimizations.Add ((
CodeOptimizations
.RemoveLinkAttributes, null, l))))
391
if (!GetBoolParam (token, l => set_optimizations.Add ((
CodeOptimizations
.RemoveDynamicDependencyAttribute, null, !l))))
441
if (!GetOptimizationName (optName, out
var
opt))
453
if (!GetOptimizationName (optName, out
var
opt))
1183
protected bool GetOptimizationName (string text, out
CodeOptimizations
optimization)
1187
optimization =
CodeOptimizations
.BeforeFieldInit;
1190
optimization =
CodeOptimizations
.OverrideRemoval;
1193
optimization =
CodeOptimizations
.UnreachableBodies;
1196
optimization =
CodeOptimizations
.UnusedInterfaces;
1199
optimization =
CodeOptimizations
.UnusedTypeChecks;
1202
optimization =
CodeOptimizations
.IPConstantPropagation;
1205
optimization =
CodeOptimizations
.Sealer;
1208
optimization =
CodeOptimizations
.SubstituteFeatureGuards;
Linker\LinkContext.cs (26)
236
const
CodeOptimizations
defaultOptimizations =
237
CodeOptimizations
.BeforeFieldInit |
238
CodeOptimizations
.OverrideRemoval |
239
CodeOptimizations
.UnusedInterfaces |
240
CodeOptimizations
.UnusedTypeChecks |
241
CodeOptimizations
.IPConstantPropagation |
242
CodeOptimizations
.UnreachableBodies |
243
CodeOptimizations
.RemoveDescriptors |
244
CodeOptimizations
.RemoveLinkAttributes |
245
CodeOptimizations
.RemoveSubstitutions |
246
CodeOptimizations
.RemoveDynamicDependencyAttribute |
247
CodeOptimizations
.OptimizeTypeHierarchyAnnotations |
248
CodeOptimizations
.SubstituteFeatureGuards;
514
public bool IsOptimizationEnabled (
CodeOptimizations
optimization, MemberReference context)
519
public bool IsOptimizationEnabled (
CodeOptimizations
optimization, AssemblyDefinition? context)
524
public bool CanApplyOptimization (
CodeOptimizations
optimization, AssemblyDefinition context)
1034
public Pair (
CodeOptimizations
set,
CodeOptimizations
values)
1040
public
CodeOptimizations
Set;
1041
public
CodeOptimizations
Values;
1046
public CodeOptimizationsSettings (
CodeOptimizations
globalOptimizations)
1051
public
CodeOptimizations
Global { get; private set; }
1053
internal bool IsEnabled (
CodeOptimizations
optimizations, AssemblyDefinition? context)
1058
public bool IsEnabled (
CodeOptimizations
optimizations, string? assemblyName)
1072
public void Enable (
CodeOptimizations
optimizations, string? assemblyContext = null)
1088
public void Disable (
CodeOptimizations
optimizations, string? assemblyContext = null)
Linker\MemberActionStore.cs (1)
103
if (!_context.IsOptimizationEnabled (
CodeOptimizations
.SubstituteFeatureGuards, method))