mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
C++: fix for IR CFG problem with return in if
This commit is contained in:
@@ -413,7 +413,23 @@ class TranslatedReturnValueStmt extends TranslatedReturnStmt, TranslatedVariable
|
||||
TranslatedReturnValueStmt() { stmt.hasExpr() and hasReturnValue(stmt.getEnclosingFunction()) }
|
||||
|
||||
final override Instruction getInitializationSuccessor(EdgeKind kind) {
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
if this.hasAnImplicitDestructorCall()
|
||||
then result = this.getChild(1).getFirstInstruction(kind)
|
||||
else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
}
|
||||
|
||||
override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) {
|
||||
result = TranslatedVariableInitialization.super.getChildSuccessorInternal(child, kind)
|
||||
or
|
||||
exists(int id |
|
||||
this.getChild(id) = child and
|
||||
(
|
||||
result = this.getChild(id + 1).getFirstInstruction(kind)
|
||||
or
|
||||
not exists(this.getChild(id + 1)) and
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
final override TranslatedElement getChildInternal(int id) {
|
||||
@@ -429,6 +445,8 @@ class TranslatedReturnValueStmt extends TranslatedReturnStmt, TranslatedVariable
|
||||
final override IRVariable getIRVariable() {
|
||||
result = this.getEnclosingFunction().getReturnVariable()
|
||||
}
|
||||
|
||||
override predicate handlesDestructorsExplicitly() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -449,7 +467,10 @@ class TranslatedReturnVoidExpressionStmt extends TranslatedReturnStmt {
|
||||
}
|
||||
|
||||
override Instruction getALastInstructionInternal() {
|
||||
result = this.getInstruction(OnlyInstructionTag())
|
||||
if this.hasAnImplicitDestructorCall()
|
||||
then
|
||||
result = this.getChildInternal(max(int id | exists(this.getChild(id)))).getALastInstruction()
|
||||
else result = this.getInstruction(OnlyInstructionTag())
|
||||
}
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) {
|
||||
@@ -460,16 +481,34 @@ class TranslatedReturnVoidExpressionStmt extends TranslatedReturnStmt {
|
||||
|
||||
override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) {
|
||||
tag = OnlyInstructionTag() and
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
if this.hasAnImplicitDestructorCall()
|
||||
then result = this.getChildInternal(1).getFirstInstruction(kind)
|
||||
else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
}
|
||||
|
||||
override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) {
|
||||
child = this.getExpr() and
|
||||
result = this.getInstruction(OnlyInstructionTag()) and
|
||||
kind instanceof GotoEdge
|
||||
or
|
||||
exists(int id |
|
||||
child = this.getChild(id) and
|
||||
id >= this.getFirstDestructorCallIndex() and
|
||||
result = this.getChild(id + 1).getFirstInstruction(kind)
|
||||
)
|
||||
or
|
||||
exists(int id |
|
||||
child = this.getChild(id) and
|
||||
id >= this.getFirstDestructorCallIndex() and
|
||||
exists(this.getChild(id)) and
|
||||
not exists(this.getChild(id + 1)) and
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
)
|
||||
}
|
||||
|
||||
private TranslatedExpr getExpr() { result = getTranslatedExpr(stmt.getExpr()) }
|
||||
|
||||
override predicate handlesDestructorsExplicitly() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -489,7 +528,9 @@ class TranslatedReturnVoidStmt extends TranslatedReturnStmt {
|
||||
}
|
||||
|
||||
override Instruction getALastInstructionInternal() {
|
||||
result = this.getInstruction(OnlyInstructionTag())
|
||||
if this.hasAnImplicitDestructorCall()
|
||||
then result = this.getChild(max(int id | exists(this.getChild(id)))).getALastInstruction()
|
||||
else result = this.getInstruction(OnlyInstructionTag())
|
||||
}
|
||||
|
||||
override predicate hasInstruction(Opcode opcode, InstructionTag tag, CppType resultType) {
|
||||
@@ -500,10 +541,24 @@ class TranslatedReturnVoidStmt extends TranslatedReturnStmt {
|
||||
|
||||
override Instruction getInstructionSuccessorInternal(InstructionTag tag, EdgeKind kind) {
|
||||
tag = OnlyInstructionTag() and
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
if this.hasAnImplicitDestructorCall()
|
||||
then result = this.getChild(0).getFirstInstruction(kind)
|
||||
else result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
}
|
||||
|
||||
override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) { none() }
|
||||
override Instruction getChildSuccessorInternal(TranslatedElement child, EdgeKind kind) {
|
||||
exists(int id |
|
||||
this.getChild(id) = child and
|
||||
(
|
||||
result = this.getChild(id + 1).getFirstInstruction(kind)
|
||||
or
|
||||
not exists(this.getChild(id + 1)) and
|
||||
result = this.getEnclosingFunction().getReturnSuccessorInstruction(kind)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override predicate handlesDestructorsExplicitly() { any() }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4316,8 +4316,6 @@ ir.cpp:
|
||||
# 365| ValueCategory = prvalue
|
||||
# 361| getStmt(2): [LabelStmt] label ...:
|
||||
# 367| getStmt(1): [ReturnStmt] return ...
|
||||
# 369| [TopLevelFunction] void VoidFunc()
|
||||
# 369| <params>:
|
||||
# 370| [TopLevelFunction] int Add(int, int)
|
||||
# 370| <params>:
|
||||
# 370| getParameter(0): [Parameter] x
|
||||
@@ -17001,41 +16999,99 @@ ir.cpp:
|
||||
# 2234| Type = [Class] Bool
|
||||
# 2234| ValueCategory = lvalue
|
||||
# 2236| getStmt(2): [ReturnStmt] return ...
|
||||
# 2238| [TopLevelFunction] void IfReturnDestructors(bool)
|
||||
# 2238| [TopLevelFunction] void VoidFunc()
|
||||
# 2238| <params>:
|
||||
# 2238| getParameter(0): [Parameter] b
|
||||
# 2238| Type = [BoolType] bool
|
||||
# 2238| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2239| getStmt(0): [DeclStmt] declaration
|
||||
# 2239| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s
|
||||
# 2239| Type = [Struct] String
|
||||
# 2239| getVariable().getInitializer(): [Initializer] initializer for s
|
||||
# 2239| getExpr(): [ConstructorCall] call to String
|
||||
# 2239| Type = [VoidType] void
|
||||
# 2239| ValueCategory = prvalue
|
||||
# 2240| getStmt(1): [IfStmt] if (...) ...
|
||||
# 2240| getCondition(): [VariableAccess] b
|
||||
# 2240| Type = [BoolType] bool
|
||||
# 2240| ValueCategory = prvalue(load)
|
||||
# 2240| getThen(): [BlockStmt] { ... }
|
||||
# 2241| getStmt(0): [ReturnStmt] return ...
|
||||
# 2244| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2244| Type = [VoidType] void
|
||||
# 2244| ValueCategory = prvalue
|
||||
# 2244| getQualifier(): [VariableAccess] s
|
||||
# 2244| Type = [Struct] String
|
||||
# 2244| ValueCategory = lvalue
|
||||
# 2243| getStmt(2): [ExprStmt] ExprStmt
|
||||
# 2243| getExpr(): [VariableAccess] s
|
||||
# 2243| Type = [Struct] String
|
||||
# 2243| ValueCategory = lvalue
|
||||
# 2244| getStmt(3): [ReturnStmt] return ...
|
||||
# 2244| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2244| Type = [VoidType] void
|
||||
# 2244| ValueCategory = prvalue
|
||||
# 2244| getQualifier(): [VariableAccess] s
|
||||
# 2244| Type = [Struct] String
|
||||
# 2244| ValueCategory = lvalue
|
||||
# 2238| getStmt(0): [ReturnStmt] return ...
|
||||
# 2240| [TopLevelFunction] void IfReturnDestructors(bool)
|
||||
# 2240| <params>:
|
||||
# 2240| getParameter(0): [Parameter] b
|
||||
# 2240| Type = [BoolType] bool
|
||||
# 2240| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2241| getStmt(0): [DeclStmt] declaration
|
||||
# 2241| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s
|
||||
# 2241| Type = [Struct] String
|
||||
# 2241| getVariable().getInitializer(): [Initializer] initializer for s
|
||||
# 2241| getExpr(): [ConstructorCall] call to String
|
||||
# 2241| Type = [VoidType] void
|
||||
# 2241| ValueCategory = prvalue
|
||||
# 2242| getStmt(1): [IfStmt] if (...) ...
|
||||
# 2242| getCondition(): [VariableAccess] b
|
||||
# 2242| Type = [BoolType] bool
|
||||
# 2242| ValueCategory = prvalue(load)
|
||||
# 2242| getThen(): [BlockStmt] { ... }
|
||||
# 2243| getStmt(0): [ReturnStmt] return ...
|
||||
# 2249| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2249| Type = [VoidType] void
|
||||
# 2249| ValueCategory = prvalue
|
||||
# 2249| getQualifier(): [VariableAccess] s
|
||||
# 2249| Type = [Struct] String
|
||||
# 2249| ValueCategory = lvalue
|
||||
# 2245| getStmt(2): [IfStmt] if (...) ...
|
||||
# 2245| getCondition(): [VariableAccess] b
|
||||
# 2245| Type = [BoolType] bool
|
||||
# 2245| ValueCategory = prvalue(load)
|
||||
# 2245| getThen(): [BlockStmt] { ... }
|
||||
# 2246| getStmt(0): [ReturnStmt] return ...
|
||||
# 2246| getExpr(): [FunctionCall] call to VoidFunc
|
||||
# 2246| Type = [VoidType] void
|
||||
# 2246| ValueCategory = prvalue
|
||||
# 2249| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2249| Type = [VoidType] void
|
||||
# 2249| ValueCategory = prvalue
|
||||
# 2249| getQualifier(): [VariableAccess] s
|
||||
# 2249| Type = [Struct] String
|
||||
# 2249| ValueCategory = lvalue
|
||||
# 2248| getStmt(3): [ExprStmt] ExprStmt
|
||||
# 2248| getExpr(): [VariableAccess] s
|
||||
# 2248| Type = [Struct] String
|
||||
# 2248| ValueCategory = lvalue
|
||||
# 2249| getStmt(4): [ReturnStmt] return ...
|
||||
# 2249| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2249| Type = [VoidType] void
|
||||
# 2249| ValueCategory = prvalue
|
||||
# 2249| getQualifier(): [VariableAccess] s
|
||||
# 2249| Type = [Struct] String
|
||||
# 2249| ValueCategory = lvalue
|
||||
# 2251| [TopLevelFunction] int IfReturnDestructors3(bool)
|
||||
# 2251| <params>:
|
||||
# 2251| getParameter(0): [Parameter] b
|
||||
# 2251| Type = [BoolType] bool
|
||||
# 2251| getEntryPoint(): [BlockStmt] { ... }
|
||||
# 2252| getStmt(0): [DeclStmt] declaration
|
||||
# 2252| getDeclarationEntry(0): [VariableDeclarationEntry] definition of s
|
||||
# 2252| Type = [Struct] String
|
||||
# 2252| getVariable().getInitializer(): [Initializer] initializer for s
|
||||
# 2252| getExpr(): [ConstructorCall] call to String
|
||||
# 2252| Type = [VoidType] void
|
||||
# 2252| ValueCategory = prvalue
|
||||
# 2253| getStmt(1): [IfStmt] if (...) ...
|
||||
# 2253| getCondition(): [VariableAccess] b
|
||||
# 2253| Type = [BoolType] bool
|
||||
# 2253| ValueCategory = prvalue(load)
|
||||
# 2253| getThen(): [BlockStmt] { ... }
|
||||
# 2254| getStmt(0): [ReturnStmt] return ...
|
||||
# 2254| getExpr(): [Literal] 1
|
||||
# 2254| Type = [IntType] int
|
||||
# 2254| Value = [Literal] 1
|
||||
# 2254| ValueCategory = prvalue
|
||||
# 2257| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2257| Type = [VoidType] void
|
||||
# 2257| ValueCategory = prvalue
|
||||
# 2257| getQualifier(): [VariableAccess] s
|
||||
# 2257| Type = [Struct] String
|
||||
# 2257| ValueCategory = lvalue
|
||||
# 2256| getStmt(2): [ReturnStmt] return ...
|
||||
# 2256| getExpr(): [Literal] 0
|
||||
# 2256| Type = [IntType] int
|
||||
# 2256| Value = [Literal] 0
|
||||
# 2256| ValueCategory = prvalue
|
||||
# 2257| getImplicitDestructorCall(0): [DestructorCall] call to ~String
|
||||
# 2257| Type = [VoidType] void
|
||||
# 2257| ValueCategory = prvalue
|
||||
# 2257| getQualifier(): [VariableAccess] s
|
||||
# 2257| Type = [Struct] String
|
||||
# 2257| ValueCategory = lvalue
|
||||
perf-regression.cpp:
|
||||
# 4| [CopyAssignmentOperator] Big& Big::operator=(Big const&)
|
||||
# 4| <params>:
|
||||
|
||||
@@ -13492,56 +13492,144 @@ ir.cpp:
|
||||
# 2223| v2223_8(void) = AliasedUse : ~m2234_13
|
||||
# 2223| v2223_9(void) = ExitFunction :
|
||||
|
||||
# 2238| void IfReturnDestructors(bool)
|
||||
# 2238| void VoidFunc()
|
||||
# 2238| Block 0
|
||||
# 2238| v2238_1(void) = EnterFunction :
|
||||
# 2238| m2238_2(unknown) = AliasedDefinition :
|
||||
# 2238| m2238_3(unknown) = InitializeNonLocal :
|
||||
# 2238| m2238_4(unknown) = Chi : total:m2238_2, partial:m2238_3
|
||||
# 2238| r2238_5(glval<bool>) = VariableAddress[b] :
|
||||
# 2238| m2238_6(bool) = InitializeParameter[b] : &:r2238_5
|
||||
# 2239| r2239_1(glval<String>) = VariableAddress[s] :
|
||||
# 2239| m2239_2(String) = Uninitialized[s] : &:r2239_1
|
||||
# 2239| r2239_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2239| v2239_4(void) = Call[String] : func:r2239_3, this:r2239_1
|
||||
# 2239| m2239_5(unknown) = ^CallSideEffect : ~m2238_4
|
||||
# 2239| m2239_6(unknown) = Chi : total:m2238_4, partial:m2239_5
|
||||
# 2239| m2239_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2239_1
|
||||
# 2239| m2239_8(String) = Chi : total:m2239_2, partial:m2239_7
|
||||
# 2240| r2240_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2240| r2240_2(bool) = Load[b] : &:r2240_1, m2238_6
|
||||
# 2240| v2240_3(void) = ConditionalBranch : r2240_2
|
||||
#-----| False -> Block 2
|
||||
#-----| True -> Block 1
|
||||
# 2238| v2238_1(void) = EnterFunction :
|
||||
# 2238| m2238_2(unknown) = AliasedDefinition :
|
||||
# 2238| m2238_3(unknown) = InitializeNonLocal :
|
||||
# 2238| m2238_4(unknown) = Chi : total:m2238_2, partial:m2238_3
|
||||
# 2238| v2238_5(void) = NoOp :
|
||||
# 2238| v2238_6(void) = ReturnVoid :
|
||||
# 2238| v2238_7(void) = AliasedUse : m2238_3
|
||||
# 2238| v2238_8(void) = ExitFunction :
|
||||
|
||||
# 2241| Block 1
|
||||
# 2241| v2241_1(void) = NoOp :
|
||||
# 2244| r2244_1(glval<String>) = VariableAddress[s] :
|
||||
# 2244| r2244_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2244| v2244_3(void) = Call[~String] : func:r2244_2, this:r2244_1
|
||||
# 2244| m2244_4(unknown) = ^CallSideEffect : ~m2239_6
|
||||
# 2244| m2244_5(unknown) = Chi : total:m2239_6, partial:m2244_4
|
||||
# 2244| v2244_6(void) = ^IndirectReadSideEffect[-1] : &:r2244_1, m2239_8
|
||||
# 2244| m2244_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_1
|
||||
# 2244| m2244_8(String) = Chi : total:m2239_8, partial:m2244_7
|
||||
#-----| Goto -> Block 2
|
||||
# 2240| void IfReturnDestructors(bool)
|
||||
# 2240| Block 0
|
||||
# 2240| v2240_1(void) = EnterFunction :
|
||||
# 2240| m2240_2(unknown) = AliasedDefinition :
|
||||
# 2240| m2240_3(unknown) = InitializeNonLocal :
|
||||
# 2240| m2240_4(unknown) = Chi : total:m2240_2, partial:m2240_3
|
||||
# 2240| r2240_5(glval<bool>) = VariableAddress[b] :
|
||||
# 2240| m2240_6(bool) = InitializeParameter[b] : &:r2240_5
|
||||
# 2241| r2241_1(glval<String>) = VariableAddress[s] :
|
||||
# 2241| m2241_2(String) = Uninitialized[s] : &:r2241_1
|
||||
# 2241| r2241_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2241| v2241_4(void) = Call[String] : func:r2241_3, this:r2241_1
|
||||
# 2241| m2241_5(unknown) = ^CallSideEffect : ~m2240_4
|
||||
# 2241| m2241_6(unknown) = Chi : total:m2240_4, partial:m2241_5
|
||||
# 2241| m2241_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2241_1
|
||||
# 2241| m2241_8(String) = Chi : total:m2241_2, partial:m2241_7
|
||||
# 2242| r2242_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2242| r2242_2(bool) = Load[b] : &:r2242_1, m2240_6
|
||||
# 2242| v2242_3(void) = ConditionalBranch : r2242_2
|
||||
#-----| False -> Block 4
|
||||
#-----| True -> Block 3
|
||||
|
||||
# 2243| Block 2
|
||||
# 2243| m2243_1(String) = Phi : from 0:m2239_8, from 1:m2244_8
|
||||
# 2243| m2243_2(unknown) = Phi : from 0:~m2239_6, from 1:~m2244_5
|
||||
# 2243| r2243_3(glval<String>) = VariableAddress[s] :
|
||||
# 2244| v2244_9(void) = NoOp :
|
||||
# 2244| r2244_10(glval<String>) = VariableAddress[s] :
|
||||
# 2244| r2244_11(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2244| v2244_12(void) = Call[~String] : func:r2244_11, this:r2244_10
|
||||
# 2244| m2244_13(unknown) = ^CallSideEffect : ~m2243_2
|
||||
# 2244| m2244_14(unknown) = Chi : total:m2243_2, partial:m2244_13
|
||||
# 2244| v2244_15(void) = ^IndirectReadSideEffect[-1] : &:r2244_10, m2243_1
|
||||
# 2244| m2244_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_10
|
||||
# 2244| m2244_17(String) = Chi : total:m2243_1, partial:m2244_16
|
||||
# 2238| v2238_7(void) = ReturnVoid :
|
||||
# 2238| v2238_8(void) = AliasedUse : ~m2244_14
|
||||
# 2238| v2238_9(void) = ExitFunction :
|
||||
# 2240| Block 1
|
||||
# 2240| m2240_7(unknown) = Phi : from 3:~m2249_5, from 6:~m2249_14
|
||||
# 2240| v2240_8(void) = ReturnVoid :
|
||||
# 2240| v2240_9(void) = AliasedUse : ~m2240_7
|
||||
# 2240| v2240_10(void) = ExitFunction :
|
||||
|
||||
# 2243| Block 3
|
||||
# 2243| v2243_1(void) = NoOp :
|
||||
# 2249| r2249_1(glval<String>) = VariableAddress[s] :
|
||||
# 2249| r2249_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2249| v2249_3(void) = Call[~String] : func:r2249_2, this:r2249_1
|
||||
# 2249| m2249_4(unknown) = ^CallSideEffect : ~m2241_6
|
||||
# 2249| m2249_5(unknown) = Chi : total:m2241_6, partial:m2249_4
|
||||
# 2249| v2249_6(void) = ^IndirectReadSideEffect[-1] : &:r2249_1, m2241_8
|
||||
# 2249| m2249_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2249_1
|
||||
# 2249| m2249_8(String) = Chi : total:m2241_8, partial:m2249_7
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2245| Block 4
|
||||
# 2245| r2245_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2245| r2245_2(bool) = Load[b] : &:r2245_1, m2240_6
|
||||
# 2245| v2245_3(void) = ConditionalBranch : r2245_2
|
||||
#-----| False -> Block 6
|
||||
#-----| True -> Block 5
|
||||
#-----| True -> Block 5
|
||||
|
||||
# 2246| Block 5
|
||||
# 2246| r2246_6(glval<unknown>) = FunctionAddress[VoidFunc] :
|
||||
# 2246| v2246_7(void) = Call[VoidFunc] : func:r2246_1, func:r2246_6
|
||||
# 2246| m2246_8(unknown) = ^CallSideEffect : ~m2241_6
|
||||
# 2246| m2246_9(unknown) = Chi : total:m2241_6, partial:m2246_3, partial:m2246_8
|
||||
# 2246| v2246_5(void) = NoOp :
|
||||
|
||||
# 2246| Block 5
|
||||
|
||||
# 2248| Block 6
|
||||
# 2248| r2248_1(glval<String>) = VariableAddress[s] :
|
||||
# 2249| v2249_9(void) = NoOp :
|
||||
# 2249| r2249_10(glval<String>) = VariableAddress[s] :
|
||||
# 2249| r2249_11(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2249| v2249_12(void) = Call[~String] : func:r2249_11, this:r2249_10
|
||||
# 2249| m2249_13(unknown) = ^CallSideEffect : ~m2241_6
|
||||
# 2249| m2249_14(unknown) = Chi : total:m2241_6, partial:m2249_13
|
||||
# 2249| v2249_15(void) = ^IndirectReadSideEffect[-1] : &:r2249_10, m2241_8
|
||||
# 2249| m2249_16(String) = ^IndirectMayWriteSideEffect[-1] : &:r2249_10
|
||||
# 2249| m2249_17(String) = Chi : total:m2241_8, partial:m2249_16
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2251| int IfReturnDestructors3(bool)
|
||||
# 2251| Block 0
|
||||
# 2251| v2251_1(void) = EnterFunction :
|
||||
# 2251| m2251_2(unknown) = AliasedDefinition :
|
||||
# 2251| m2251_3(unknown) = InitializeNonLocal :
|
||||
# 2251| m2251_4(unknown) = Chi : total:m2251_2, partial:m2251_3
|
||||
# 2251| r2251_5(glval<bool>) = VariableAddress[b] :
|
||||
# 2251| m2251_6(bool) = InitializeParameter[b] : &:r2251_5
|
||||
# 2252| r2252_1(glval<String>) = VariableAddress[s] :
|
||||
# 2252| m2252_2(String) = Uninitialized[s] : &:r2252_1
|
||||
# 2252| r2252_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2252| v2252_4(void) = Call[String] : func:r2252_3, this:r2252_1
|
||||
# 2252| m2252_5(unknown) = ^CallSideEffect : ~m2251_4
|
||||
# 2252| m2252_6(unknown) = Chi : total:m2251_4, partial:m2252_5
|
||||
# 2252| m2252_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2252_1
|
||||
# 2252| m2252_8(String) = Chi : total:m2252_2, partial:m2252_7
|
||||
# 2253| r2253_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2253| r2253_2(bool) = Load[b] : &:r2253_1, m2251_6
|
||||
# 2253| v2253_3(void) = ConditionalBranch : r2253_2
|
||||
#-----| False -> Block 3
|
||||
#-----| True -> Block 2
|
||||
|
||||
# 2251| Block 1
|
||||
# 2251| m2251_7(unknown) = Phi : from 2:~m2257_5, from 3:~m2257_13
|
||||
# 2251| m2251_8(int) = Phi : from 2:m2254_3, from 3:m2256_3
|
||||
# 2251| r2251_9(glval<int>) = VariableAddress[#return] :
|
||||
# 2251| v2251_10(void) = ReturnValue : &:r2251_9, m2251_8
|
||||
# 2251| v2251_11(void) = AliasedUse : ~m2251_7
|
||||
# 2251| v2251_12(void) = ExitFunction :
|
||||
|
||||
# 2254| Block 2
|
||||
# 2254| r2254_1(glval<int>) = VariableAddress[#return] :
|
||||
# 2254| r2254_2(int) = Constant[1] :
|
||||
# 2254| m2254_3(int) = Store[#return] : &:r2254_1, r2254_2
|
||||
# 2257| r2257_1(glval<String>) = VariableAddress[s] :
|
||||
# 2257| r2257_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2257| v2257_3(void) = Call[~String] : func:r2257_2, this:r2257_1
|
||||
# 2257| m2257_4(unknown) = ^CallSideEffect : ~m2252_6
|
||||
# 2257| m2257_5(unknown) = Chi : total:m2252_6, partial:m2257_4
|
||||
# 2257| v2257_6(void) = ^IndirectReadSideEffect[-1] : &:r2257_1, m2252_8
|
||||
# 2257| m2257_7(String) = ^IndirectMayWriteSideEffect[-1] : &:r2257_1
|
||||
# 2257| m2257_8(String) = Chi : total:m2252_8, partial:m2257_7
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2256| Block 3
|
||||
# 2256| r2256_1(glval<int>) = VariableAddress[#return] :
|
||||
# 2256| r2256_2(int) = Constant[0] :
|
||||
# 2256| m2256_3(int) = Store[#return] : &:r2256_1, r2256_2
|
||||
# 2257| r2257_9(glval<String>) = VariableAddress[s] :
|
||||
# 2257| r2257_10(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2257| v2257_11(void) = Call[~String] : func:r2257_10, this:r2257_9
|
||||
# 2257| m2257_12(unknown) = ^CallSideEffect : ~m2252_6
|
||||
# 2257| m2257_13(unknown) = Chi : total:m2252_6, partial:m2257_12
|
||||
# 2257| v2257_14(void) = ^IndirectReadSideEffect[-1] : &:r2257_9, m2252_8
|
||||
# 2257| m2257_15(String) = ^IndirectMayWriteSideEffect[-1] : &:r2257_9
|
||||
# 2257| m2257_16(String) = Chi : total:m2252_8, partial:m2257_15
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
perf-regression.cpp:
|
||||
# 6| void Big::Big()
|
||||
|
||||
@@ -7,6 +7,7 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2138:21:2138:21 | Chi: x | Instruction 'Chi: x' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2246:9:2246:26 | NoOp: return ... | Instruction 'NoOp: return ...' has no successors in function '$@'. | ir.cpp:2240:6:2240:24 | void IfReturnDestructors(bool) | void IfReturnDestructors(bool) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -7,6 +7,7 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2138:21:2138:21 | Chi: x | Instruction 'Chi: x' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2246:9:2246:26 | NoOp: return ... | Instruction 'NoOp: return ...' has no successors in function '$@'. | ir.cpp:2240:6:2240:24 | void IfReturnDestructors(bool) | void IfReturnDestructors(bool) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -2235,12 +2235,25 @@ void WhileLoopDestructors(bool b) {
|
||||
}
|
||||
}
|
||||
|
||||
void VoidFunc() {}
|
||||
|
||||
void IfReturnDestructors(bool b) {
|
||||
String s;
|
||||
if(b) {
|
||||
return;
|
||||
}
|
||||
if(b) {
|
||||
return VoidFunc();
|
||||
}
|
||||
s;
|
||||
}
|
||||
|
||||
int IfReturnDestructors3(bool b) {
|
||||
String s;
|
||||
if(b) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// semmle-extractor-options: -std=c++20 --clang
|
||||
|
||||
@@ -11042,46 +11042,102 @@
|
||||
| ir.cpp:2234:9:2234:9 | SideEffect | m2232_20 |
|
||||
| ir.cpp:2234:9:2234:9 | SideEffect | ~m2232_17 |
|
||||
| ir.cpp:2234:9:2234:9 | SideEffect | ~m2232_17 |
|
||||
| ir.cpp:2238:6:2238:24 | ChiPartial | partial:m2238_3 |
|
||||
| ir.cpp:2238:6:2238:24 | ChiTotal | total:m2238_2 |
|
||||
| ir.cpp:2238:6:2238:24 | SideEffect | ~m2244_14 |
|
||||
| ir.cpp:2238:31:2238:31 | Address | &:r2238_5 |
|
||||
| ir.cpp:2239:12:2239:12 | Address | &:r2239_1 |
|
||||
| ir.cpp:2239:12:2239:12 | Address | &:r2239_1 |
|
||||
| ir.cpp:2239:12:2239:12 | Arg(this) | this:r2239_1 |
|
||||
| ir.cpp:2239:12:2239:12 | CallTarget | func:r2239_3 |
|
||||
| ir.cpp:2239:12:2239:12 | ChiPartial | partial:m2239_5 |
|
||||
| ir.cpp:2239:12:2239:12 | ChiPartial | partial:m2239_7 |
|
||||
| ir.cpp:2239:12:2239:12 | ChiTotal | total:m2238_4 |
|
||||
| ir.cpp:2239:12:2239:12 | ChiTotal | total:m2239_2 |
|
||||
| ir.cpp:2239:12:2239:12 | SideEffect | ~m2238_4 |
|
||||
| ir.cpp:2240:8:2240:8 | Address | &:r2240_1 |
|
||||
| ir.cpp:2240:8:2240:8 | Condition | r2240_2 |
|
||||
| ir.cpp:2240:8:2240:8 | Load | m2238_6 |
|
||||
| ir.cpp:2243:5:2243:5 | Phi | from 0:m2239_8 |
|
||||
| ir.cpp:2243:5:2243:5 | Phi | from 0:~m2239_6 |
|
||||
| ir.cpp:2243:5:2243:5 | Phi | from 1:m2244_8 |
|
||||
| ir.cpp:2243:5:2243:5 | Phi | from 1:~m2244_5 |
|
||||
| ir.cpp:2244:1:2244:1 | Address | &:r2244_1 |
|
||||
| ir.cpp:2244:1:2244:1 | Address | &:r2244_1 |
|
||||
| ir.cpp:2244:1:2244:1 | Address | &:r2244_10 |
|
||||
| ir.cpp:2244:1:2244:1 | Address | &:r2244_10 |
|
||||
| ir.cpp:2244:1:2244:1 | Arg(this) | this:r2244_1 |
|
||||
| ir.cpp:2244:1:2244:1 | Arg(this) | this:r2244_10 |
|
||||
| ir.cpp:2244:1:2244:1 | CallTarget | func:r2244_2 |
|
||||
| ir.cpp:2244:1:2244:1 | CallTarget | func:r2244_11 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiPartial | partial:m2244_4 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiPartial | partial:m2244_7 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiPartial | partial:m2244_13 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiPartial | partial:m2244_16 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiTotal | total:m2239_6 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiTotal | total:m2239_8 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiTotal | total:m2243_1 |
|
||||
| ir.cpp:2244:1:2244:1 | ChiTotal | total:m2243_2 |
|
||||
| ir.cpp:2244:1:2244:1 | SideEffect | m2239_8 |
|
||||
| ir.cpp:2244:1:2244:1 | SideEffect | m2243_1 |
|
||||
| ir.cpp:2244:1:2244:1 | SideEffect | ~m2239_6 |
|
||||
| ir.cpp:2244:1:2244:1 | SideEffect | ~m2243_2 |
|
||||
| ir.cpp:2238:6:2238:13 | ChiPartial | partial:m2238_3 |
|
||||
| ir.cpp:2238:6:2238:13 | ChiTotal | total:m2238_2 |
|
||||
| ir.cpp:2238:6:2238:13 | SideEffect | m2238_3 |
|
||||
| ir.cpp:2240:6:2240:24 | ChiPartial | partial:m2240_3 |
|
||||
| ir.cpp:2240:6:2240:24 | ChiTotal | total:m2240_2 |
|
||||
| ir.cpp:2240:6:2240:24 | Phi | from 3:~m2249_5 |
|
||||
| ir.cpp:2240:6:2240:24 | Phi | from 6:~m2249_14 |
|
||||
| ir.cpp:2240:6:2240:24 | SideEffect | ~m2240_7 |
|
||||
| ir.cpp:2240:31:2240:31 | Address | &:r2240_5 |
|
||||
| ir.cpp:2241:12:2241:12 | Address | &:r2241_1 |
|
||||
| ir.cpp:2241:12:2241:12 | Address | &:r2241_1 |
|
||||
| ir.cpp:2241:12:2241:12 | Arg(this) | this:r2241_1 |
|
||||
| ir.cpp:2241:12:2241:12 | CallTarget | func:r2241_3 |
|
||||
| ir.cpp:2241:12:2241:12 | ChiPartial | partial:m2241_5 |
|
||||
| ir.cpp:2241:12:2241:12 | ChiPartial | partial:m2241_7 |
|
||||
| ir.cpp:2241:12:2241:12 | ChiTotal | total:m2240_4 |
|
||||
| ir.cpp:2241:12:2241:12 | ChiTotal | total:m2241_2 |
|
||||
| ir.cpp:2241:12:2241:12 | SideEffect | ~m2240_4 |
|
||||
| ir.cpp:2242:8:2242:8 | Address | &:r2242_1 |
|
||||
| ir.cpp:2242:8:2242:8 | Condition | r2242_2 |
|
||||
| ir.cpp:2242:8:2242:8 | Load | m2240_6 |
|
||||
| ir.cpp:2245:8:2245:8 | Address | &:r2245_1 |
|
||||
| ir.cpp:2245:8:2245:8 | Condition | r2245_2 |
|
||||
| ir.cpp:2245:8:2245:8 | Load | m2240_6 |
|
||||
| ir.cpp:2246:16:2246:23 | CallTarget | func:r2246_1 |
|
||||
| ir.cpp:2246:16:2246:23 | CallTarget | func:r2246_6 |
|
||||
| ir.cpp:2246:16:2246:23 | ChiPartial | partial:m2246_3 |
|
||||
| ir.cpp:2246:16:2246:23 | ChiPartial | partial:m2246_8 |
|
||||
| ir.cpp:2246:16:2246:23 | ChiTotal | total:m2241_6 |
|
||||
| ir.cpp:2246:16:2246:23 | SideEffect | ~m2241_6 |
|
||||
| ir.cpp:2249:1:2249:1 | Address | &:r2249_1 |
|
||||
| ir.cpp:2249:1:2249:1 | Address | &:r2249_1 |
|
||||
| ir.cpp:2249:1:2249:1 | Address | &:r2249_10 |
|
||||
| ir.cpp:2249:1:2249:1 | Address | &:r2249_10 |
|
||||
| ir.cpp:2249:1:2249:1 | Arg(this) | this:r2249_1 |
|
||||
| ir.cpp:2249:1:2249:1 | Arg(this) | this:r2249_10 |
|
||||
| ir.cpp:2249:1:2249:1 | CallTarget | func:r2249_2 |
|
||||
| ir.cpp:2249:1:2249:1 | CallTarget | func:r2249_11 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiPartial | partial:m2249_4 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiPartial | partial:m2249_7 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiPartial | partial:m2249_13 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiPartial | partial:m2249_16 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiTotal | total:m2241_6 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiTotal | total:m2241_6 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiTotal | total:m2241_8 |
|
||||
| ir.cpp:2249:1:2249:1 | ChiTotal | total:m2241_8 |
|
||||
| ir.cpp:2249:1:2249:1 | SideEffect | m2241_8 |
|
||||
| ir.cpp:2249:1:2249:1 | SideEffect | m2241_8 |
|
||||
| ir.cpp:2249:1:2249:1 | SideEffect | ~m2241_6 |
|
||||
| ir.cpp:2249:1:2249:1 | SideEffect | ~m2241_6 |
|
||||
| ir.cpp:2251:5:2251:24 | Address | &:r2251_9 |
|
||||
| ir.cpp:2251:5:2251:24 | ChiPartial | partial:m2251_3 |
|
||||
| ir.cpp:2251:5:2251:24 | ChiTotal | total:m2251_2 |
|
||||
| ir.cpp:2251:5:2251:24 | Load | m2251_8 |
|
||||
| ir.cpp:2251:5:2251:24 | Phi | from 2:m2254_3 |
|
||||
| ir.cpp:2251:5:2251:24 | Phi | from 2:~m2257_5 |
|
||||
| ir.cpp:2251:5:2251:24 | Phi | from 3:m2256_3 |
|
||||
| ir.cpp:2251:5:2251:24 | Phi | from 3:~m2257_13 |
|
||||
| ir.cpp:2251:5:2251:24 | SideEffect | ~m2251_7 |
|
||||
| ir.cpp:2251:31:2251:31 | Address | &:r2251_5 |
|
||||
| ir.cpp:2252:12:2252:12 | Address | &:r2252_1 |
|
||||
| ir.cpp:2252:12:2252:12 | Address | &:r2252_1 |
|
||||
| ir.cpp:2252:12:2252:12 | Arg(this) | this:r2252_1 |
|
||||
| ir.cpp:2252:12:2252:12 | CallTarget | func:r2252_3 |
|
||||
| ir.cpp:2252:12:2252:12 | ChiPartial | partial:m2252_5 |
|
||||
| ir.cpp:2252:12:2252:12 | ChiPartial | partial:m2252_7 |
|
||||
| ir.cpp:2252:12:2252:12 | ChiTotal | total:m2251_4 |
|
||||
| ir.cpp:2252:12:2252:12 | ChiTotal | total:m2252_2 |
|
||||
| ir.cpp:2252:12:2252:12 | SideEffect | ~m2251_4 |
|
||||
| ir.cpp:2253:8:2253:8 | Address | &:r2253_1 |
|
||||
| ir.cpp:2253:8:2253:8 | Condition | r2253_2 |
|
||||
| ir.cpp:2253:8:2253:8 | Load | m2251_6 |
|
||||
| ir.cpp:2254:9:2254:17 | Address | &:r2254_1 |
|
||||
| ir.cpp:2254:16:2254:16 | StoreValue | r2254_2 |
|
||||
| ir.cpp:2256:5:2256:13 | Address | &:r2256_1 |
|
||||
| ir.cpp:2256:12:2256:12 | StoreValue | r2256_2 |
|
||||
| ir.cpp:2257:1:2257:1 | Address | &:r2257_1 |
|
||||
| ir.cpp:2257:1:2257:1 | Address | &:r2257_1 |
|
||||
| ir.cpp:2257:1:2257:1 | Address | &:r2257_9 |
|
||||
| ir.cpp:2257:1:2257:1 | Address | &:r2257_9 |
|
||||
| ir.cpp:2257:1:2257:1 | Arg(this) | this:r2257_1 |
|
||||
| ir.cpp:2257:1:2257:1 | Arg(this) | this:r2257_9 |
|
||||
| ir.cpp:2257:1:2257:1 | CallTarget | func:r2257_2 |
|
||||
| ir.cpp:2257:1:2257:1 | CallTarget | func:r2257_10 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiPartial | partial:m2257_4 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiPartial | partial:m2257_7 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiPartial | partial:m2257_12 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiPartial | partial:m2257_15 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiTotal | total:m2252_6 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiTotal | total:m2252_6 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiTotal | total:m2252_8 |
|
||||
| ir.cpp:2257:1:2257:1 | ChiTotal | total:m2252_8 |
|
||||
| ir.cpp:2257:1:2257:1 | SideEffect | m2252_8 |
|
||||
| ir.cpp:2257:1:2257:1 | SideEffect | m2252_8 |
|
||||
| ir.cpp:2257:1:2257:1 | SideEffect | ~m2252_6 |
|
||||
| ir.cpp:2257:1:2257:1 | SideEffect | ~m2252_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 |
|
||||
|
||||
@@ -10,6 +10,7 @@ instructionWithoutSuccessor
|
||||
| ir.cpp:2140:39:2140:39 | IndirectMayWriteSideEffect: call to ClassWithDestructor | Instruction 'IndirectMayWriteSideEffect: call to ClassWithDestructor' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2140:42:2140:76 | Constant: initialization_with_destructor_bool | Instruction 'Constant: initialization_with_destructor_bool' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2141:9:2141:9 | IndirectMayWriteSideEffect: x | Instruction 'IndirectMayWriteSideEffect: x' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2246:9:2246:26 | NoOp: return ... | Instruction 'NoOp: return ...' has no successors in function '$@'. | ir.cpp:2240:6:2240:24 | void IfReturnDestructors(bool) | void IfReturnDestructors(bool) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -12685,47 +12685,137 @@ ir.cpp:
|
||||
# 2223| v2223_7(void) = AliasedUse : ~m?
|
||||
# 2223| v2223_8(void) = ExitFunction :
|
||||
|
||||
# 2238| void IfReturnDestructors(bool)
|
||||
# 2238| void VoidFunc()
|
||||
# 2238| Block 0
|
||||
# 2238| v2238_1(void) = EnterFunction :
|
||||
# 2238| mu2238_2(unknown) = AliasedDefinition :
|
||||
# 2238| mu2238_3(unknown) = InitializeNonLocal :
|
||||
# 2238| r2238_4(glval<bool>) = VariableAddress[b] :
|
||||
# 2238| mu2238_5(bool) = InitializeParameter[b] : &:r2238_4
|
||||
# 2239| r2239_1(glval<String>) = VariableAddress[s] :
|
||||
# 2239| mu2239_2(String) = Uninitialized[s] : &:r2239_1
|
||||
# 2239| r2239_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2239| v2239_4(void) = Call[String] : func:r2239_3, this:r2239_1
|
||||
# 2239| mu2239_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2239| mu2239_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2239_1
|
||||
# 2240| r2240_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2240| r2240_2(bool) = Load[b] : &:r2240_1, ~m?
|
||||
# 2240| v2240_3(void) = ConditionalBranch : r2240_2
|
||||
#-----| False -> Block 2
|
||||
#-----| True -> Block 1
|
||||
# 2238| v2238_1(void) = EnterFunction :
|
||||
# 2238| mu2238_2(unknown) = AliasedDefinition :
|
||||
# 2238| mu2238_3(unknown) = InitializeNonLocal :
|
||||
# 2238| v2238_4(void) = NoOp :
|
||||
# 2238| v2238_5(void) = ReturnVoid :
|
||||
# 2238| v2238_6(void) = AliasedUse : ~m?
|
||||
# 2238| v2238_7(void) = ExitFunction :
|
||||
|
||||
# 2241| Block 1
|
||||
# 2241| v2241_1(void) = NoOp :
|
||||
# 2244| r2244_1(glval<String>) = VariableAddress[s] :
|
||||
# 2244| r2244_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2244| v2244_3(void) = Call[~String] : func:r2244_2, this:r2244_1
|
||||
# 2244| mu2244_4(unknown) = ^CallSideEffect : ~m?
|
||||
# 2244| v2244_5(void) = ^IndirectReadSideEffect[-1] : &:r2244_1, ~m?
|
||||
# 2244| mu2244_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_1
|
||||
#-----| Goto -> Block 2
|
||||
# 2240| void IfReturnDestructors(bool)
|
||||
# 2240| Block 0
|
||||
# 2240| v2240_1(void) = EnterFunction :
|
||||
# 2240| mu2240_2(unknown) = AliasedDefinition :
|
||||
# 2240| mu2240_3(unknown) = InitializeNonLocal :
|
||||
# 2240| r2240_4(glval<bool>) = VariableAddress[b] :
|
||||
# 2240| mu2240_5(bool) = InitializeParameter[b] : &:r2240_4
|
||||
# 2241| r2241_1(glval<String>) = VariableAddress[s] :
|
||||
# 2241| mu2241_2(String) = Uninitialized[s] : &:r2241_1
|
||||
# 2241| r2241_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2241| v2241_4(void) = Call[String] : func:r2241_3, this:r2241_1
|
||||
# 2241| mu2241_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2241| mu2241_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2241_1
|
||||
# 2242| r2242_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2242| r2242_2(bool) = Load[b] : &:r2242_1, ~m?
|
||||
# 2242| v2242_3(void) = ConditionalBranch : r2242_2
|
||||
#-----| False -> Block 5
|
||||
#-----| True -> Block 4
|
||||
|
||||
# 2243| Block 2
|
||||
# 2243| r2243_1(glval<String>) = VariableAddress[s] :
|
||||
# 2244| v2244_7(void) = NoOp :
|
||||
# 2244| r2244_8(glval<String>) = VariableAddress[s] :
|
||||
# 2244| r2244_9(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2244| v2244_10(void) = Call[~String] : func:r2244_9, this:r2244_8
|
||||
# 2244| mu2244_11(unknown) = ^CallSideEffect : ~m?
|
||||
# 2244| v2244_12(void) = ^IndirectReadSideEffect[-1] : &:r2244_8, ~m?
|
||||
# 2244| mu2244_13(String) = ^IndirectMayWriteSideEffect[-1] : &:r2244_8
|
||||
# 2238| v2238_6(void) = ReturnVoid :
|
||||
# 2238| v2238_7(void) = AliasedUse : ~m?
|
||||
# 2238| v2238_8(void) = ExitFunction :
|
||||
# 2240| Block 1
|
||||
# 2240| v2240_6(void) = ReturnVoid :
|
||||
# 2240| v2240_7(void) = AliasedUse : ~m?
|
||||
# 2240| v2240_8(void) = ExitFunction :
|
||||
|
||||
# 2246| Block 6
|
||||
# 2246| r2246_5(glval<unknown>) = FunctionAddress[VoidFunc] :
|
||||
# 2246| v2246_6(void) = Call[VoidFunc] : func:r2246_1, func:r2246_5
|
||||
# 2246| mu2246_7(unknown) = ^CallSideEffect : ~m?
|
||||
# 2246| v2246_8(void) = NoOp :
|
||||
|
||||
# 2246| Block 6
|
||||
|
||||
# 2243| Block 4
|
||||
# 2243| v2243_1(void) = NoOp :
|
||||
# 2249| r2249_7(glval<String>) = VariableAddress[s] :
|
||||
# 2249| r2249_8(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2249| v2249_9(void) = Call[~String] : func:r2249_8, this:r2249_7
|
||||
# 2249| mu2249_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 2249| v2249_11(void) = ^IndirectReadSideEffect[-1] : &:r2249_7, ~m?
|
||||
# 2249| mu2249_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2249_7
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2245| Block 5
|
||||
# 2245| r2245_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2245| r2245_2(bool) = Load[b] : &:r2245_1, ~m?
|
||||
# 2245| v2245_3(void) = ConditionalBranch : r2245_2
|
||||
#-----| False -> Block 8
|
||||
#-----| True -> Block 6
|
||||
#-----| True -> Block 6
|
||||
|
||||
# 2249| Block 7
|
||||
# 2249| r2249_1(glval<String>) = VariableAddress[s] :
|
||||
# 2249| r2249_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2249| v2249_3(void) = Call[~String] : func:r2249_14, func:r2249_2, this:r2249_1, this:r2249_13
|
||||
# 2249| mu2249_4(unknown) = ^CallSideEffect : ~m?
|
||||
# 2249| v2249_5(void) = ^IndirectReadSideEffect[-1] : &:r2249_1, &:r2249_13, ~m?
|
||||
# 2249| mu2249_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2249_1, &:r2249_13
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2249| Block 7
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2248| Block 8
|
||||
# 2248| r2248_1(glval<String>) = VariableAddress[s] :
|
||||
# 2249| v2249_19(void) = NoOp :
|
||||
# 2249| r2249_20(glval<String>) = VariableAddress[s] :
|
||||
# 2249| r2249_21(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2249| v2249_22(void) = Call[~String] : func:r2249_21, this:r2249_20
|
||||
# 2249| mu2249_23(unknown) = ^CallSideEffect : ~m?
|
||||
# 2249| v2249_24(void) = ^IndirectReadSideEffect[-1] : &:r2249_20, ~m?
|
||||
# 2249| mu2249_25(String) = ^IndirectMayWriteSideEffect[-1] : &:r2249_20
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2251| int IfReturnDestructors3(bool)
|
||||
# 2251| Block 0
|
||||
# 2251| v2251_1(void) = EnterFunction :
|
||||
# 2251| mu2251_2(unknown) = AliasedDefinition :
|
||||
# 2251| mu2251_3(unknown) = InitializeNonLocal :
|
||||
# 2251| r2251_4(glval<bool>) = VariableAddress[b] :
|
||||
# 2251| mu2251_5(bool) = InitializeParameter[b] : &:r2251_4
|
||||
# 2252| r2252_1(glval<String>) = VariableAddress[s] :
|
||||
# 2252| mu2252_2(String) = Uninitialized[s] : &:r2252_1
|
||||
# 2252| r2252_3(glval<unknown>) = FunctionAddress[String] :
|
||||
# 2252| v2252_4(void) = Call[String] : func:r2252_3, this:r2252_1
|
||||
# 2252| mu2252_5(unknown) = ^CallSideEffect : ~m?
|
||||
# 2252| mu2252_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2252_1
|
||||
# 2253| r2253_1(glval<bool>) = VariableAddress[b] :
|
||||
# 2253| r2253_2(bool) = Load[b] : &:r2253_1, ~m?
|
||||
# 2253| v2253_3(void) = ConditionalBranch : r2253_2
|
||||
#-----| False -> Block 3
|
||||
#-----| True -> Block 2
|
||||
|
||||
# 2251| Block 1
|
||||
# 2251| r2251_6(glval<int>) = VariableAddress[#return] :
|
||||
# 2251| v2251_7(void) = ReturnValue : &:r2251_6, ~m?
|
||||
# 2251| v2251_8(void) = AliasedUse : ~m?
|
||||
# 2251| v2251_9(void) = ExitFunction :
|
||||
|
||||
# 2254| Block 2
|
||||
# 2254| r2254_1(glval<int>) = VariableAddress[#return] :
|
||||
# 2254| r2254_2(int) = Constant[1] :
|
||||
# 2254| mu2254_3(int) = Store[#return] : &:r2254_1, r2254_2
|
||||
# 2257| r2257_1(glval<String>) = VariableAddress[s] :
|
||||
# 2257| r2257_2(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2257| v2257_3(void) = Call[~String] : func:r2257_2, this:r2257_1
|
||||
# 2257| mu2257_4(unknown) = ^CallSideEffect : ~m?
|
||||
# 2257| v2257_5(void) = ^IndirectReadSideEffect[-1] : &:r2257_1, ~m?
|
||||
# 2257| mu2257_6(String) = ^IndirectMayWriteSideEffect[-1] : &:r2257_1
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
# 2256| Block 3
|
||||
# 2256| r2256_1(glval<int>) = VariableAddress[#return] :
|
||||
# 2256| r2256_2(int) = Constant[0] :
|
||||
# 2256| mu2256_3(int) = Store[#return] : &:r2256_1, r2256_2
|
||||
# 2257| r2257_7(glval<String>) = VariableAddress[s] :
|
||||
# 2257| r2257_8(glval<unknown>) = FunctionAddress[~String] :
|
||||
# 2257| v2257_9(void) = Call[~String] : func:r2257_8, this:r2257_7
|
||||
# 2257| mu2257_10(unknown) = ^CallSideEffect : ~m?
|
||||
# 2257| v2257_11(void) = ^IndirectReadSideEffect[-1] : &:r2257_7, ~m?
|
||||
# 2257| mu2257_12(String) = ^IndirectMayWriteSideEffect[-1] : &:r2257_7
|
||||
#-----| Goto -> Block 1
|
||||
|
||||
perf-regression.cpp:
|
||||
# 6| void Big::Big()
|
||||
|
||||
@@ -7,6 +7,7 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2138:21:2138:21 | IndirectMayWriteSideEffect: x | Instruction 'IndirectMayWriteSideEffect: x' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2246:9:2246:26 | NoOp: return ... | Instruction 'NoOp: return ...' has no successors in function '$@'. | ir.cpp:2240:6:2240:24 | void IfReturnDestructors(bool) | void IfReturnDestructors(bool) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
@@ -7,6 +7,7 @@ duplicateChiOperand
|
||||
sideEffectWithoutPrimary
|
||||
instructionWithoutSuccessor
|
||||
| ir.cpp:2138:21:2138:21 | IndirectMayWriteSideEffect: x | Instruction 'IndirectMayWriteSideEffect: x' has no successors in function '$@'. | ir.cpp:2136:6:2136:35 | void initialization_with_destructor(bool, char) | void initialization_with_destructor(bool, char) |
|
||||
| ir.cpp:2246:9:2246:26 | NoOp: return ... | Instruction 'NoOp: return ...' has no successors in function '$@'. | ir.cpp:2240:6:2240:24 | void IfReturnDestructors(bool) | void IfReturnDestructors(bool) |
|
||||
ambiguousSuccessors
|
||||
unexplainedLoop
|
||||
unnecessaryPhiInstruction
|
||||
|
||||
Reference in New Issue
Block a user