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

frontend: translate mem::intrinsics::heap_base #397

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

greenhat
Copy link
Contributor

Close #396

This PR add translation for mem::intrinsics::heap_base by creating a module(mem::intrinsics) with an "empty" function (heap_base) since the real function implementation is linked at the codegen.

@greenhat greenhat changed the title feature: translate mem::intrinsics::heap_base frontend: translate mem::intrinsics::heap_base Feb 11, 2025
.component
.borrow_mut()
.symbol_manager_mut()
.insert_new(module_ref, crate::ProgramPoint::Invalid);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bitwalker I'm wondering if the symbol registration is better to be done in the op builder (module in this case)? When I first encountered this (function creation in the module) I was quite surprised that new function is not automatically registered in module symbol table.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch, I must've never added the logic to automatically register new symbol ops when inserted into a symbol table op. That should probably be done as some sort of hook that fires anytime an op is inserted into a region (or removed from one), but for now we'll have to just implement the logic in the op-specific builders manually.

@greenhat greenhat requested a review from bitwalker February 11, 2025 09:35
@bitwalker bitwalker merged commit 83b34b3 into next Feb 13, 2025
5 checks passed
@bitwalker bitwalker deleted the greenhat/i396-heap-base-intrinsic branch February 13, 2025 05:05
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.

Translate heap_base memory intrinsic needed for BumpAlloc
2 participants