public PointsToAbstractValue GetOrCreateDefaultValue(AnalysisEntity analysisEntity)
        {
            if (!_defaultPointsToValueMapBuilder.TryGetValue(analysisEntity, out PointsToAbstractValue value))
            {
                if (analysisEntity.Symbol?.Kind == SymbolKind.Local ||
                    analysisEntity.Symbol is IParameterSymbol parameter && parameter.RefKind == RefKind.Out ||
                    analysisEntity.CaptureId != null)
                {
                    return(PointsToAbstractValue.Undefined);
                }
                else if (analysisEntity.Type.IsNonNullableValueType())
                {
                    return(PointsToAbstractValue.NoLocation);
                }
                else if (analysisEntity.HasUnknownInstanceLocation)
                {
                    return(PointsToAbstractValue.Unknown);
                }

                value = PointsToAbstractValue.Create(AbstractLocation.CreateAnalysisEntityDefaultLocation(analysisEntity), mayBeNull: true);

                // PERF: Do not track entity and its points to value for partial analysis for entities requiring complete analysis.
                if (PointsToAnalysisKind == PointsToAnalysisKind.Complete ||
                    !analysisEntity.IsChildOrInstanceMemberNeedingCompletePointsToAnalysis())
                {
                    _trackedEntitiesBuilder.AddEntityAndPointsToValue(analysisEntity, value);
                    _defaultPointsToValueMapBuilder.Add(analysisEntity, value);
                }
            }
        public PointsToAbstractValue GetOrCreateDefaultValue(AnalysisEntity analysisEntity)
        {
            if (!_defaultPointsToValueMapBuilder.TryGetValue(analysisEntity, out PointsToAbstractValue value))
            {
                if (analysisEntity.SymbolOpt?.Kind == SymbolKind.Local ||
                    analysisEntity.SymbolOpt is IParameterSymbol parameter && parameter.RefKind == RefKind.Out ||
                    analysisEntity.CaptureIdOpt != null)
                {
                    return(PointsToAbstractValue.Undefined);
                }
                else if (!analysisEntity.Type.IsReferenceTypeOrNullableValueType())
                {
                    return(PointsToAbstractValue.NoLocation);
                }
                else if (analysisEntity.HasUnknownInstanceLocation ||
                         PointsToAnalysisKind != PointsToAnalysisKind.Complete &&
                         analysisEntity.IsChildOrInstanceMemberNeedingCompletePointsToAnalysis())
                {
                    return(PointsToAbstractValue.Unknown);
                }

                value = PointsToAbstractValue.Create(AbstractLocation.CreateAnalysisEntityDefaultLocation(analysisEntity), mayBeNull: true);
                _trackedEntitiesBuilder.AddEntityAndPointsToValue(analysisEntity, value);
                _defaultPointsToValueMapBuilder.Add(analysisEntity, value);
            }
        public PointsToAbstractValue GetOrCreateDefaultValue(AnalysisEntity analysisEntity)
        {
            Debug.Assert(analysisEntity.Type.IsReferenceTypeOrNullableValueType());
            Debug.Assert(_lazyDefaultPointsToValueMap == null);

            if (!_defaultPointsToValueMapBuilder.TryGetValue(analysisEntity, out PointsToAbstractValue value))
            {
                value = analysisEntity.SymbolOpt?.Kind == SymbolKind.Local ?
                        PointsToAbstractValue.Undefined :
                        PointsToAbstractValue.Create(AbstractLocation.CreateAnalysisEntityDefaultLocation(analysisEntity), mayBeNull: true);
                _defaultPointsToValueMapBuilder.Add(analysisEntity, value);
            }

            return(value);
        }