]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
The fma_forest, fma_root_node and func_fma_steering classes lack a copy constructor.
authorAndrea Corallo <andrea.corallo@arm.com>
Mon, 8 Apr 2019 12:59:24 +0000 (12:59 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Mon, 8 Apr 2019 12:59:24 +0000 (12:59 +0000)
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  <andrea.corallo@arm.com>

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
gcc/config/aarch64/cortex-a57-fma-steering.c

index 5339017821f294fb37b4420192f6eed0b671f767..51fc0bf9d5063d2b402b089aaeb3f8e60806b244 100644 (file)
@@ -1,3 +1,11 @@
+2019-04-08  Andrea Corallo  <andrea.corallo@arm.com>
+
+       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  <jakub@redhat.com>
 
        PR rtl-optimization/89865
index f2da03a4f43ac877bf42789e06fec8961cd54cf6..eb91662b688cb5013f156aaf84ee7cc91d18c00f 100644 (file)
@@ -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<fma_root_node *> *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 ();