With the tracing front-end to the JIT we are producing longer traces than before.
This should be good, but results in very large chunks of machine code.
Large chunks of machine code are bad because:
- It takes longer and uses more memory
- It puts a lot of pressure on the icache, possibly evicting the interpreter
- It makes handling of inline data and branches less efficient as the targets are further away.
To be clear, the problem is not the number of uops per trace, but the amount of machine code per uop.
Things we can do to fix this:
- Move code into helper functions for the larger uops
- Move complex decref sequences for
DECREF_INPUTS() into helper functions.
(We can also do more optimizations to remove more uops, but that's a separate issue and we're doing it anyway)
Linked PRs