165 references to OptimizerPatternName
System.Data.SqlXml (165)
System\Xml\Xsl\IlGen\OptimizerPatterns.cs (22)
57private static readonly int PatternCount = Enum.GetValues(typeof(OptimizerPatternName)).Length; 79optPatt.AddPattern(OptimizerPatternName.IsDocOrderDistinct); 80optPatt.AddPattern(OptimizerPatternName.SameDepth); 92optPatt.AddPattern(OptimizerPatternName.IsDocOrderDistinct); 129optPatt.AddPattern(OptimizerPatternName.IsDocOrderDistinct); 130optPatt.AddPattern(OptimizerPatternName.SameDepth); 133optPatt.AddPattern(OptimizerPatternName.IsDocOrderDistinct); 143public static void Inherit(QilNode ndSrc, QilNode ndDst, OptimizerPatternName pattern) { 152case OptimizerPatternName.Step: 157case OptimizerPatternName.FilterElements: 161case OptimizerPatternName.FilterContentKind: 165case OptimizerPatternName.EqualityIndex: 170case OptimizerPatternName.DodReverse: 171case OptimizerPatternName.JoinAndDod: 175case OptimizerPatternName.MaxPosition: 179case OptimizerPatternName.SingleTextRtf: 221public void AddPattern(OptimizerPatternName pattern) { 222Debug.Assert(Enum.IsDefined(typeof(OptimizerPatternName), pattern)); 231public bool MatchesPattern(OptimizerPatternName pattern) { 232Debug.Assert(Enum.IsDefined(typeof(OptimizerPatternName), pattern)); 250if (MatchesPattern((OptimizerPatternName) pattNum)) { 254s += ((OptimizerPatternName) pattNum).ToString();
System\Xml\Xsl\IlGen\TailCallAnalyzer.cs (1)
45OptimizerPatterns.Write(nd).AddPattern(OptimizerPatternName.TailCall);
System\Xml\Xsl\IlGen\XmlILOptimizerVisitor.cs (121)
133OptimizerPatterns.Write(newNode).AddPattern(OptimizerPatternName.IsReferenced); 165OptimizerPatterns.Write(node).AddPattern(OptimizerPatternName.MaybeSideEffects); 186if (OptimizerPatterns.Read(node[i]).MatchesPattern(OptimizerPatternName.MaybeSideEffects)) 247OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.SameDepth); } 329OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.Step); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.SameDepth); } 358OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.IsPositional); } 617if (( ( (local1).XmlType ).IsSingleton ) && ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 729OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 736AddStepPattern((QilNode) (local0), (QilNode) ( OptimizerPatterns.Read((QilNode) (local1)).GetArgument(OptimizerPatternArgument.StepInput) )); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.SameDepth); } 811OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 884OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 1394OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 1593OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 1676OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 1745OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 1814OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 1883OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local4); } 2001if ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.IsPositional) ) { 2024if ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) ) { 2058if ((( (local1).NodeType == QilNodeType.Let ) || ( ( ( (QilNode) (local1)[0] ).XmlType ).IsSingleton )) && ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 2163OptimizerPatterns.Inherit((QilNode) (local2), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local2), (QilNode) (local0), OptimizerPatternName.SameDepth); } 2171OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.SameDepth); } 2177if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.SameDepth) ) { 2181OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.SameDepth); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); } 2189if (((( IsStepPattern(local2, QilNodeType.Attribute) ) || ( IsStepPattern(local2, QilNodeType.XPathNamespace) )) || ( OptimizerPatterns.Read((QilNode) (local2)).MatchesPattern(OptimizerPatternName.FilterAttributeKind) )) && ( (local1) == ( OptimizerPatterns.Read((QilNode) (local2)).GetArgument(OptimizerPatternArgument.StepInput) ) )) { 2192OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.SameDepth); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); } 2199if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.SameDepth) ) { 2203OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); } 2231if ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) ) { 2303if (( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) ) && (!( ( (QilNode) (local1)[0] ).NodeType == QilNodeType.OptimizeBarrier ))) { 2304if ((!(DependsOn(local2,local1))) && ( !OptimizerPatterns.Read(local2).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 2323OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6); } 2340OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6); } 2357OptimizerPatterns.Write((QilNode) (local1)).AddPattern(OptimizerPatternName.MaxPosition); OptimizerPatterns.Write((QilNode) (local1)).AddArgument(OptimizerPatternArgument.MaxPosition, local6 - 1 ); } 2368OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.Step); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local3), (QilNode) (local0), OptimizerPatternName.SameDepth); } 2374if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.Axis) ) { 2394OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.FilterElements); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.ElementQName, local11); } 2410if ( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.Axis) ) { 2420OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.FilterContentKind); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.KindTestType, local6); } 2441OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.FilterAttributeKind); } 2533if ((( OptimizerPatterns.Read((QilNode) (local7)).MatchesPattern(OptimizerPatternName.FilterElements) ) || ( OptimizerPatterns.Read((QilNode) (local7)).MatchesPattern(OptimizerPatternName.FilterContentKind) )) && ( IsStepPattern(local7, QilNodeType.Content) )) { 2557if ((( OptimizerPatterns.Read((QilNode) (local5)).MatchesPattern(OptimizerPatternName.FilterElements) ) || ( OptimizerPatterns.Read((QilNode) (local5)).MatchesPattern(OptimizerPatternName.FilterContentKind) )) && ( IsStepPattern(local5, QilNodeType.Content) )) { 2575if ( !OptimizerPatterns.Read(local2).MatchesPattern(OptimizerPatternName.IsPositional) ) { 2576if (((!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterAttributeKind) ))) { 2596if ( !OptimizerPatterns.Read(local4).MatchesPattern(OptimizerPatternName.IsPositional) ) { 2598if (((!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local3)).MatchesPattern(OptimizerPatternName.FilterAttributeKind) ))) { 2618if (( !OptimizerPatterns.Read(local2).MatchesPattern(OptimizerPatternName.IsPositional) ) && ( (local3).XmlType .IsSubtypeOf( XmlQueryTypeFactory.NodeNotRtfS ) )) { 2619if (((!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterElements) )) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterContentKind) ))) && (!( OptimizerPatterns.Read((QilNode) (local1)).MatchesPattern(OptimizerPatternName.FilterAttributeKind) ))) { 2661OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local1), (QilNode) (local0), OptimizerPatternName.SameDepth); } 2667OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.DodReverse); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.DodStep, local1); } 2680OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.JoinAndDod); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.DodStep, local4); } 2693OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.DodMerge); } 2747patt.AddPattern(OptimizerPatternName.EqualityIndex); 2786patt.AddPattern(OptimizerPatternName.EqualityIndex); 2828OptimizerPatterns.Inherit((QilNode) (local4), (QilNode) (local0), OptimizerPatternName.IsDocOrderDistinct); OptimizerPatterns.Inherit((QilNode) (local4), (QilNode) (local0), OptimizerPatternName.SameDepth); } 2850AddStepPattern((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); } 2877OptimizerPatterns.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); } 2895OptimizerPatterns.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); } 2913OptimizerPatterns.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); } 2931OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 2949OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 2967OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); } 2985OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); } 3003OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); } 3021OptimizerPatterns.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); } 3039OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.SameDepth); } 3066OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 3314OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.SingleTextRtf); OptimizerPatterns.Write((QilNode) (local0)).AddArgument(OptimizerPatternArgument.RtfText, local3); 3440if ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) ) { 3453if ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) ) { 3477if (!( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 3490if (!( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 3526if (( !( (local1).XmlType ).MaybeEmpty ) && ( !OptimizerPatterns.Read(local1).MatchesPattern(OptimizerPatternName.MaybeSideEffects) )) { 3573OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.IsDocOrderDistinct); } 3591OptimizerPatterns.Write((QilNode) (local0)).AddPattern(OptimizerPatternName.Axis); AddStepPattern((QilNode) (local0), (QilNode) (local1)); } 3609OptimizerPatterns.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); } 4056if (patt.MatchesPattern(OptimizerPatternName.FilterElements) || patt.MatchesPattern(OptimizerPatternName.FilterContentKind)) { 4074if (patt.MatchesPattern(OptimizerPatternName.Axis) || 4075patt.MatchesPattern(OptimizerPatternName.FilterElements) || 4076patt.MatchesPattern(OptimizerPatternName.FilterContentKind)) { 4292patt.AddPattern(OptimizerPatternName.Step); 4301return OptimizerPatterns.Read(nd).MatchesPattern(OptimizerPatternName.IsDocOrderDistinct); 4315return patt.MatchesPattern(OptimizerPatternName.Step) && ((QilNode) patt.GetArgument(OptimizerPatternArgument.StepNode)).NodeType == stepType; 4337isUsed = optPatt.MatchesPattern(OptimizerPatternName.IsReferenced) || optPatt.MatchesPattern(OptimizerPatternName.MaybeSideEffects);
System\Xml\Xsl\IlGen\XmlIlVisitor.cs (20)
1021if (patt.MatchesPattern(OptimizerPatternName.MaxPosition)) { 1780isFilterElements = patt.MatchesPattern(OptimizerPatternName.FilterElements); 1781if (isFilterElements || patt.MatchesPattern(OptimizerPatternName.FilterContentKind)) { 1881else if (patt.MatchesPattern(OptimizerPatternName.FilterAttributeKind)) { 1887else if (patt.MatchesPattern(OptimizerPatternName.EqualityIndex)) { 1966Debug.Assert(!patt.MatchesPattern(OptimizerPatternName.IsPositional)); 1990if (patt.MatchesPattern(OptimizerPatternName.IsPositional)) { 2014if (patt.MatchesPattern(OptimizerPatternName.IsPositional)) { 2021if (patt.MatchesPattern(OptimizerPatternName.MaxPosition)) { 2243isJoinAndDod = pattDod.MatchesPattern(OptimizerPatternName.JoinAndDod); 2244if (isJoinAndDod || pattDod.MatchesPattern(OptimizerPatternName.DodReverse)) { 2247if (pattStep.MatchesPattern(OptimizerPatternName.FilterElements)) { 2252else if (pattStep.MatchesPattern(OptimizerPatternName.FilterContentKind)) { 2258Debug.Assert(pattStep.MatchesPattern(OptimizerPatternName.Axis), "Dod patterns should only match if step is FilterElements or FilterKindTest or Axis"); 2322else if (pattDod.MatchesPattern(OptimizerPatternName.DodMerge)) { 2380if (OptimizerPatterns.Read(ndInvoke).MatchesPattern(OptimizerPatternName.TailCall)) 2829if (patt.MatchesPattern(OptimizerPatternName.SingleTextRtf)) { 4561return patt.MatchesPattern(OptimizerPatternName.EqualityIndex); 4569return !patt.MatchesPattern(OptimizerPatternName.JoinAndDod) && !patt.MatchesPattern(OptimizerPatternName.DodReverse);
System\Xml\Xsl\XmlIlGenerator.cs (1)
318if (this.qil.IsDebug || OptimizerPatterns.Read(ndIter).MatchesPattern(OptimizerPatternName.MaybeSideEffects)) {