[llvm-dev] [RFC] Add TargetTransformInfo::isAllocaPtrValueNonZero and let ValueTracking depend on TargetTransformInfo

Hal Finkel via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 14 22:20:53 PST 2017


On 12/14/2017 11:14 PM, Matt Arsenault wrote:
>
>
>> On Dec 14, 2017, at 20:28, Hal Finkel via llvm-dev 
>> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>>
>> Would that address your use case? Or can you have null 
>> dereferenceable pointers in that address space, just not ones from 
>> alloca?
>
> I would like to clarify what “null” means exactly. One related thing I 
> would like in the future is for the DataLayout to specify what numeric 
> value is the invalid, non-dereferencalbe pointer. i.e. the invalid 
> pointer does is a some non-0 bit pattern like -1.

Okay. That's certainly a separate discussion. For the purpose of this 
question I mean null as zero. Can you have dereferenceable pointers, 
with a value of zero when converted to an integer, in that address 
space? Or are you interested only in saying that alloca never produces 
pointers with a value of zero when converted to an integer?

Thanks again,
Hal

>
> -Matt

-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171215/58b5336e/attachment.html>


More information about the llvm-dev mailing list