The code patching mechanism I proposed is fairly simple to implement and will be directly useful for my research, which I need to get started soon. Let's not rule out implementing something like that in the near term.
I'm 100% sure we can implement something specialized just for global function calls and get performance gains with a tightly coupled approach, but that won't teach us all that much. Being able to not only optimize global calls, but easily inline global functions with little extra effort, on the other hand, now that's interesting.
What I propose is as follows: 1. Implement the toggleable unconditional branch (TUB?) - Perhaps ~1-2 weeks of work? Most of the work here is in the backend, but could be split among myself, Erick and others. 2. Implement global function call optimization using TUBs - ~1 week of work, should be very easy 3. Implement global function inlining heuristics - 1-2 days of effort, inlining mechanisms are already implemented
- Maxime