C++: fix IR control flow for cast in placement new

This commit is contained in:
Robert Marsh
2020-05-28 16:53:21 -07:00
parent 56d0762380
commit f82c97b84a
7 changed files with 11 additions and 32 deletions

View File

@@ -1698,7 +1698,7 @@ class TranslatedAllocatorCall extends TTranslatedAllocatorCall, TranslatedDirect
else
if index = 1 and expr.hasAlignedAllocation()
then result = getTranslatedExpr(expr.getAlignmentArgument())
else result = getTranslatedExpr(expr.getAllocatorCall().getArgument(index))
else result = getTranslatedExpr(expr.getAllocatorCall().getArgument(index).getFullyConverted())
}
}

View File

@@ -10,10 +10,7 @@ missingOperandType
duplicateChiOperand
sideEffectWithoutPrimary
instructionWithoutSuccessor
| ir.cpp:1322:8:1322:8 | Convert: (void *)... |
ambiguousSuccessors
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:3:1322:13 | Call: new |
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:8:1322:8 | Convert: (void *)... |
unexplainedLoop
unnecessaryPhiInstruction
memoryOperandDefinitionIsUnmodeled

View File

@@ -10,10 +10,7 @@ missingOperandType
duplicateChiOperand
sideEffectWithoutPrimary
instructionWithoutSuccessor
| ir.cpp:1322:8:1322:8 | Convert: (void *)... |
ambiguousSuccessors
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:3:1322:13 | Call: new |
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:8:1322:8 | Convert: (void *)... |
unexplainedLoop
unnecessaryPhiInstruction
memoryOperandDefinitionIsUnmodeled

View File

@@ -10,10 +10,7 @@ missingOperandType
duplicateChiOperand
sideEffectWithoutPrimary
instructionWithoutSuccessor
| ir.cpp:1322:8:1322:8 | Convert: (void *)... |
ambiguousSuccessors
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:3:1322:13 | Call: new |
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:8:1322:8 | Convert: (void *)... |
unexplainedLoop
unnecessaryPhiInstruction
memoryOperandDefinitionIsUnmodeled

View File

@@ -7382,22 +7382,16 @@ ir.cpp:
# 1322| r1322_2(unsigned long) = Constant[4] :
# 1322| r1322_3(glval<int *>) = VariableAddress[p] :
# 1322| r1322_4(int *) = Load : &:r1322_3, ~m?
#-----| Goto -> Block 1
#-----| Goto -> Block 2
# 1322| Block 1
# 1322| r1322_5(void *) = Convert : r1322_4
# 1322| Block 2
# 1322| r1322_6(void *) = Call : func:r1322_1, 0:r1322_2, 1:r1322_4
# 1322| mu1322_7(unknown) = ^CallSideEffect : ~m?
# 1322| mu1322_8(unknown) = ^InitializeDynamicAllocation : &:r1322_6
# 1322| r1322_9(int *) = Convert : r1322_6
# 1323| v1323_1(void) = NoOp :
# 1320| v1320_8(void) = ReturnIndirection[p] : &:r1320_6, ~m?
# 1320| v1320_9(void) = ReturnVoid :
# 1320| v1320_10(void) = AliasedUse : ~m?
# 1320| v1320_11(void) = ExitFunction :
# 1322| r1322_5(void *) = Convert : r1322_4
# 1322| r1322_6(void *) = Call : func:r1322_1, 0:r1322_2, 1:r1322_5
# 1322| mu1322_7(unknown) = ^CallSideEffect : ~m?
# 1322| mu1322_8(unknown) = ^InitializeDynamicAllocation : &:r1322_6
# 1322| r1322_9(int *) = Convert : r1322_6
# 1323| v1323_1(void) = NoOp :
# 1320| v1320_8(void) = ReturnIndirection[p] : &:r1320_6, ~m?
# 1320| v1320_9(void) = ReturnVoid :
# 1320| v1320_10(void) = AliasedUse : ~m?
# 1320| v1320_11(void) = ExitFunction :
perf-regression.cpp:
# 6| void Big::Big()

View File

@@ -10,10 +10,7 @@ missingOperandType
duplicateChiOperand
sideEffectWithoutPrimary
instructionWithoutSuccessor
| ir.cpp:1322:8:1322:8 | Convert: (void *)... |
ambiguousSuccessors
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:3:1322:13 | Call: new |
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:8:1322:8 | Convert: (void *)... |
unexplainedLoop
unnecessaryPhiInstruction
memoryOperandDefinitionIsUnmodeled

View File

@@ -10,10 +10,7 @@ missingOperandType
duplicateChiOperand
sideEffectWithoutPrimary
instructionWithoutSuccessor
| ir.cpp:1322:8:1322:8 | Convert: (void *)... |
ambiguousSuccessors
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:3:1322:13 | Call: new |
| ir.cpp:1322:8:1322:8 | Load: p | Goto | 2 | ir.cpp:1322:8:1322:8 | Convert: (void *)... |
unexplainedLoop
unnecessaryPhiInstruction
memoryOperandDefinitionIsUnmodeled