[PATCH] D27563: TTI: Add comment clarifying the meaning of MemIntrinsicInfo::PtrVal

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 19:48:29 PST 2016


tstellarAMD created this revision.
tstellarAMD added a reviewer: mcrosier.
tstellarAMD added a subscriber: llvm-commits.
Herald added a subscriber: wdng.

EarlyCSE assumes that intrinsics with a defined PtrVal are functionally
equivalent to a load/store and it will CSE two intrinsics that have the
same PtrVal even if other arguments are different.


https://reviews.llvm.org/D27563

Files:
  include/llvm/Analysis/TargetTransformInfo.h


Index: include/llvm/Analysis/TargetTransformInfo.h
===================================================================
--- include/llvm/Analysis/TargetTransformInfo.h
+++ include/llvm/Analysis/TargetTransformInfo.h
@@ -53,6 +53,11 @@
   // Same Id is set by the target for corresponding load/store intrinsics.
   unsigned short MatchingId;
   int NumMemRefs;
+
+  /// This is the pointer that the intrinsic is loading from or storing to.
+  /// If this is non-null, then analysis/optimization passes can assume that
+  /// this intrinsic is functionally equivalent to a load/store from this
+  /// pointer.
   Value *PtrVal;
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27563.80711.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161208/52e08e15/attachment.bin>


More information about the llvm-commits mailing list