Skip to content

Commit a17f8fe

Browse files
[InstCombine] Use more inline elements in a SmallVector (#100942)
The 4 inline elements only cover 58% of cases encountered here during the compilation of X86ISelLowering.cpp.ll, a .ll version of X86ISelLowering.cpp. The 8 inline elements cover 96% and save 0.27% of heap allocations.
1 parent ff7f97a commit a17f8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
15001500
// Don't try to simplify calls without uses. It will not do anything useful,
15011501
// but will result in the following folds being skipped.
15021502
if (!CI.use_empty()) {
1503-
SmallVector<Value *, 4> Args;
1503+
SmallVector<Value *, 8> Args;
15041504
Args.reserve(CI.arg_size());
15051505
for (Value *Op : CI.args())
15061506
Args.push_back(Op);

0 commit comments

Comments
 (0)