[PATCH] Add read_write_arg_mem attribute
igor at azulsystems.com
Thu Jun 18 09:16:53 PDT 2015
It is specifically not legal to consider a readonly function as ReadWriteArgMem. A readonly function could read from a global which is not passed as an argument.
Your are right. I probably confused readonly with readnone here.
One way of framing this is that read_write_arg_mem is a special form of a read/write set for the function. Where the set is interpreted as RW or just R depends on other knowledge of the function (i.e. the readonly attribute.)
For this reason, I'd be tempted to rename this as "access_arg_mem_only" or something. Before actually doing that mechanical change, please raise this in an email to llvmdev. I think this needs broader attention. (In particular, I wouldn't feel comfortable signing off on this. The scope is too large.)
I agree, this framing of a problem is better. It reduces confusion regarding dependencies between different function attributes.
More information about the llvm-commits