[llvm] [X86] Do not ignore AlwaysInline when determining if inlining is worth it (PR #87825)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 6 02:03:05 PDT 2024
================
@@ -66,11 +66,14 @@ SDValue X86SelectionDAGInfo::EmitTargetCodeForMemset(
// If not DWORD aligned or size is more than the threshold, call the library.
// The libc version is likely to be faster for these cases. It can use the
// address value and run time information about the CPU.
- if (Alignment < Align(4) || !ConstantSize ||
- ConstantSize->getZExtValue() > Subtarget.getMaxInlineSizeThreshold())
+ if (!ConstantSize)
return SDValue();
uint64_t SizeVal = ConstantSize->getZExtValue();
+ if (!AlwaysInline &&
----------------
phoebewang wrote:
`AlwaysInline` is taken care in https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp#L8260 anyway.
I'm not sure if `stosb` is better than sequential stores.
https://github.com/llvm/llvm-project/pull/87825
More information about the llvm-commits
mailing list