[Patch] Use address-taken to disambiguate global var and indirect accesses

Shuxin Yang shuxin.llvm at gmail.com
Mon Oct 21 16:09:01 PDT 2013


On 10/21/13 4:06 PM, Eric Christopher wrote:
> On Mon, Oct 21, 2013 at 3:40 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
>> On 10/21/13 3:14 PM, Eric Christopher wrote:
>>> +  bool notAddrTaken : 1;                       // Dose not have address
>>> taken.
>>>
>>> +If a global variable dose not have its address taken, it will be
>>> optionally
>>> "does"
>>>
>>> Given the awkwardness of reading this:
>>>
>>> +  GV->setNotAddressTaken(true);
>>> Perhaps we'd like to spell the functions different, we can still use
>>> (though it's awkward) "notAddrTaken" for the IR notation how about just
>>> making all of the queries "addressTaken()" and then you can set it to false
>>> by default and propagate that way?
>>>
>>> -eric
>>>
>> Hi, Eric:
>>
>>     Thank you for sharing your thought!
>>
>>     Do you mean we still use the name "notAddrTaken" for the bit-field in
>> GlobalVariable, but get rid of
>> the "not" from the GlobalVariable's accessor functions?
>>
>>    Yes, I personally think "the not" in the function look awkward. However,
>> the negation of
>> the not-address-taken is "may-address-taken" instead of "address-taken".  We
>> can use
> Ah right. Hrm. :)
>
>> {Set|Reset}MayAddrTaken(). However they seems to be awkward as well.  What
>> do you think?
>> Just use "addr-taken" for may-addr-taken?
>>
> addrMaybeTaken perhaps?

Ok



More information about the llvm-commits mailing list