[PATCH] D66170: InferAddressSpaces: Move target intrinsic handling to TTI

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 08:05:56 PDT 2019


hliao added inline comments.


================
Comment at: include/llvm/Analysis/TargetTransformInfo.h:374
+  /// was handled.
+  bool rewriteIntrinsicWithAddressSpace(IntrinsicInst *II,
+                                        Value *OldV, Value *NewV) const;
----------------
arsenm wrote:
> hliao wrote:
> > In general, we need to tell the value use, says save a generic pointer to somewhere, of a pointer from its address use. Only the later needs address-space resolving or inferring. It would be better to add the extra opnd index to help the target checks that case and only rewrite the address use.
> InferAddressSpaces doesn't track this based on the operand index. This will expect any operands reported by collectRewritableIntrinsicOperands to be replaced, so it shouldn't be reporting any non-address uses
following the same idea adding rewriteIntrinsicWithAddressSpace, collectRewritableIntrinsicOperands should be added a target hook as well.


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

https://reviews.llvm.org/D66170





More information about the llvm-commits mailing list