The documentations states that functions with the inaccessiblememonly only access memory that is not accessible by the module bering compiled:
inaccessiblememonly This attribute indicates that the function may only access memory that is not accessible by the module being compiled. This is a weaker form of readnone. If the function reads or writes other memory, the behavior is undefined.
Therefore the Instruction::mayReadFromMemory() and Instruction::mayWriteToMemory() should report that such functions do not read not write memory in the module being compiled.