C++: add CopyValueInstruction for StmtExpr result

This commit is contained in:
Robert Marsh
2019-04-05 11:27:19 -07:00
parent 46f93ff322
commit 8087cb5040
4 changed files with 28 additions and 14 deletions

View File

@@ -16,8 +16,6 @@
| test.cpp:477:20:477:24 | test.cpp:478:8:478:12 | AST only |
| test.cpp:484:18:484:23 | test.cpp:485:8:485:12 | AST only |
| test.cpp:490:18:490:22 | test.cpp:491:8:491:12 | AST only |
| test.cpp:497:26:497:32 | test.cpp:498:9:498:22 | AST only |
| test.cpp:497:26:497:32 | test.cpp:509:8:509:12 | AST only |
| true_upon_entry.cpp:9:11:9:16 | true_upon_entry.cpp:13:8:13:8 | IR only |
| true_upon_entry.cpp:62:11:62:16 | true_upon_entry.cpp:66:8:66:8 | IR only |
| true_upon_entry.cpp:98:11:98:16 | true_upon_entry.cpp:105:8:105:8 | IR only |

View File

@@ -27,6 +27,8 @@
| test.cpp:314:12:314:12 | Load: x | test.cpp:313:22:313:27 | Call: call to source |
| test.cpp:337:14:337:14 | Load: x | test.cpp:353:17:353:22 | Call: call to source |
| test.cpp:366:7:366:7 | Load: x | test.cpp:362:4:362:9 | Call: call to source |
| test.cpp:498:9:498:22 | CopyValue: (statement expression) | test.cpp:497:26:497:32 | InitializeParameter: source1 |
| test.cpp:509:8:509:12 | Load: local | test.cpp:497:26:497:32 | InitializeParameter: source1 |
| true_upon_entry.cpp:13:8:13:8 | Load: x | true_upon_entry.cpp:9:11:9:16 | Call: call to source |
| true_upon_entry.cpp:21:8:21:8 | Load: x | true_upon_entry.cpp:17:11:17:16 | Call: call to source |
| true_upon_entry.cpp:29:8:29:8 | Load: x | true_upon_entry.cpp:27:9:27:14 | Call: call to source |

View File

@@ -4406,15 +4406,17 @@ ir.cpp:
# 999| Block 3
# 999| r3_0(glval<int>) = VariableAddress[w] :
# 999| r3_1(int) = Load : r3_0, mu0_2
# 992| mu3_2(int) = Store : r0_9, r3_1
# 1002| r3_3(glval<int>) = VariableAddress[#return] :
# 1002| r3_4(glval<int>) = VariableAddress[x] :
# 1002| r3_5(int) = Load : r3_4, mu0_2
# 1002| mu3_6(int) = Store : r3_3, r3_5
# 991| r3_7(glval<int>) = VariableAddress[#return] :
# 991| v3_8(void) = ReturnValue : r3_7, mu0_2
# 991| v3_9(void) = UnmodeledUse : mu*
# 991| v3_10(void) = ExitFunction :
# 992| r3_2(int) = CopyValue : r3_1
# 992| mu3_3(int) = Store : r0_9, r3_2
# 1002| r3_4(glval<int>) = VariableAddress[#return] :
# 1002| r3_5(glval<int>) = VariableAddress[x] :
# 1002| r3_6(int) = Load : r3_5, mu0_2
# 1002| r3_7(int) = CopyValue : r3_6
# 1002| mu3_8(int) = Store : r3_4, r3_7
# 991| r3_9(glval<int>) = VariableAddress[#return] :
# 991| v3_10(void) = ReturnValue : r3_9, mu0_2
# 991| v3_11(void) = UnmodeledUse : mu*
# 991| v3_12(void) = ExitFunction :
# 1025| void EmptyStructInit()
# 1025| Block 0