[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

Florian Hahn via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 10:49:30 PDT 2019


fhahn added a comment.

In D64128#1576391 <https://reviews.llvm.org/D64128#1576391>, @rjmccall wrote:

> I wouldn't favor adding something really obscure that was only useful for clang, but I think builtins to set and clear mask bits while promising to preserve object-reference identity would be more generally useful for libraries.  For example, there might be somewhere in libc++ that could take advantage of this.


Yep, I think for this to be generally useful we would also need an intrinsic to set bits as well. I'll commit the LLVM patches and improvements to ValueTracking in the next few days for ptrmask and will put up a patch for builtins once I know more about how libcxx could use them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64128/new/

https://reviews.llvm.org/D64128





More information about the cfe-commits mailing list