From 450dd8b3ab7c4c2a83ed891347f980913c5dde3f Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Mon, 8 Apr 2019 12:59:24 +0000 Subject: [PATCH] The fma_forest, fma_root_node and func_fma_steering classes lack a copy constructor. The fma_forest, fma_root_node and func_fma_steering classes lack a copy constructor. However, they contain pointers to allocated memory so this omission can be regarded as poor style. We don't need to copy such objects, so declare the copy constructor private to inhibit accidental copying. 2019-04-08 Andrea Corallo PR target/83033 * config/aarch64/cortex-a57-fma-steering.c (fma_forest): Prohibit copy construction. (fma_root_node): Likewise. (func_fma_steering): Likewise. From-SVN: r270207 --- gcc/ChangeLog | 8 ++++++++ gcc/config/aarch64/cortex-a57-fma-steering.c | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5339017821f..51fc0bf9d50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2019-04-08 Andrea Corallo + + PR target/83033 + * config/aarch64/cortex-a57-fma-steering.c (fma_forest): Prohibit copy + construction. + (fma_root_node): Likewise. + (func_fma_steering): Likewise. + 2019-04-08 Jakub Jelinek PR rtl-optimization/89865 diff --git a/gcc/config/aarch64/cortex-a57-fma-steering.c b/gcc/config/aarch64/cortex-a57-fma-steering.c index f2da03a4f43..eb91662b688 100644 --- a/gcc/config/aarch64/cortex-a57-fma-steering.c +++ b/gcc/config/aarch64/cortex-a57-fma-steering.c @@ -114,6 +114,9 @@ public: void dispatch (); private: + /* Prohibit copy construction. */ + fma_forest (const fma_forest &); + /* The list of roots that form this forest. */ std::list *m_roots; @@ -148,6 +151,10 @@ public: void rename (fma_forest *); void dump_info (fma_forest *); +private: + /* Prohibit copy construction. */ + fma_node (const fma_node &); + protected: /* Root node that lead to this node. */ fma_root_node *m_root; @@ -203,6 +210,9 @@ public: void execute_fma_steering (); private: + /* Prohibit copy construction. */ + func_fma_steering (const func_fma_steering &); + void dfs (void (*) (fma_forest *), void (*) (fma_forest *, fma_root_node *), void (*) (fma_forest *, fma_node *), bool); void analyze (); -- 2.30.2