Open
Description
After we've implemented 2 items (which are on our short term todo list already)
- Support for frame-less functions (see make functions frameless if they don't need a frame #43208)
- Support for inlining force optimized functions (see [vm/ffi] Enable inlining idempotent force-optimized functions #38985)
we should consider converting assembler intrinsics, graph intrinsics as well as specialized recognized methods in inliner to be normal recognized methods.
Those functions that need IL instructions which only work in optimized mode might need to be marked force-optimized.
This would allow us to:
- reduce code duplication (e.g. typed data specialization in inliner as well as graph intrinsics)
- simplify code (
Fragment
-based IL building is shorter, easier to read and maintain) - move towards a direction of having 1 mechanism to build special graph for recognized methods (instead of 4: asm intrinsics, graph intrinsics, specialized inliner code, normal recognized methods)
- makes the system "just work" in more cases (e.g. we run
SelectRepresentation
on normal recognized methods, but not on graph intrinsics)
There is of course a possibility that some of the functions might get slower, in which case we should investigate if we can improve our normal optimizing compiler. If that is unsuccessful we could keep the old mechanism. Though I'm cautiously optimistic about it :)
/cc @mraleph @alexmarkov