[PATCH] D31047: TTI: Split IsSimple in MemIntrinsicInfo

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 06:09:35 PDT 2017

hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.


Comment at: include/llvm/Analysis/TargetTransformInfo.h:59
+  uint8_t NumMemRefs = 0;
+  bool ReadMem = false;
While we're cleaning this up, can you remove this NumMemRefs variable? The interface is only useful if NumMemRefs is 1, and the structure only supports one PtrVal, so it is only usable if you set NumMemRefs to 1 (EarlyCSE aborts using this interface at all if NumMemRefs != 1). If we were going to extend it to support multiple memory references, we'd probably need a vector of something, and then we'd get this number from the size of the vector. Thus, this NumMemRefs will likely never be needed.


More information about the llvm-commits mailing list