[llvm-dev] The bit pattern after stripPointerCasts()
Doerfert, Johannes Rudolf via llvm-dev
llvm-dev at lists.llvm.org
Fri Dec 14 09:04:15 PST 2018
On 12/14, Matt Arsenault via llvm-dev wrote:
> > On Dec 14, 2018, at 2:44 PM, Finkel, Hal J. <hfinkel at anl.gov> wrote:
> > Do you have an opinion on which should be the default?
> > -Hal
> Not particularly. The current name sounds to me like it would strip
> any casts it possibly can. Maybe most uses should now be converted to
> a newly named stripTrivialPointerCasts?
I can certainly introduce a new stripTrivialPointerCasts() function that
will keep the bit pattern while stripping casts. Wrt to the options I
pointed out earlier (see below), this would then be 2). Afterwards, we
might want to go through all the stripPointerCasts() users to make sure
they do not actually want to call stripTrivialPointerCasts() instead.
1) Make stripPointerCasts not look through address space casts. A new
function (or parameter) would then be introduced to do the same thing
_and_ peel of address space casts.
2) Keep looking through address space casts in stripPointerCasts. A new
function (or parameter) would then be introduced to do the same but with
the guarantee that the bit pattern is preserved.
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
Argonne National Laboratory
Lemont, IL 60439, USA
jdoerfert at anl.gov
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 228 bytes
Desc: not available
More information about the llvm-dev