Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public abstract class AbstractAnalysisEngine implements BigBang {
protected final int maxConstantObjectsPerType;
protected final boolean profileConstantObjects;
protected final boolean optimizeReturnedParameter;
protected final boolean useExperimentalReachabilityAnalysis;

protected final OptionValues options;
protected final DebugContext debug;
Expand Down Expand Up @@ -124,6 +125,8 @@ public AbstractAnalysisEngine(OptionValues options, AnalysisUniverse universe, H
maxConstantObjectsPerType = PointstoOptions.MaxConstantObjectsPerType.getValue(options);
profileConstantObjects = PointstoOptions.ProfileConstantObjects.getValue(options);
optimizeReturnedParameter = PointstoOptions.OptimizeReturnedParameter.getValue(options);
useExperimentalReachabilityAnalysis = PointstoOptions.UseExperimentalReachabilityAnalysis.getValue(options);

this.snippetReflectionProvider = snippetReflectionProvider;
this.constantReflectionProvider = constantReflectionProvider;
this.wordTypes = wordTypes;
Expand Down Expand Up @@ -250,6 +253,11 @@ public boolean optimizeReturnedParameter() {
return optimizeReturnedParameter;
}

@Override
public boolean isPointsToAnalysis() {
return !useExperimentalReachabilityAnalysis;
}

public void profileConstantObject(AnalysisType type) {
if (profileConstantObjects) {
PointsToAnalysis.ConstantObjectsProfiler.registerConstant(type);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public interface BigBang extends ReachabilityAnalysis {

UnsupportedFeatures getUnsupportedFeatures();

boolean isPointsToAnalysis();

/**
* Checks if all user defined limitations such as the number of types are satisfied.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,9 @@ public Set<AnalysisMethod> getCallers() {
/** Get the list of all invoke locations for this method, as inferred by the static analysis. */
public abstract List<BytecodePosition> getInvokeLocations();

/** Get the node markers used to store per-node mappings to metadata for encoded nodes. */
public abstract Iterable<EncodedGraph.EncodedNodeReference> getEncodedNodeReferences();

/**
* Returns true if this method is a native entrypoint, i.e. it may be called from the host
* environment.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import com.oracle.graal.pointsto.util.ConcurrentLightHashMap;
import com.oracle.svm.common.meta.MultiMethod;

import jdk.graal.compiler.nodes.EncodedGraph;
import jdk.vm.ci.code.BytecodePosition;
import jdk.vm.ci.meta.JavaKind;
import jdk.vm.ci.meta.ResolvedJavaMethod;
Expand Down Expand Up @@ -125,6 +126,11 @@ public static Object unwrapInvokeReason(Object reason) {
return reason;
}

@Override
public Iterable<EncodedGraph.EncodedNodeReference> getEncodedNodeReferences() {
return typeFlow.getMethodFlowsGraph().getNodeFlows().getKeys();
}

@Override
public List<BytecodePosition> getInvokeLocations() {
List<BytecodePosition> locations = new ArrayList<>();
Expand Down
Loading