Maximum Compression Ratio

Maybe I should be looking at max compression pressure which depend where the intake valve close? I'm curious of the maximum(safe) dynamic compression a gas engine can be build on 91 octane gasoline without having premature detonation. Thank you.

Robert