Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instruction annotations to the basic block representations. #92

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

virajbshah
Copy link
Collaborator

Adds instruction annotations to the proto specification (AnnotationProto) , the graph builder basic block representation (Annotation), and functions to convert between the two (AnnotationFromProto and ProtoFromAnnotation).

 * Add new message type `AnnotationProto`
   (`gematria/proto/annotation.proto`).
 * Include it `CanonicalizedInstructionProto`.
 * Add new `Annotation` class.
 * Add `instruction_annotations` vector to `Instruction`.
 * Add Python bindings for these.
 * Add tests for all above changes.
 * Add `Annotation` conversion and update `Instruction` conversion.
 * Refactor `ToVector` and `ToRepeatedPtrField` to be generic.
 * Add Python bindings for conversions.
 * Add tests for all changes.
Copy link
Collaborator

@ondrasej ondrasej left a comment

Choose a reason for hiding this comment

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

This looks good. I've added a few minor comments, but feel free to merge once they are resolved (or let me know and I'll merge).

gematria/basic_block/basic_block_protos.cc Outdated Show resolved Hide resolved
gematria/basic_block/basic_block_protos.cc Outdated Show resolved Hide resolved
gematria/basic_block/python/basic_block.cc Outdated Show resolved Hide resolved
gematria/proto/annotation.proto Outdated Show resolved Hide resolved
 * Fix a bug in the Python `Annotation` constructor.
 * Make some other minor changes.
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.

None yet

2 participants