163 references to OptimizerPatternName
System.Private.Xml (163)
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (20)
57
private static readonly int s_patternCount = Enum.GetValues<
OptimizerPatternName
>().Length;
83
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
84
optPatt.AddPattern(
OptimizerPatternName
.SameDepth);
99
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
143
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
144
optPatt.AddPattern(
OptimizerPatternName
.SameDepth);
148
optPatt.AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
158
public static void Inherit(QilNode ndSrc, QilNode ndDst,
OptimizerPatternName
pattern)
170
case
OptimizerPatternName
.Step:
175
case
OptimizerPatternName
.FilterElements:
179
case
OptimizerPatternName
.FilterContentKind:
183
case
OptimizerPatternName
.EqualityIndex:
188
case
OptimizerPatternName
.DodReverse:
189
case
OptimizerPatternName
.JoinAndDod:
193
case
OptimizerPatternName
.MaxPosition:
197
case
OptimizerPatternName
.SingleTextRtf:
243
public void AddPattern(
OptimizerPatternName
pattern)
254
public bool MatchesPattern(
OptimizerPatternName
pattern)
277
if (MatchesPattern((
OptimizerPatternName
)pattNum))
282
s += ((
OptimizerPatternName
)pattNum).ToString();
System\Xml\Xsl\IlGen\TailCallAnalyzer.cs (1)
46
OptimizerPatterns.Write(nd).AddPattern(
OptimizerPatternName
.TailCall);
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (121)
143
OptimizerPatterns.Write(newNode!).AddPattern(
OptimizerPatternName
.IsReferenced);
181
OptimizerPatterns.Write(node).AddPattern(
OptimizerPatternName
.MaybeSideEffects);
204
if (OptimizerPatterns.Read(node[i]).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
275
OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
381
OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.Step); OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
421
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.IsPositional);
764
if ((((local1).XmlType)!.IsSingleton) && (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
914
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
926
AddStepPattern((QilNode)(local0), (QilNode)(OptimizerPatterns.Read((QilNode)(local1)).GetArgument(OptimizerPatternArgument.StepInput))); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
1029
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
1130
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
1812
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2082
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2196
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2291
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2386
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2481
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4);
2637
if (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.IsPositional))
2668
if (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
2715
if ((((local1).NodeType == QilNodeType.Let) || ((((QilNode)(local1)[0]).XmlType!).IsSingleton)) && (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
2858
OptimizerPatterns.Inherit((QilNode)(local2), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local2), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
2870
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
2879
if (OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.SameDepth))
2886
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth); OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct);
2897
if ((((IsStepPattern(local2, QilNodeType.Attribute)) || (IsStepPattern(local2, QilNodeType.XPathNamespace))) || (OptimizerPatterns.Read((QilNode)(local2)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind))) && ((local1) == (OptimizerPatterns.Read((QilNode)(local2)).GetArgument(OptimizerPatternArgument.StepInput))))
2902
OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.SameDepth); OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct);
2912
if (OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.SameDepth))
2919
OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct);
2956
if (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
3053
if ((!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)) && (!(((QilNode)(local1)[0]).NodeType == QilNodeType.OptimizeBarrier)))
3055
if ((!(DependsOn(local2, local1))) && (!OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
3082
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6);
3106
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6);
3130
OptimizerPatterns.Write((QilNode)(local1)).AddPattern(
OptimizerPatternName
.MaxPosition); OptimizerPatterns.Write((QilNode)(local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6 - 1);
3145
OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.Step); OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local3), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
3154
if (OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.Axis))
3185
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.FilterElements); OptimizerPatterns.Write((QilNode)(local0)).AddArgument(OptimizerPatternArgument.ElementQName, local11);
3204
if (OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.Axis))
3220
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.FilterContentKind); OptimizerPatterns.Write((QilNode)(local0)).AddArgument(OptimizerPatternArgument.KindTestType, local6);
3250
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.FilterAttributeKind);
3369
if (((OptimizerPatterns.Read((QilNode)(local7)).MatchesPattern(
OptimizerPatternName
.FilterElements)) || (OptimizerPatterns.Read((QilNode)(local7)).MatchesPattern(
OptimizerPatternName
.FilterContentKind))) && (IsStepPattern(local7, QilNodeType.Content)))
3400
if (((OptimizerPatterns.Read((QilNode)(local5)).MatchesPattern(
OptimizerPatternName
.FilterElements)) || (OptimizerPatterns.Read((QilNode)(local5)).MatchesPattern(
OptimizerPatternName
.FilterContentKind))) && (IsStepPattern(local5, QilNodeType.Content)))
3423
if (!OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.IsPositional))
3425
if (((!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterElements))) && (!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterContentKind)))) && (!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind))))
3451
if (!OptimizerPatterns.Read(local4).MatchesPattern(
OptimizerPatternName
.IsPositional))
3455
if (((!(OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.FilterElements))) && (!(OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.FilterContentKind)))) && (!(OptimizerPatterns.Read((QilNode)(local3)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind))))
3481
if ((!OptimizerPatterns.Read(local2).MatchesPattern(
OptimizerPatternName
.IsPositional)) && ((local3).XmlType!.IsSubtypeOf(XmlQueryTypeFactory.NodeNotRtfS)))
3483
if (((!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterElements))) && (!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterContentKind)))) && (!(OptimizerPatterns.Read((QilNode)(local1)).MatchesPattern(
OptimizerPatternName
.FilterAttributeKind))))
3538
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local1), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
3548
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.DodReverse); OptimizerPatterns.Write((QilNode)(local0)).AddArgument(OptimizerPatternArgument.DodStep, local1);
3568
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.JoinAndDod); OptimizerPatterns.Write((QilNode)(local0)).AddArgument(OptimizerPatternArgument.DodStep, local4);
3587
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.DodMerge);
3656
patt.AddPattern(
OptimizerPatternName
.EqualityIndex);
3705
patt.AddPattern(
OptimizerPatternName
.EqualityIndex);
3758
OptimizerPatterns.Inherit((QilNode)(local4), (QilNode)(local0),
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode)(local4), (QilNode)(local0),
OptimizerPatternName
.SameDepth);
3787
AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
3824
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
3849
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
3874
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
3899
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
3924
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
3949
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1));
3974
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1));
3999
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1));
4024
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
4049
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
4086
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
4412
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SingleTextRtf); OptimizerPatterns.Write((QilNode)(local0)).AddArgument(OptimizerPatternArgument.RtfText, local3);
4575
if (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
4593
if (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))
4626
if (!(!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
4644
if (!(!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
4693
if ((!((local1).XmlType)!.MaybeEmpty) && (!OptimizerPatterns.Read(local1).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects)))
4755
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct);
4780
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1));
4805
OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.Axis); AddStepPattern((QilNode)(local0), (QilNode)(local1)); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.IsDocOrderDistinct); OptimizerPatterns.Write((QilNode)(local0)).AddPattern(
OptimizerPatternName
.SameDepth);
5323
if (patt.MatchesPattern(
OptimizerPatternName
.FilterElements) || patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind))
5344
if (patt.MatchesPattern(
OptimizerPatternName
.Axis) ||
5345
patt.MatchesPattern(
OptimizerPatternName
.FilterElements) ||
5346
patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind))
5591
patt.AddPattern(
OptimizerPatternName
.Step);
5601
return OptimizerPatterns.Read(nd).MatchesPattern(
OptimizerPatternName
.IsDocOrderDistinct);
5617
return patt.MatchesPattern(
OptimizerPatternName
.Step) && ((QilNode)patt.GetArgument(OptimizerPatternArgument.StepNode)).NodeType == stepType;
5643
isUsed = optPatt.MatchesPattern(
OptimizerPatternName
.IsReferenced) || optPatt.MatchesPattern(
OptimizerPatternName
.MaybeSideEffects);
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (20)
1097
if (patt.MatchesPattern(
OptimizerPatternName
.MaxPosition))
1925
isFilterElements = patt.MatchesPattern(
OptimizerPatternName
.FilterElements);
1926
if (isFilterElements || patt.MatchesPattern(
OptimizerPatternName
.FilterContentKind))
2034
else if (patt.MatchesPattern(
OptimizerPatternName
.FilterAttributeKind))
2041
else if (patt.MatchesPattern(
OptimizerPatternName
.EqualityIndex))
2124
Debug.Assert(!patt.MatchesPattern(
OptimizerPatternName
.IsPositional));
2149
if (patt.MatchesPattern(
OptimizerPatternName
.IsPositional))
2175
if (patt.MatchesPattern(
OptimizerPatternName
.IsPositional))
2183
if (patt.MatchesPattern(
OptimizerPatternName
.MaxPosition))
2418
isJoinAndDod = pattDod.MatchesPattern(
OptimizerPatternName
.JoinAndDod);
2419
if (isJoinAndDod || pattDod.MatchesPattern(
OptimizerPatternName
.DodReverse))
2423
if (pattStep.MatchesPattern(
OptimizerPatternName
.FilterElements))
2429
else if (pattStep.MatchesPattern(
OptimizerPatternName
.FilterContentKind))
2437
Debug.Assert(pattStep.MatchesPattern(
OptimizerPatternName
.Axis), "Dod patterns should only match if step is FilterElements or FilterKindTest or Axis");
2505
else if (pattDod.MatchesPattern(
OptimizerPatternName
.DodMerge))
2566
if (OptimizerPatterns.Read(ndInvoke).MatchesPattern(
OptimizerPatternName
.TailCall))
3043
if (patt.MatchesPattern(
OptimizerPatternName
.SingleTextRtf))
4939
return patt.MatchesPattern(
OptimizerPatternName
.EqualityIndex);
4947
return !patt.MatchesPattern(
OptimizerPatternName
.JoinAndDod) && !patt.MatchesPattern(
OptimizerPatternName
.DodReverse);
System\Xml\Xsl\XmlIlGenerator.cs (1)
337
if (_qil!.IsDebug || OptimizerPatterns.Read(ndIter).MatchesPattern(
OptimizerPatternName
.MaybeSideEffects))