Skip to content

Conversation

usuyus
Copy link

@usuyus usuyus commented Sep 16, 2025

This PR modifies the pre-existing GCStrategy and GCMetadataPrinter for OCaml to trigger the RewriteStatepointsForGC pass and print frametables.

@usuyus usuyus changed the base branch from main to llvmize-oxcaml September 16, 2025 15:38
Copy link

@gretay-js gretay-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please create a separate file for the oxcaml gc printer instead of changing the existing OCamlGCPrinter.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be UsesMetadata = false according to the comments in GCStrategy.h and similar to other GCStrategy definitions that use statepoints.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed offline, this is intentional for AsmPrinter.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oxcaml?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oxcaml?

Comment on lines 3850 to 3851

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider calling ForceAsmWriterLinking here instead.

Copy link

@gretay-js gretay-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The module flag trick is nice, we should do it for all module names, not just for the startup module.

@usuyus usuyus merged commit 618927c into ocaml-flambda:llvmize-oxcaml Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants