[PATCH] D48134: [CodeGen] make nan builtins pure rather than const (PR37778)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 13 14:08:58 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D48134#1131626, @rsmith wrote:

> Can we mark these as `argmemonly`?


I wasn't aware of that one, but it sounds accurate for nan() and friends:

  argmemonly
    This attribute indicates that the only memory accesses inside function are loads and stores from objects pointed to by its pointer-typed arguments, with arbitrary offsets. Or in other words, all memory operations in the function can refer to memory only using pointers based on its function arguments. Note that argmemonly can be used together with readonly attribute in order to specify that function reads only from its arguments.

But as Roman noted, we're going to have to update the list of possibilities to include "NoAliasAttr"? And might need to adjust the logic where that gets mapped to the LLVM attr.


Repository:
  rL LLVM

https://reviews.llvm.org/D48134





More information about the llvm-commits mailing list