From ed70fefd3499fb7a03606f82f080ec227407f62b Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Thu, 30 Nov 2023 09:55:52 -0800 Subject: [PATCH] streamlining CSE analysis of modifying record fields --- src/script_opt/Reduce.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/script_opt/Reduce.cc b/src/script_opt/Reduce.cc index 0c5b63d73d..731fea8a78 100644 --- a/src/script_opt/Reduce.cc +++ b/src/script_opt/Reduce.cc @@ -935,19 +935,7 @@ TraversalCode CSE_ValidityChecker::PreExpr(const Expr* e) { auto lhs_aggr_id = lhs->AsNameExpr()->Id(); auto lhs_field = e->AsFieldLHSAssignExpr()->Field(); - if ( CheckID(lhs_aggr_id, true) || CheckAggrMod(lhs->GetType()) ) { - is_valid = false; - return TC_ABORTALL; - } - - // ### do we need this? - if ( lhs_field == field && same_type(lhs_aggr_id->GetType(), field_type) ) { - ASSERT(0); - // Potential assignment to the same field as for - // our expression of interest. Even if the - // identifier involved is not one we have our eye - // on, due to aggregate aliasing this could be - // altering the value of our expression, so bail. + if ( CheckID(lhs_aggr_id, true) || (lhs_field == field && same_type(lhs_aggr_id->GetType(), field_type)) ) { is_valid = false; return TC_ABORTALL; }