Discussion:
Valgrind: r16282 - /branches/VALGRIND_JIT_HACKS/memcheck/mc_translate.c
(too old to reply)
s***@valgrind.org
2017-03-23 09:16:52 UTC
Permalink
Raw Message
Author: iraisr
Date: Thu Mar 23 09:16:52 2017
New Revision: 16282

Log:
Make phi_nodes non-optional for IfThenElse.

Modified:
branches/VALGRIND_JIT_HACKS/memcheck/mc_translate.c

Modified: branches/VALGRIND_JIT_HACKS/memcheck/mc_translate.c
==============================================================================
--- branches/VALGRIND_JIT_HACKS/memcheck/mc_translate.c (original)
+++ branches/VALGRIND_JIT_HACKS/memcheck/mc_translate.c Thu Mar 23 09:16:52 2017
@@ -6295,17 +6295,14 @@
initMCEnv(else_leg, &else_mce, mce);
instrument_IRStmtVec(else_leg, 0, &else_mce);

- IRPhiVec* phi_nodes_out = NULL;
- if (phi_nodes_in != NULL) {
- phi_nodes_out = emptyIRPhiVec();
- for (UInt i = 0; i < phi_nodes_in->phis_used; i++) {
- IRPhi* phi_in = phi_nodes_in->phis[i];
- IRPhi* phi_shadow = mkIRPhi(findShadowTmp(mce, phi_in->dst),
- findShadowTmp(&then_mce, phi_in->srcThen),
- findShadowTmp(&else_mce, phi_in->srcElse));
- phi(category, mce, phi_nodes_out, phi_shadow);
- phi('C', mce, phi_nodes_out, phi_in);
- }
+ IRPhiVec* phi_nodes_out = emptyIRPhiVec();
+ for (UInt i = 0; i < phi_nodes_in->phis_used; i++) {
+ IRPhi* phi_in = phi_nodes_in->phis[i];
+ IRPhi* phi_shadow = mkIRPhi(findShadowTmp(mce, phi_in->dst),
+ findShadowTmp(&then_mce, phi_in->srcThen),
+ findShadowTmp(&else_mce, phi_in->srcElse));
+ phi(category, mce, phi_nodes_out, phi_shadow);
+ phi('C', mce, phi_nodes_out, phi_in);
}

stmt(category, mce, IRStmt_IfThenElse(cond, then_mce.stmts, else_mce.stmts,
Loading...