[llvm-bugs] [Bug 37756] New: `mayReadOrWriteMemory` method behaviour in `Instruction` class
llvm-bugs at lists.llvm.org
Sat Jun 9 00:26:08 PDT 2018
Bug ID: 37756
Summary: `mayReadOrWriteMemory` method behaviour in
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: osanwevpk at gmail.com
CC: llvm-bugs at lists.llvm.org
In the comment to `mayReadOrWriteMemory` method  said that it resurns "true
if this instruction may read or write memory".
Unfortunatelly, if we check both `mayWriteToMemory` and `mayReadFromMemory`
methods [2, 3], they do not check opcode Alloca.
But in language reference said that "the `alloca` instruction allocates
sizeof(<type>)*NumElements bytes of memory on the runtime stack" . Thus, it
is possible to say in other words, that `alloca` instruction modifies memory,
as said in the comment to `mayWriteToMemory` method, and I think this should be
checked in that method.
Or do I understand incorrectly the logic behind `mayReadOrWriteMemory` method?
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs