diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2021-08-18 16:36:19 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2021-08-24 09:44:31 -0400 |
commit | 675a3e40567e1d0dd6d7e7be3efab74b22731415 (patch) | |
tree | 5d16f2ce64a80674eaa79dcf3ccca2615686e014 /gcc/value-relation.h | |
parent | d8b7282ea27e02f687272cb8ea5f66ca900f1582 (diff) | |
download | gcc-675a3e40567e1d0dd6d7e7be3efab74b22731415.zip gcc-675a3e40567e1d0dd6d7e7be3efab74b22731415.tar.gz gcc-675a3e40567e1d0dd6d7e7be3efab74b22731415.tar.bz2 |
Add transitive operations to the relation oracle.
When registering relations in the oracle, search for other relations which
imply new transitive relations.
gcc/
* value-relation.cc (rr_transitive_table): New.
(relation_transitive): New.
(value_relation::swap): Remove.
(value_relation::apply_transitive): New.
(relation_oracle::relation_oracle): Allocate a new tmp bitmap.
(relation_oracle::register_relation): Call register_transitives.
(relation_oracle::register_transitives): New.
* value-relation.h (relation_oracle): Add new temporary bitmap and
methods.
gcc/testsuite/
* gcc.dg/predict-1.c: Disable evrp.
* gcc.dg/tree-ssa/evrp-trans.c: New.
Diffstat (limited to 'gcc/value-relation.h')
-rw-r--r-- | gcc/value-relation.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/value-relation.h b/gcc/value-relation.h index 1148854..e0e2f82 100644 --- a/gcc/value-relation.h +++ b/gcc/value-relation.h @@ -143,7 +143,7 @@ public: void dump (FILE *f, basic_block bb) const; void dump (FILE *f) const; private: - bitmap m_tmp; + bitmap m_tmp, m_tmp2; bitmap m_relation_set; // Index by ssa-name. True if a relation exists vec <relation_chain_head> m_relations; // Index by BB, list of relations. relation_kind find_relation_block (unsigned bb, const_bitmap b1, @@ -153,7 +153,12 @@ private: relation_kind find_relation_block (int bb, unsigned v1, unsigned v2, relation_chain **obj = NULL); relation_kind find_relation_dom (basic_block bb, unsigned v1, unsigned v2); - void register_relation (basic_block bb, relation_kind k, tree op1, tree op2); + void register_relation (basic_block bb, relation_kind k, tree op1, tree op2, + bool transitive_p = false); + void register_transitives (basic_block, const class value_relation &); + void register_transitives (basic_block, const value_relation &, const_bitmap, + const_bitmap); + }; #endif /* GCC_VALUE_RELATION_H */ |