[PATCH] D63507: Teach TableGen Intrin Emitter to handle LLVMPointerType<llvm_any_ty>

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 15:59:53 PDT 2019


hfinkel added inline comments.


================
Comment at: llvm/utils/TableGen/IntrinsicEmitter.cpp:375
   default: break;
+  case MVT::iPTR:
+    UpdateArgCodes(R->getValueAsDef("ElTy"), ArgCodes, NumInserted, Mapping);
----------------
erichkeane wrote:
> greened wrote:
> > Since I don't know this code I can't say whether it's correct, but it seems odd to me that this `iPTR` case is needed to handle ptr-to-any when `iPTRAny` is a case right below.  Does `iPTRAny` not mean "ptr-to-any?"  At the very least a comment would be helpful explaining what is going on here and why we need a separate `iPTR` case to handle ptr-to-any.
> > 
> iPTRAny is actually "Any Pointer", not "Pointer to Any".  I'm not terribly sure why it makes a difference, but it does.  
I believe that iPTR is a pointer in some specified address space (0, by default), and iPTRAny is a pointer in any address space.


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

https://reviews.llvm.org/D63507





More information about the llvm-commits mailing list