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