Commit 450dd8b3 by Andrea Corallo Committed by Richard Earnshaw

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  <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
parent 0d0f212a
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> 2019-04-08 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/89865 PR rtl-optimization/89865
......
...@@ -114,6 +114,9 @@ public: ...@@ -114,6 +114,9 @@ public:
void dispatch (); void dispatch ();
private: private:
/* Prohibit copy construction. */
fma_forest (const fma_forest &);
/* The list of roots that form this forest. */ /* The list of roots that form this forest. */
std::list<fma_root_node *> *m_roots; std::list<fma_root_node *> *m_roots;
...@@ -148,6 +151,10 @@ public: ...@@ -148,6 +151,10 @@ public:
void rename (fma_forest *); void rename (fma_forest *);
void dump_info (fma_forest *); void dump_info (fma_forest *);
private:
/* Prohibit copy construction. */
fma_node (const fma_node &);
protected: protected:
/* Root node that lead to this node. */ /* Root node that lead to this node. */
fma_root_node *m_root; fma_root_node *m_root;
...@@ -203,6 +210,9 @@ public: ...@@ -203,6 +210,9 @@ public:
void execute_fma_steering (); void execute_fma_steering ();
private: private:
/* Prohibit copy construction. */
func_fma_steering (const func_fma_steering &);
void dfs (void (*) (fma_forest *), void (*) (fma_forest *, fma_root_node *), void dfs (void (*) (fma_forest *), void (*) (fma_forest *, fma_root_node *),
void (*) (fma_forest *, fma_node *), bool); void (*) (fma_forest *, fma_node *), bool);
void analyze (); void analyze ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment