[PATCH] D152383: CodeGen: Expand memory intrinsics in PreISelIntrinsicLowering

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 14:38:38 PDT 2023


aemerson added inline comments.


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:359
 
+  /// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size in
+  /// bytes that still makes it profitable to inline the call.
----------------
this doesn't match the name of the function?


================
Comment at: llvm/include/llvm/Analysis/TargetTransformInfo.h:361
+  /// bytes that still makes it profitable to inline the call.
+  int64_t getMaxMemIntrinsicInlineSizeThreshold() const;
+
----------------
These don't need to be signed, use `unsigned` or `size_t`?


================
Comment at: llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp:180-183
+  int64_t Threshold = MemIntrinsicExpandSizeThresholdOpt.getNumOccurrences()
+                          ? MemIntrinsicExpandSizeThresholdOpt
+                          : TTI.getMaxMemIntrinsicInlineSizeThreshold();
+  return CI->getSExtValue() > Threshold;
----------------
Again, size can't be signed.


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

https://reviews.llvm.org/D152383



More information about the llvm-commits mailing list