Merge pull request #14244 from MathiasVP/remove-unnecessary-size_t-cast

C++: Remove unnecessary `size_t` cast from allocations
This commit is contained in:
Mathias Vorreiter Pedersen 2023-09-18 16:18:24 +01:00 коммит произвёл GitHub
Родитель 998237e8af 0e9f5f6b8e
Коммит 6a2a029c4c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 335 добавлений и 3 удалений

Просмотреть файл

@ -1906,8 +1906,10 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize {
final override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) {
resultType = getTypeForPRValue(expr.getAllocator().getParameter(0).getType()) and
(
this.extentNeedsConversion() and
// Convert the extent to `size_t`, because the AST doesn't do this already.
tag = AllocationExtentConvertTag() and opcode instanceof Opcode::Convert
tag = AllocationExtentConvertTag() and
opcode instanceof Opcode::Convert
or
tag = AllocationElementSizeTag() and opcode instanceof Opcode::Constant
or
@ -1918,6 +1920,7 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize {
final override Instruction getInstructionSuccessor(InstructionTag tag, EdgeKind kind) {
kind instanceof GotoEdge and
(
this.extentNeedsConversion() and
tag = AllocationExtentConvertTag() and
result = this.getInstruction(AllocationElementSizeTag())
or
@ -1933,7 +1936,9 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize {
final override Instruction getChildSuccessor(TranslatedElement child) {
child = this.getExtent() and
result = this.getInstruction(AllocationExtentConvertTag())
if this.extentNeedsConversion()
then result = this.getInstruction(AllocationExtentConvertTag())
else result = this.getInstruction(AllocationElementSizeTag())
}
final override string getInstructionConstantValue(InstructionTag tag) {
@ -1945,18 +1950,32 @@ class TranslatedNonConstantAllocationSize extends TranslatedAllocationSize {
tag = AllocationSizeTag() and
(
operandTag instanceof LeftOperandTag and
result = this.getInstruction(AllocationExtentConvertTag())
(
if this.extentNeedsConversion()
then result = this.getInstruction(AllocationExtentConvertTag())
else result = this.getExtent().getResult()
)
or
operandTag instanceof RightOperandTag and
result = this.getInstruction(AllocationElementSizeTag())
)
or
this.extentNeedsConversion() and
tag = AllocationExtentConvertTag() and
operandTag instanceof UnaryOperandTag and
result = this.getExtent().getResult()
}
TranslatedExpr getExtent() { result = getTranslatedExpr(expr.getExtent().getFullyConverted()) }
/**
* Holds if the result of `expr.getExtent()` does not have the same type as
* the allocator's size parameter.
*/
private predicate extentNeedsConversion() {
expr.getExtent().getFullyConverted().getUnspecifiedType() !=
expr.getAllocator().getParameter(0).getUnspecifiedType()
}
}
/**

Просмотреть файл

@ -15846,6 +15846,95 @@ ir.cpp:
# 2095| getExpr(): [VariableAccess] x
# 2095| Type = [IntType] int
# 2095| ValueCategory = prvalue(load)
# 2098| [TopLevelFunction] void newArrayCorrectType(size_t)
# 2098| <params>:
# 2098| getParameter(0): [Parameter] n
# 2098| Type = [CTypedefType,Size_t] size_t
# 2098| getEntryPoint(): [BlockStmt] { ... }
# 2099| getStmt(0): [ExprStmt] ExprStmt
# 2099| getExpr(): [NewArrayExpr] new[]
# 2099| Type = [IntPointerType] int *
# 2099| ValueCategory = prvalue
# 2099| getExtent(): [VariableAccess] n
# 2099| Type = [CTypedefType,Size_t] size_t
# 2099| ValueCategory = prvalue(load)
# 2100| getStmt(1): [ExprStmt] ExprStmt
# 2100| getExpr(): [NewArrayExpr] new[]
# 2100| Type = [IntPointerType] int *
# 2100| ValueCategory = prvalue
# 2100| getAllocatorCall(): [FunctionCall] call to operator new[]
# 2100| Type = [VoidPointerType] void *
# 2100| ValueCategory = prvalue
# 2100| getArgument(0): [ErrorExpr] <error expr>
# 2100| Type = [LongType] unsigned long
# 2100| ValueCategory = prvalue
# 2100| getArgument(1): [Literal] 1.0
# 2100| Type = [FloatType] float
# 2100| Value = [Literal] 1.0
# 2100| ValueCategory = prvalue
# 2100| getExtent(): [VariableAccess] n
# 2100| Type = [CTypedefType,Size_t] size_t
# 2100| ValueCategory = prvalue(load)
# 2101| getStmt(2): [ExprStmt] ExprStmt
# 2101| getExpr(): [NewArrayExpr] new[]
# 2101| Type = [PointerType] String *
# 2101| ValueCategory = prvalue
# 2101| getInitializer(): [ArrayAggregateLiteral] {...}
# 2101| Type = [ArrayType] String[]
# 2101| ValueCategory = prvalue
# 2101| getAnElementExpr(0): [ConstructorCall] call to String
# 2101| Type = [VoidType] void
# 2101| ValueCategory = prvalue
# 2101| getExtent(): [VariableAccess] n
# 2101| Type = [CTypedefType,Size_t] size_t
# 2101| ValueCategory = prvalue(load)
# 2102| getStmt(3): [ExprStmt] ExprStmt
# 2102| getExpr(): [NewArrayExpr] new[]
# 2102| Type = [PointerType] Overaligned *
# 2102| ValueCategory = prvalue
# 2102| getExtent(): [VariableAccess] n
# 2102| Type = [CTypedefType,Size_t] size_t
# 2102| ValueCategory = prvalue(load)
# 2102| getAlignmentArgument(): [Literal] 128
# 2102| Type = [ScopedEnum] align_val_t
# 2102| Value = [Literal] 128
# 2102| ValueCategory = prvalue
# 2103| getStmt(4): [ExprStmt] ExprStmt
# 2103| getExpr(): [NewArrayExpr] new[]
# 2103| Type = [PointerType] DefaultCtorWithDefaultParam *
# 2103| ValueCategory = prvalue
# 2103| getInitializer(): [ArrayAggregateLiteral] {...}
# 2103| Type = [ArrayType] DefaultCtorWithDefaultParam[]
# 2103| ValueCategory = prvalue
# 2103| getAnElementExpr(0): [ConstructorCall] call to DefaultCtorWithDefaultParam
# 2103| Type = [VoidType] void
# 2103| ValueCategory = prvalue
# 2103| getExtent(): [VariableAccess] n
# 2103| Type = [CTypedefType,Size_t] size_t
# 2103| ValueCategory = prvalue(load)
# 2104| getStmt(5): [ExprStmt] ExprStmt
# 2104| getExpr(): [NewArrayExpr] new[]
# 2104| Type = [IntPointerType] int *
# 2104| ValueCategory = prvalue
# 2104| getInitializer(): [ArrayAggregateLiteral] {...}
# 2104| Type = [ArrayType] int[3]
# 2104| ValueCategory = prvalue
# 2104| getAnElementExpr(0): [Literal] 0
# 2104| Type = [IntType] int
# 2104| Value = [Literal] 0
# 2104| ValueCategory = prvalue
# 2104| getAnElementExpr(1): [Literal] 1
# 2104| Type = [IntType] int
# 2104| Value = [Literal] 1
# 2104| ValueCategory = prvalue
# 2104| getAnElementExpr(2): [Literal] 2
# 2104| Type = [IntType] int
# 2104| Value = [Literal] 2
# 2104| ValueCategory = prvalue
# 2104| getExtent(): [VariableAccess] n
# 2104| Type = [CTypedefType,Size_t] size_t
# 2104| ValueCategory = prvalue(load)
# 2105| getStmt(6): [ReturnStmt] return ...
perf-regression.cpp:
# 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&)
# 4| <params>:

Просмотреть файл

@ -12215,6 +12215,81 @@ ir.cpp:
# 2090| v2090_8(void) = AliasedUse : ~m2094_4
# 2090| v2090_9(void) = ExitFunction :
# 2098| void newArrayCorrectType(size_t)
# 2098| Block 0
# 2098| v2098_1(void) = EnterFunction :
# 2098| m2098_2(unknown) = AliasedDefinition :
# 2098| m2098_3(unknown) = InitializeNonLocal :
# 2098| m2098_4(unknown) = Chi : total:m2098_2, partial:m2098_3
# 2098| r2098_5(glval<unsigned long>) = VariableAddress[n] :
# 2098| m2098_6(unsigned long) = InitializeParameter[n] : &:r2098_5
# 2099| r2099_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2099| r2099_2(glval<unsigned long>) = VariableAddress[n] :
# 2099| r2099_3(unsigned long) = Load[n] : &:r2099_2, m2098_6
# 2099| r2099_4(unsigned long) = Constant[4] :
# 2099| r2099_5(unsigned long) = Mul : r2099_3, r2099_4
# 2099| r2099_6(void *) = Call[operator new[]] : func:r2099_1, 0:r2099_5
# 2099| m2099_7(unknown) = ^CallSideEffect : ~m2098_4
# 2099| m2099_8(unknown) = Chi : total:m2098_4, partial:m2099_7
# 2099| m2099_9(unknown) = ^InitializeDynamicAllocation : &:r2099_6
# 2099| r2099_10(int *) = Convert : r2099_6
# 2100| r2100_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2100| r2100_2(glval<unsigned long>) = VariableAddress[n] :
# 2100| r2100_3(unsigned long) = Load[n] : &:r2100_2, m2098_6
# 2100| r2100_4(unsigned long) = Constant[4] :
# 2100| r2100_5(unsigned long) = Mul : r2100_3, r2100_4
# 2100| r2100_6(float) = Constant[1.0] :
# 2100| r2100_7(void *) = Call[operator new[]] : func:r2100_1, 0:r2100_5, 1:r2100_6
# 2100| m2100_8(unknown) = ^CallSideEffect : ~m2099_8
# 2100| m2100_9(unknown) = Chi : total:m2099_8, partial:m2100_8
# 2100| m2100_10(unknown) = ^InitializeDynamicAllocation : &:r2100_7
# 2100| r2100_11(int *) = Convert : r2100_7
# 2101| r2101_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2101| r2101_2(glval<unsigned long>) = VariableAddress[n] :
# 2101| r2101_3(unsigned long) = Load[n] : &:r2101_2, m2098_6
# 2101| r2101_4(unsigned long) = Constant[8] :
# 2101| r2101_5(unsigned long) = Mul : r2101_3, r2101_4
# 2101| r2101_6(void *) = Call[operator new[]] : func:r2101_1, 0:r2101_5
# 2101| m2101_7(unknown) = ^CallSideEffect : ~m2100_9
# 2101| m2101_8(unknown) = Chi : total:m2100_9, partial:m2101_7
# 2101| m2101_9(unknown) = ^InitializeDynamicAllocation : &:r2101_6
# 2101| r2101_10(String *) = Convert : r2101_6
# 2102| r2102_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2102| r2102_2(glval<unsigned long>) = VariableAddress[n] :
# 2102| r2102_3(unsigned long) = Load[n] : &:r2102_2, m2098_6
# 2102| r2102_4(unsigned long) = Constant[256] :
# 2102| r2102_5(unsigned long) = Mul : r2102_3, r2102_4
# 2102| r2102_6(align_val_t) = Constant[128] :
# 2102| r2102_7(void *) = Call[operator new[]] : func:r2102_1, 0:r2102_5, 1:r2102_6
# 2102| m2102_8(unknown) = ^CallSideEffect : ~m2101_8
# 2102| m2102_9(unknown) = Chi : total:m2101_8, partial:m2102_8
# 2102| m2102_10(unknown) = ^InitializeDynamicAllocation : &:r2102_7
# 2102| r2102_11(Overaligned *) = Convert : r2102_7
# 2103| r2103_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2103| r2103_2(glval<unsigned long>) = VariableAddress[n] :
# 2103| r2103_3(unsigned long) = Load[n] : &:r2103_2, m2098_6
# 2103| r2103_4(unsigned long) = Constant[1] :
# 2103| r2103_5(unsigned long) = Mul : r2103_3, r2103_4
# 2103| r2103_6(void *) = Call[operator new[]] : func:r2103_1, 0:r2103_5
# 2103| m2103_7(unknown) = ^CallSideEffect : ~m2102_9
# 2103| m2103_8(unknown) = Chi : total:m2102_9, partial:m2103_7
# 2103| m2103_9(unknown) = ^InitializeDynamicAllocation : &:r2103_6
# 2103| r2103_10(DefaultCtorWithDefaultParam *) = Convert : r2103_6
# 2104| r2104_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2104| r2104_2(glval<unsigned long>) = VariableAddress[n] :
# 2104| r2104_3(unsigned long) = Load[n] : &:r2104_2, m2098_6
# 2104| r2104_4(unsigned long) = Constant[4] :
# 2104| r2104_5(unsigned long) = Mul : r2104_3, r2104_4
# 2104| r2104_6(void *) = Call[operator new[]] : func:r2104_1, 0:r2104_5
# 2104| m2104_7(unknown) = ^CallSideEffect : ~m2103_8
# 2104| m2104_8(unknown) = Chi : total:m2103_8, partial:m2104_7
# 2104| m2104_9(unknown) = ^InitializeDynamicAllocation : &:r2104_6
# 2104| r2104_10(int *) = Convert : r2104_6
# 2105| v2105_1(void) = NoOp :
# 2098| v2098_7(void) = ReturnVoid :
# 2098| v2098_8(void) = AliasedUse : ~m2104_8
# 2098| v2098_9(void) = ExitFunction :
perf-regression.cpp:
# 6| void Big::Big()
# 6| Block 0

Просмотреть файл

@ -2095,4 +2095,13 @@ int TransNonExit() {
return x;
}
void newArrayCorrectType(size_t n) {
new int[n]; // No constructor
new(1.0f) int[n]; // Placement new, no constructor
new String[n]; // Constructor
new Overaligned[n]; // Aligned new
new DefaultCtorWithDefaultParam[n];
new int[n] { 0, 1, 2 };
}
// semmle-extractor-options: -std=c++17 --clang

Просмотреть файл

@ -9896,6 +9896,78 @@
| ir.cpp:2095:12:2095:12 | Address | &:r2095_2 |
| ir.cpp:2095:12:2095:12 | Load | m2091_8 |
| ir.cpp:2095:12:2095:12 | StoreValue | r2095_3 |
| ir.cpp:2098:6:2098:24 | ChiPartial | partial:m2098_3 |
| ir.cpp:2098:6:2098:24 | ChiTotal | total:m2098_2 |
| ir.cpp:2098:6:2098:24 | SideEffect | ~m2104_8 |
| ir.cpp:2098:33:2098:33 | Address | &:r2098_5 |
| ir.cpp:2099:3:2099:12 | Address | &:r2099_6 |
| ir.cpp:2099:3:2099:12 | Arg(0) | 0:r2099_5 |
| ir.cpp:2099:3:2099:12 | CallTarget | func:r2099_1 |
| ir.cpp:2099:3:2099:12 | ChiPartial | partial:m2099_7 |
| ir.cpp:2099:3:2099:12 | ChiTotal | total:m2098_4 |
| ir.cpp:2099:3:2099:12 | Right | r2099_4 |
| ir.cpp:2099:3:2099:12 | SideEffect | ~m2098_4 |
| ir.cpp:2099:3:2099:12 | Unary | r2099_6 |
| ir.cpp:2099:11:2099:11 | Address | &:r2099_2 |
| ir.cpp:2099:11:2099:11 | Left | r2099_3 |
| ir.cpp:2099:11:2099:11 | Load | m2098_6 |
| ir.cpp:2100:3:2100:18 | Address | &:r2100_7 |
| ir.cpp:2100:3:2100:18 | Arg(0) | 0:r2100_5 |
| ir.cpp:2100:3:2100:18 | CallTarget | func:r2100_1 |
| ir.cpp:2100:3:2100:18 | ChiPartial | partial:m2100_8 |
| ir.cpp:2100:3:2100:18 | ChiTotal | total:m2099_8 |
| ir.cpp:2100:3:2100:18 | Right | r2100_4 |
| ir.cpp:2100:3:2100:18 | SideEffect | ~m2099_8 |
| ir.cpp:2100:3:2100:18 | Unary | r2100_7 |
| ir.cpp:2100:7:2100:10 | Arg(1) | 1:r2100_6 |
| ir.cpp:2100:17:2100:17 | Address | &:r2100_2 |
| ir.cpp:2100:17:2100:17 | Left | r2100_3 |
| ir.cpp:2100:17:2100:17 | Load | m2098_6 |
| ir.cpp:2101:3:2101:15 | Address | &:r2101_6 |
| ir.cpp:2101:3:2101:15 | Arg(0) | 0:r2101_5 |
| ir.cpp:2101:3:2101:15 | CallTarget | func:r2101_1 |
| ir.cpp:2101:3:2101:15 | ChiPartial | partial:m2101_7 |
| ir.cpp:2101:3:2101:15 | ChiTotal | total:m2100_9 |
| ir.cpp:2101:3:2101:15 | Right | r2101_4 |
| ir.cpp:2101:3:2101:15 | SideEffect | ~m2100_9 |
| ir.cpp:2101:3:2101:15 | Unary | r2101_6 |
| ir.cpp:2101:14:2101:14 | Address | &:r2101_2 |
| ir.cpp:2101:14:2101:14 | Left | r2101_3 |
| ir.cpp:2101:14:2101:14 | Load | m2098_6 |
| ir.cpp:2102:3:2102:20 | Address | &:r2102_7 |
| ir.cpp:2102:3:2102:20 | Arg(0) | 0:r2102_5 |
| ir.cpp:2102:3:2102:20 | CallTarget | func:r2102_1 |
| ir.cpp:2102:3:2102:20 | ChiPartial | partial:m2102_8 |
| ir.cpp:2102:3:2102:20 | ChiTotal | total:m2101_8 |
| ir.cpp:2102:3:2102:20 | Right | r2102_4 |
| ir.cpp:2102:3:2102:20 | SideEffect | ~m2101_8 |
| ir.cpp:2102:3:2102:20 | Unary | r2102_7 |
| ir.cpp:2102:19:2102:19 | Address | &:r2102_2 |
| ir.cpp:2102:19:2102:19 | Left | r2102_3 |
| ir.cpp:2102:19:2102:19 | Load | m2098_6 |
| ir.cpp:2102:21:2102:21 | Arg(1) | 1:r2102_6 |
| ir.cpp:2103:3:2103:36 | Address | &:r2103_6 |
| ir.cpp:2103:3:2103:36 | Arg(0) | 0:r2103_5 |
| ir.cpp:2103:3:2103:36 | CallTarget | func:r2103_1 |
| ir.cpp:2103:3:2103:36 | ChiPartial | partial:m2103_7 |
| ir.cpp:2103:3:2103:36 | ChiTotal | total:m2102_9 |
| ir.cpp:2103:3:2103:36 | Right | r2103_4 |
| ir.cpp:2103:3:2103:36 | SideEffect | ~m2102_9 |
| ir.cpp:2103:3:2103:36 | Unary | r2103_6 |
| ir.cpp:2103:35:2103:35 | Address | &:r2103_2 |
| ir.cpp:2103:35:2103:35 | Left | r2103_3 |
| ir.cpp:2103:35:2103:35 | Load | m2098_6 |
| ir.cpp:2104:3:2104:24 | Address | &:r2104_6 |
| ir.cpp:2104:3:2104:24 | Arg(0) | 0:r2104_5 |
| ir.cpp:2104:3:2104:24 | CallTarget | func:r2104_1 |
| ir.cpp:2104:3:2104:24 | ChiPartial | partial:m2104_7 |
| ir.cpp:2104:3:2104:24 | ChiTotal | total:m2103_8 |
| ir.cpp:2104:3:2104:24 | Right | r2104_4 |
| ir.cpp:2104:3:2104:24 | SideEffect | ~m2103_8 |
| ir.cpp:2104:3:2104:24 | Unary | r2104_6 |
| ir.cpp:2104:11:2104:11 | Address | &:r2104_2 |
| ir.cpp:2104:11:2104:11 | Left | r2104_3 |
| ir.cpp:2104:11:2104:11 | Load | m2098_6 |
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
| perf-regression.cpp:6:3:6:5 | Address | &:r6_5 |
| perf-regression.cpp:6:3:6:5 | Address | &:r6_7 |

Просмотреть файл

@ -11429,6 +11429,74 @@ ir.cpp:
# 2090| v2090_6(void) = AliasedUse : ~m?
# 2090| v2090_7(void) = ExitFunction :
# 2098| void newArrayCorrectType(size_t)
# 2098| Block 0
# 2098| v2098_1(void) = EnterFunction :
# 2098| mu2098_2(unknown) = AliasedDefinition :
# 2098| mu2098_3(unknown) = InitializeNonLocal :
# 2098| r2098_4(glval<unsigned long>) = VariableAddress[n] :
# 2098| mu2098_5(unsigned long) = InitializeParameter[n] : &:r2098_4
# 2099| r2099_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2099| r2099_2(glval<unsigned long>) = VariableAddress[n] :
# 2099| r2099_3(unsigned long) = Load[n] : &:r2099_2, ~m?
# 2099| r2099_4(unsigned long) = Constant[4] :
# 2099| r2099_5(unsigned long) = Mul : r2099_3, r2099_4
# 2099| r2099_6(void *) = Call[operator new[]] : func:r2099_1, 0:r2099_5
# 2099| mu2099_7(unknown) = ^CallSideEffect : ~m?
# 2099| mu2099_8(unknown) = ^InitializeDynamicAllocation : &:r2099_6
# 2099| r2099_9(int *) = Convert : r2099_6
# 2100| r2100_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2100| r2100_2(glval<unsigned long>) = VariableAddress[n] :
# 2100| r2100_3(unsigned long) = Load[n] : &:r2100_2, ~m?
# 2100| r2100_4(unsigned long) = Constant[4] :
# 2100| r2100_5(unsigned long) = Mul : r2100_3, r2100_4
# 2100| r2100_6(float) = Constant[1.0] :
# 2100| r2100_7(void *) = Call[operator new[]] : func:r2100_1, 0:r2100_5, 1:r2100_6
# 2100| mu2100_8(unknown) = ^CallSideEffect : ~m?
# 2100| mu2100_9(unknown) = ^InitializeDynamicAllocation : &:r2100_7
# 2100| r2100_10(int *) = Convert : r2100_7
# 2101| r2101_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2101| r2101_2(glval<unsigned long>) = VariableAddress[n] :
# 2101| r2101_3(unsigned long) = Load[n] : &:r2101_2, ~m?
# 2101| r2101_4(unsigned long) = Constant[8] :
# 2101| r2101_5(unsigned long) = Mul : r2101_3, r2101_4
# 2101| r2101_6(void *) = Call[operator new[]] : func:r2101_1, 0:r2101_5
# 2101| mu2101_7(unknown) = ^CallSideEffect : ~m?
# 2101| mu2101_8(unknown) = ^InitializeDynamicAllocation : &:r2101_6
# 2101| r2101_9(String *) = Convert : r2101_6
# 2102| r2102_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2102| r2102_2(glval<unsigned long>) = VariableAddress[n] :
# 2102| r2102_3(unsigned long) = Load[n] : &:r2102_2, ~m?
# 2102| r2102_4(unsigned long) = Constant[256] :
# 2102| r2102_5(unsigned long) = Mul : r2102_3, r2102_4
# 2102| r2102_6(align_val_t) = Constant[128] :
# 2102| r2102_7(void *) = Call[operator new[]] : func:r2102_1, 0:r2102_5, 1:r2102_6
# 2102| mu2102_8(unknown) = ^CallSideEffect : ~m?
# 2102| mu2102_9(unknown) = ^InitializeDynamicAllocation : &:r2102_7
# 2102| r2102_10(Overaligned *) = Convert : r2102_7
# 2103| r2103_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2103| r2103_2(glval<unsigned long>) = VariableAddress[n] :
# 2103| r2103_3(unsigned long) = Load[n] : &:r2103_2, ~m?
# 2103| r2103_4(unsigned long) = Constant[1] :
# 2103| r2103_5(unsigned long) = Mul : r2103_3, r2103_4
# 2103| r2103_6(void *) = Call[operator new[]] : func:r2103_1, 0:r2103_5
# 2103| mu2103_7(unknown) = ^CallSideEffect : ~m?
# 2103| mu2103_8(unknown) = ^InitializeDynamicAllocation : &:r2103_6
# 2103| r2103_9(DefaultCtorWithDefaultParam *) = Convert : r2103_6
# 2104| r2104_1(glval<unknown>) = FunctionAddress[operator new[]] :
# 2104| r2104_2(glval<unsigned long>) = VariableAddress[n] :
# 2104| r2104_3(unsigned long) = Load[n] : &:r2104_2, ~m?
# 2104| r2104_4(unsigned long) = Constant[4] :
# 2104| r2104_5(unsigned long) = Mul : r2104_3, r2104_4
# 2104| r2104_6(void *) = Call[operator new[]] : func:r2104_1, 0:r2104_5
# 2104| mu2104_7(unknown) = ^CallSideEffect : ~m?
# 2104| mu2104_8(unknown) = ^InitializeDynamicAllocation : &:r2104_6
# 2104| r2104_9(int *) = Convert : r2104_6
# 2105| v2105_1(void) = NoOp :
# 2098| v2098_6(void) = ReturnVoid :
# 2098| v2098_7(void) = AliasedUse : ~m?
# 2098| v2098_8(void) = ExitFunction :
perf-regression.cpp:
# 6| void Big::Big()
# 6| Block 0