diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2020-03-10 10:49:19 +0100 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2020-03-10 12:07:43 +0100 |
commit | 7b0df61d25e5d156aea41fd0ddc318e904db7894 (patch) | |
tree | 36d11e472491463d72e2b932a80899e6f9168703 /gcc | |
parent | 5a9f1033226f921d9852b3a209706eccc0076fe7 (diff) | |
download | gcc-7b0df61d25e5d156aea41fd0ddc318e904db7894.zip gcc-7b0df61d25e5d156aea41fd0ddc318e904db7894.tar.gz gcc-7b0df61d25e5d156aea41fd0ddc318e904db7894.tar.bz2 |
Add code to trace compute_logical_operands.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-range-gori.cc | 28 | ||||
-rw-r--r-- | gcc/gimple-range-gori.h | 9 |
2 files changed, 34 insertions, 3 deletions
diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc index b90b075..d6710ff 100644 --- a/gcc/gimple-range-gori.cc +++ b/gcc/gimple-range-gori.cc @@ -1271,3 +1271,31 @@ trace_gori_compute::compute_operand_range (irange &r, gimple *stmt, bool res = super::compute_operand_range (r, stmt, lhs, name, name_range); return trailer (idx, "compute_operand_range", res, name, r); } + +bool +trace_gori_compute::compute_logical_operands (irange &r, gimple *stmt, + const irange &lhs, + tree name, + const irange *name_range) +{ + unsigned idx = ++trace_count; + if (dumping (idx)) + { + fprintf (dump_file, "compute_logical_operands ("); + print_generic_expr (dump_file, name, TDF_SLIM); + fprintf (dump_file, ") with range "); + if (name_range) + name_range->dump (dump_file); + else + fputs ("NULL", dump_file); + fprintf (dump_file, " at stmt:\n"); + dumping (idx, true); + fputs (" ", dump_file); + lhs.dump (dump_file); + fprintf (dump_file, " <==> "); + print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM); + indent += bump; + } + bool res = super::compute_logical_operands (r, stmt, lhs, name, name_range); + return trailer (idx, "compute_logical_operands", res, name, r); +} diff --git a/gcc/gimple-range-gori.h b/gcc/gimple-range-gori.h index eca9571..7f4b1a5 100644 --- a/gcc/gimple-range-gori.h +++ b/gcc/gimple-range-gori.h @@ -157,6 +157,9 @@ protected: tree name, const irange *name_range = NULL); bool has_edge_range_p (edge e, tree name); + virtual bool compute_logical_operands (irange &r, gimple *stmt, + const irange &lhs, + tree name, const irange *name_range); gori_map m_gori_map; private: void get_tree_range (irange &, tree expr, tree name, @@ -180,9 +183,6 @@ private: (irange &r, gimple *stmt, const irange &lhs, tree name, const irange *name_range); - bool compute_logical_operands (irange &r, gimple *stmt, - const irange &lhs, - tree name, const irange *name_range); bool logical_combine (irange &r, enum tree_code code, const irange &lhs, const irange &op1_true, @@ -206,6 +206,9 @@ protected: const irange &lhs, tree name, const irange *name_range = NULL); + virtual bool compute_logical_operands (irange &r, gimple *stmt, + const irange &lhs, + tree name, const irange *name_range); private: typedef gori_compute super; // Inherited from class for easy changing. protected: |