Actually That's a different can of worms altogether the reason there were backwards compatible ps3's to begin with is that initially two chips were included with the console; the emotion engine, and the chip used for graphics rendering. Playstation 1 games were done completely through software emulation from the start. As the PS3 got older, the emotion engine chip was replaced with a software emulated version in the new consoles, but the graphics rendering chip remained; as emulating it correctly on the PS3 caused too much slowdown for most games; yes that's right the PS3 can't fully emulate the PS2 through software. eventually both chips were phased out completely, and that's where we are today with Playstation 2 compatibility. so in MGS4 that flashback sequence, even if it was utilizing the emulator, was only running a ps1 game, not ps2.
And in regards to the use of code it seems a little misleading. sure bits and pieces of code could have been used from gt4 to gt5, but that would have been inefficient in terms of resource usage. Of course this is all just thinking out loud on this part; as I haven't used a PS3 devkit. But it looks more like models and assets outside of code were used from gt4->gt5.
but that's just one man's opinion.