Liveness analysis on the flags, not the registers. Yes, you would have to recompile GTE instructions, instead of just calling functions. If you use VFPU afterall it might be worth it, depending on how often VFPU instructions are used in the PS1 game (I would assume they're mostly inside a tight kernel of the 3D engine).
If you don't want to do that it might be worthwhile to have two versions of each GTE instruction, at least. One that generates all flags, and one that generates no flags. I don't know how much the liveness overlaps, however. If it truly is common for games to not use any flags then you can offer the no flags version as an option universally. Otherwise, you'd only use it when analysis indicates that all flags generated will be dead.
Dead flag elimination is very common for dynarecs of machines with flags. Even gpSP does it, although only for Thumb instructions.
Bookmarks