Skip to content

[GR-48178] Introduce Transitive Effect Summary Analysis (TESA) - #14752

Open
graalvmbot wants to merge 4 commits into
masterfrom
d-kozak/GR-48178/call-graph-prop-rebase
Open

graalvmbot wants to merge 4 commits into
masterfrom
d-kozak/GR-48178/call-graph-prop-rebase

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

This PR introduces Transitive Effect Summary Analysis (TESA) for closed-world Native Image builds and updates the original implementation for current master APIs.

Summary:

  • build a reverse closed-world call graph from strengthened graphs and propagate conservative method-effect summaries from callees to callers
  • enable killed-location, accessed-location, killed-location-set, allocation, loop, side-effect, and throws-exception analyses by default
  • attach precise memory and exception summaries to invokes so compilation can remove redundant control flow, hoist invariant loads, and eliminate dead stores across calls when proven safe
  • retain conservative effects for unknown or ambiguous callees and report TESA timing and precision in Native Image build output
  • automatically disable TESA for open-world, PLT/GOT, and runtime-compilation builds; -H:-TransitiveEffectSummaryAnalysis remains available for explicit opt-out

Commit structure:

  • introduce the TESA framework, reverse call graph, effect lattices, killed-location optimization, reporting, and build-mode guards
  • register the additional production analyses
  • expose accessed-location summaries through invoke memory metadata
  • consume accessed-location and no-throw summaries for dead-store elimination across precise invokes

Validation:

  • SubstrateVM Eclipse formatting and Checkstyle
  • ECJ and javac warning-as-error builds for com.oracle.svm.hosted
  • full Native Image build and HelloWorld images with TESA enabled and disabled

Notes:

  • TESA is restricted to closed-world builds without PLT/GOT or runtime compilation
  • unknown effects continue to use conservative fallbacks

Compute conservative method-effect summaries from strengthened Native Image graphs and propagate them from callees to callers over the closed-world call graph. Apply precise killed-location results before compilation and expose build statistics while falling back to any effect for unknown or ambiguous state.
Register the boolean and set-based effect analyses in the production TESA engine. Allow priority inlining to work with either invoke shape because exception analysis can replace an invoke-with-exception before compilation.
Model invokes as memory accesses with a location identity and memory input so interprocedural summaries can expose precise read dependencies. Compute conservative accessed-location summaries with the existing location lattice and preserve the metadata across invoke replacements.

Keep generic lowering, value numbering, and vectorization from treating invokes as ordinary memory operations.
Allow write simplification to skip invokes when analysis proves they cannot throw and cannot access the overwritten location. Record no-throw results from exception summaries and cover observing and exceptional calls.
@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants