[llvm-bugs] [Bug 37756] New: `mayReadOrWriteMemory` method behaviour in `Instruction` class

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jun 9 00:26:08 PDT 2018


            Bug ID: 37756
           Summary: `mayReadOrWriteMemory` method behaviour in
                    `Instruction` class
           Product: new-bugs
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         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 [1] 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" [4]. 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?

Thank you,

[4] https://llvm.org/docs/LangRef.html#alloca-instruction

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180609/f0ab4e1d/attachment-0001.html>

More information about the llvm-bugs mailing list