Displaying 3 results from an estimated 3 matches for "isallocaptrvaluenonzero".
2017 Dec 14
2
[RFC] Add TargetTransformInfo::isAllocaPtrValueNonZero and let ValueTracking depend on TargetTransformInfo
...ain targets. For example, amdgcn---amdgiz target has alloca in address space 5, and its alloca always has non-zero value. This assumption causes some optimizations disabled for amdgcn---amdgiz target.
After discussions at https://reviews.llvm.org/D40670, I propose to introduce TargetTransformInfo::isAllocaPtrValueNonZero for representing whether alloca instruction always has non-zero value, and add a TargetTransformInfo argument to ValueTracking functions e.g. isKnownNonZero().
As a result, passes using ValueTracking will require TargetTransformInfo.
Comments are welcome.
Thanks.
Sam
-------------- next part --...
2017 Dec 14
3
[RFC] Add TargetTransformInfo::isAllocaPtrValueNonZero and let ValueTracking depend on TargetTransformInfo
...-A5, which means alloca is in address space 5. How about adding a letter z to -A5 to indicate alloca may have zero value? i.e. -A5 means alloca is in address space 5 and always has non-zero value, -A5z means alloca is in address space 5 and may have zero value.
Then we can add function DataLayout::isAllocaPtrValueNonZero() to check whether alloca always has non-zero value.
Sam
From: Hal Finkel [mailto:hfinkel at anl.gov]
Sent: Thursday, December 14, 2017 4:06 PM
To: Liu, Yaxun (Sam) <Yaxun.Liu at amd.com>; llvm-dev <llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] [RFC] Add TargetTransformInfo::isA...
2017 Dec 15
3
[RFC] Add TargetTransformInfo::isAllocaPtrValueNonZero and let ValueTracking depend on TargetTransformInfo
> On Dec 14, 2017, at 20:28, Hal Finkel via llvm-dev <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