Skip to content

Commit 9907618

Browse files
committed
Smaller SmallVectors
1 parent 973c7c2 commit 9907618

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ static cl::opt<MSanEmbedFaultingInstructionMode> ClEmbedFaultingInst(
286286
clEnumValN(
287287
MSanEmbedFaultingInstructionMode::Full, "full",
288288
"Embed the complete LLVM IR instruction (including operands).")),
289-
cl::Hidden, cl::init(MSanEmbedFaultingInstructionMode::Name));
289+
cl::Hidden, cl::init(MSanEmbedFaultingInstructionMode::None));
290290

291291
static cl::opt<bool>
292292
ClHandleICmpExact("msan-handle-icmp-exact",
@@ -929,7 +929,7 @@ void MemorySanitizer::createUserspaceApi(Module &M,
929929
StringRef WarningFnName = getWarningFnName(
930930
TrackOrigins, Recover,
931931
ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None);
932-
SmallVector<Type *, 4> ArgsTy = {};
932+
SmallVector<Type *, 2> ArgsTy = {};
933933
if (TrackOrigins) {
934934
ArgsTy.push_back(IRB.getInt32Ty());
935935
if (ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None)
@@ -974,7 +974,7 @@ void MemorySanitizer::createUserspaceApi(Module &M,
974974
AccessSizeIndex++) {
975975
unsigned AccessSize = 1 << AccessSizeIndex;
976976
std::string FunctionName = "__msan_maybe_warning_" + itostr(AccessSize);
977-
SmallVector<Type *, 4> ArgsTy = {IRB.getIntNTy(AccessSize * 8),
977+
SmallVector<Type *, 3> ArgsTy = {IRB.getIntNTy(AccessSize * 8),
978978
IRB.getInt32Ty()};
979979
if (ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None) {
980980
FunctionName = "__msan_maybe_warning_instname_" + itostr(AccessSize);
@@ -1500,7 +1500,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
15001500
Value *ConvertedShadow2 =
15011501
IRB.CreateZExt(ConvertedShadow, IRB.getIntNTy(8 * (1 << SizeIndex)));
15021502

1503-
SmallVector<Value *, 4> Args = {
1503+
SmallVector<Value *, 3> Args = {
15041504
ConvertedShadow2,
15051505
MS.TrackOrigins && Origin ? Origin : (Value *)IRB.getInt32(0)};
15061506
if (ClEmbedFaultingInst != MSanEmbedFaultingInstructionMode::None)

0 commit comments

Comments
 (0)