-
Notifications
You must be signed in to change notification settings - Fork 30
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 support for variable-sized and variable-aligned allocations #750
Conversation
Generalized MemoryObject.size to arbitrary expressions. Updated all existing code to use new MemoryObject.has/getKnownSize() to work only over constant size allocations like before (these are first steps to more general support)
…ing construction)
My newly added tests only work with the new alias analysis but |
Updated some test code to use "MemoryObject.getKnownSize" rather than "MemoryObject.size"
Signed-off-by: Hernan Ponce de Leon <[email protected]>
Signed-off-by: Hernan Ponce de Leon <[email protected]> Co-authored-by: Hernan Ponce de Leon <[email protected]>
You should rather create a new class for the new 2 tests and skip those in the RA test rather than (unnecessarily) removing all other miscellaneous tests. |
It depends on what unnecessarily means. I could argue that |
Added alignment property to MemoryObject
… aligned_alloc intrinsic Added a test for non-deterministic alignment Reformatting
Your point is fair. Let keep the RA test as it is. Here are the results on the weaver benchmarks with a 15 min timeout, for reachability category, on commit d9abdfa
Last year we solved 61 of the tasks. Hopefully none of the latest commits changes things drastically in terms of what we can do with these benchmarks. Is this still in DRAFT status or can it already be reviewed? |
I think you can review it. I have changed the memory encoding as a whole so there might be regression on other benchmarks, though I kinda doubt it. EDIT: Okay, there are 1 or 2 points I need to fix. DONE. |
This PR generalizes
MemoryObject
to be of variable size given byExpression size
.The encoding supports this now.
The reason the PR is marked as [DRAFT] is simply because it needs some minor cleanup and maybe more tests, but the functionality should be there.Points of interest & possible pitfalls:
EDIT: I added a new feature, namely custom alignments for allocations. This even works for non-deterministic alignments.
The intrinsic
aligned_alloc
is now supported. However, we do not make any checks such as alignments must be positive and powers of two.