Host object invariant constant folding #54
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#54
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#33 is done, but we have not yet implemented constant folding for host object kernel invariants.
We probably want some inlining passes.
Before:
After #114:
The optimization does not seem that high.
We can do this if you want:
And set the linkage of functions to be private to prevent duplicating the function body. But this hurts LLVM codegen performance. We can also try LTO if you want.
It is crucial that this kind of code does get optimized. A lot of experiments rely on this.
The LLVM IR generated after this patch looks fine to me.
Maybe keep several threads then combine the LLVM modules into one as suggested in #18 (comment) ?
Yes we should set this private linkage to prevent duplication.
This is now optimized to
In disassembly:
Excellent! Well done.