IR: Implement Instruction::mayReadOrWriteMemory with a single switch (#239479)
Separately calling mayReadFromMemory and mayWriteToMemory performed 2
calls and was slower. This speeds up attributor-light pass up to 2.7%
(callgrind), and 0.2-5.8% faster with other pending Attributor
compile-time changes applied.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>