public abstract class StrengthenGraphs extends AbstractAnalysisResultsBuilder
Graal IR used
to build the type flow graph.
It uses a CanonicalizerPhase.CustomSimplification for the CanonicalizerPhase, because that provides
all the framework for iterative stamp propagation and adding/removing control flow nodes while
processing the graph.
From the single-method view that the compiler has when later compiling the graph, static analysis
results appear "out of thin air": At some random point in the graph, we suddenly have a more
precise type (= stamp) for a value. Since many nodes are floating, and even currently fixed nodes
might float later, we need to be careful that all information coming from the type flow graph
remains properly anchored to the point where the static analysis actually proved the information.
So we cannot just change the stamp of, e.g., the parameter of a method invocation, to a more
precise stamp. We need to do that indirectly by adding a PiNode that is anchored using a
ValueAnchorNode.| Modifier and Type | Class and Description |
|---|---|
static class |
StrengthenGraphs.Options |
bb, converter| Constructor and Description |
|---|
StrengthenGraphs(PointsToAnalysis bb,
Universe converter) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.graalvm.compiler.nodes.FixedNode |
createInvokeWithNullReceiverReplacement(org.graalvm.compiler.nodes.StructuredGraph graph) |
protected abstract org.graalvm.compiler.nodes.FixedNode |
createUnreachable(org.graalvm.compiler.nodes.StructuredGraph graph,
org.graalvm.compiler.nodes.spi.CoreProviders providers,
Supplier<String> message) |
protected abstract AnalysisType |
getSingleImplementorType(AnalysisType originalType) |
protected abstract AnalysisType |
getStrengthenStampType(AnalysisType originalType) |
protected abstract String |
getTypeName(AnalysisType type) |
StaticAnalysisResults |
makeOrApplyResults(AnalysisMethod m) |
JavaTypeProfile |
makeTypeProfile(AnalysisField field) |
protected abstract void |
setInvokeProfiles(org.graalvm.compiler.nodes.Invoke invoke,
JavaTypeProfile typeProfile,
JavaMethodProfile methodProfile) |
protected abstract boolean |
simplifyDelegate(org.graalvm.compiler.graph.Node n,
org.graalvm.compiler.nodes.spi.SimplifierTool tool) |
getBigBang, makeMethodProfile, makeTypeProfilepublic StrengthenGraphs(PointsToAnalysis bb, Universe converter)
public StaticAnalysisResults makeOrApplyResults(AnalysisMethod m)
makeOrApplyResults in class AbstractAnalysisResultsBuilderpublic JavaTypeProfile makeTypeProfile(AnalysisField field)
makeTypeProfile in class AbstractAnalysisResultsBuilderprotected abstract AnalysisType getSingleImplementorType(AnalysisType originalType)
protected abstract AnalysisType getStrengthenStampType(AnalysisType originalType)
protected abstract org.graalvm.compiler.nodes.FixedNode createUnreachable(org.graalvm.compiler.nodes.StructuredGraph graph,
org.graalvm.compiler.nodes.spi.CoreProviders providers,
Supplier<String> message)
protected abstract org.graalvm.compiler.nodes.FixedNode createInvokeWithNullReceiverReplacement(org.graalvm.compiler.nodes.StructuredGraph graph)
protected abstract void setInvokeProfiles(org.graalvm.compiler.nodes.Invoke invoke,
JavaTypeProfile typeProfile,
JavaMethodProfile methodProfile)
protected abstract String getTypeName(AnalysisType type)
protected abstract boolean simplifyDelegate(org.graalvm.compiler.graph.Node n,
org.graalvm.compiler.nodes.spi.SimplifierTool tool)