https://llvm.org/bugs/show_bug.cgi?id=24603
Bug ID: 24603 Summary: doesNotAccessMemory documentation has wrong example Product: libraries Version: trunk Hardware: All OS: All Status: NEW Severity: normal Priority: P Component: Global Analyses Assignee: unassignedb...@nondot.org Reporter: schnet...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified The file docs/AliasAnalysis.rst contains these lines: {{{ The ``doesNotAccessMemory`` and ``onlyReadsMemory`` methods ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ These methods are used to provide very simple mod/ref information for function calls. The ``doesNotAccessMemory`` method returns true for a function if the analysis can prove that the function never reads or writes to memory, or if the function only reads from constant memory. Functions with this property are side-effect free and only depend on their input arguments, allowing them to be eliminated if they form common subexpressions or be hoisted out of loops. Many common functions behave this way (e.g., ``sin`` and ``cos``) but many others do not (e.g., ``acos``, which modifies the ``errno`` variable). }}} I think the examples {sin} and {cos} are wrong, since they set errno (if the argument is infinite). Better examples may be {fabs} and {copysign}. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs