Skip to content

Commit 5d400dc

Browse files
committed
[func-sig-opts] Use MutableArrayRef instead of llvm::SmallVector to store Argument/Result descriptors.
We never push_back additional such items onto the descriptor lists once the transform is constructed. We do on the other hand, potentially modify those items in the vector. That suggests that this property is better represented by the "simpler" MutableArrayRef.
1 parent 6c42bcc commit 5d400dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/Transforms/FunctionSignatureOpts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,11 @@ class FunctionSignatureTransform {
113113

114114
/// Keep a "view" of precompiled information on arguments that we use
115115
/// during our optimization.
116-
llvm::SmallVector<ArgumentDescriptor, 4> &ArgumentDescList;
116+
MutableArrayRef<ArgumentDescriptor> ArgumentDescList;
117117

118118
/// Keep a "view" of precompiled information on the direct results that we
119119
/// will use during our optimization.
120-
llvm::SmallVector<ResultDescriptor, 4> &ResultDescList;
120+
MutableArrayRef<ResultDescriptor> ResultDescList;
121121

122122
/// Return a function name based on ArgumentDescList and ResultDescList.
123123
std::string createOptimizedSILFunctionName();

0 commit comments

Comments
 (0)