From cc7c5c9ffb0cd9d2961ada9faa8e9f270b9e04b4 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Thu, 18 Mar 2010 16:39:32 -0400 Subject: optimizer diagnostics: identify taken branch of optimizations * elaborate.cxx (const_folder::visit_if_statement, visit_binary_expression, visit_ternary_expression): Print constant value in -vvv diagnostics. --- elaborate.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'elaborate.cxx') diff --git a/elaborate.cxx b/elaborate.cxx index ba156b2b..db8abfbb 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -3120,7 +3120,7 @@ const_folder::visit_if_statement (if_statement* s) else { if (session.verbose>2) - clog << "Collapsing constant if-statement " << *s->tok << endl; + clog << "Collapsing constant-" << cond->value << " if-statement " << *s->tok << endl; relaxed_p = false; statement* n = cond->value ? s->thenblock : s->elseblock; @@ -3271,7 +3271,7 @@ const_folder::visit_binary_expression (binary_expression* e) } if (session.verbose>2) - clog << "Collapsing constant binary operator " << *e->tok << endl; + clog << "Collapsing constant-" << value << " binary operator " << *e->tok << endl; relaxed_p = false; literal_number* n = new literal_number(value); @@ -3520,7 +3520,7 @@ const_folder::visit_ternary_expression (ternary_expression* e) else { if (session.verbose>2) - clog << "Collapsing constant ternary " << *e->tok << endl; + clog << "Collapsing constant-" << cond->value << " ternary " << *e->tok << endl; relaxed_p = false; expression* n = cond->value ? e->truevalue : e->falsevalue; -- cgit