summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2010-03-18 16:39:32 -0400
committerFrank Ch. Eigler <fche@elastic.org>2010-03-18 16:39:32 -0400
commitcc7c5c9ffb0cd9d2961ada9faa8e9f270b9e04b4 (patch)
tree6c56fb650a79e7ead0c8073e3c2880567f4708bb
parent8496536f6ede3308e0d1cc6f1219e76ca262f1c0 (diff)
downloadsystemtap-steved-cc7c5c9ffb0cd9d2961ada9faa8e9f270b9e04b4.tar.gz
systemtap-steved-cc7c5c9ffb0cd9d2961ada9faa8e9f270b9e04b4.tar.xz
systemtap-steved-cc7c5c9ffb0cd9d2961ada9faa8e9f270b9e04b4.zip
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.
-rw-r--r--elaborate.cxx6
1 files changed, 3 insertions, 3 deletions
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;