mirror of
https://github.com/qemu/qemu.git
synced 2024-11-24 11:23:43 +08:00
tcg/README: Expand advice on number of TCG ops per target insn
Expand the note on the number of TCG ops generated per target insn, to be clearer about the range of applicability of the 20 op rule of thumb. Also add a note about the hard MAX_OP_PER_INSTR limit. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
cf973e469b
commit
107a47cc2d
10
tcg/README
10
tcg/README
@ -504,7 +504,15 @@ register.
|
|||||||
- Don't hesitate to use helpers for complicated or seldom used target
|
- Don't hesitate to use helpers for complicated or seldom used target
|
||||||
instructions. There is little performance advantage in using TCG to
|
instructions. There is little performance advantage in using TCG to
|
||||||
implement target instructions taking more than about twenty TCG
|
implement target instructions taking more than about twenty TCG
|
||||||
instructions.
|
instructions. Note that this rule of thumb is more applicable to
|
||||||
|
helpers doing complex logic or arithmetic, where the C compiler has
|
||||||
|
scope to do a good job of optimisation; it is less relevant where
|
||||||
|
the instruction is mostly doing loads and stores, and in those cases
|
||||||
|
inline TCG may still be faster for longer sequences.
|
||||||
|
|
||||||
|
- The hard limit on the number of TCG instructions you can generate
|
||||||
|
per target instruction is set by MAX_OP_PER_INSTR in exec-all.h --
|
||||||
|
you cannot exceed this without risking a buffer overrun.
|
||||||
|
|
||||||
- Use the 'discard' instruction if you know that TCG won't be able to
|
- Use the 'discard' instruction if you know that TCG won't be able to
|
||||||
prove that a given global is "dead" at a given program point. The
|
prove that a given global is "dead" at a given program point. The
|
||||||
|
Loading…
Reference in New Issue
Block a user