public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/pheeck/heads/insert-api)] fixed 2 bugs related to calls, added virt destructors
@ 2023-07-06 13:34 Filip Kastl
0 siblings, 0 replies; only message in thread
From: Filip Kastl @ 2023-07-06 13:34 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:cf7319b6eceb2099d09d742d8b62aa16f97c75bd
commit cf7319b6eceb2099d09d742d8b62aa16f97c75bd
Author: Filip Kastl <filip.kastl@gmail.com>
Date: Thu Jul 6 15:34:31 2023 +0200
fixed 2 bugs related to calls, added virt destructors
Diff:
---
gcc/insert-gimple-ssa.cc | 8 ++++++--
gcc/insert-gimple-ssa.h | 18 ++++++++++++++++++
gcc/tree-into-ssa.cc | 1 -
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/gcc/insert-gimple-ssa.cc b/gcc/insert-gimple-ssa.cc
index fda0049738b..890fe43c5c5 100644
--- a/gcc/insert-gimple-ssa.cc
+++ b/gcc/insert-gimple-ssa.cc
@@ -575,8 +575,12 @@ hack_ssa_builder::tuple_alloc (enum tree_code code, unsigned num_ops)
hack_tuple_fn *
hack_ssa_builder::tuple_alloc_fn (tree fn, unsigned num_ops)
{
- size_t size = sizeof (hack_tuple_fn) +
- (num_ops - 1) * sizeof (struct hstmt_with_lhs *);
+ size_t size;
+ if (num_ops > 0)
+ size = sizeof (hack_tuple_fn) +
+ (num_ops - 1) * sizeof (struct hstmt_with_lhs *);
+ else
+ size = sizeof (hack_tuple_fn);
hack_tuple_fn *result = XNEWVAR (struct hack_tuple_fn, size);
result->num_ops = num_ops;
diff --git a/gcc/insert-gimple-ssa.h b/gcc/insert-gimple-ssa.h
index 64d12b2ba88..c799c6e568f 100644
--- a/gcc/insert-gimple-ssa.h
+++ b/gcc/insert-gimple-ssa.h
@@ -112,6 +112,8 @@ class hstmt
another, this method should be called on all relevant stmts. This is
usually done by traversing the 'uses' vector of 'hstmt_with_lhs' stmts. */
virtual void replace_op_by (hstmt_with_lhs *, hstmt_with_lhs *) { }
+
+ virtual ~hstmt () { }
};
/* Hack statement with left side
@@ -130,6 +132,8 @@ class hstmt_with_lhs : public hstmt
ssa = NULL_TREE;
}
+ ~hstmt_with_lhs () { }
+
hvar *var;
vec<hstmt *> uses = vNULL; // TODO Nahradit obstack-friendly strukturou?
tree ssa;
@@ -177,6 +181,8 @@ class hphi : public hstmt_with_lhs
}
virtual void replace_op_by (hstmt_with_lhs *op, hstmt_with_lhs *replace_by) override;
+
+ ~hphi () { }
};
/* Hack assign stmt.
@@ -197,6 +203,8 @@ class hstmt_assign : public hstmt_with_lhs
virtual gimple *to_gimple (void) override;
virtual void replace_op_by (hstmt_with_lhs *op, hstmt_with_lhs *replace_by)
override;
+
+ ~hstmt_assign () { }
};
/* Hack const stmt (will rename this to hack invar stmt)
@@ -214,6 +222,8 @@ class hstmt_const : public hstmt_with_lhs
{
gcc_checking_assert (var->code == INVAR || var->code == PARAM);
}
+
+ ~hstmt_const () { }
};
/* Hack cond stmt. */
@@ -230,6 +240,8 @@ class hstmt_cond : public hstmt
virtual gimple *to_gimple (void) override;
virtual void replace_op_by (hstmt_with_lhs *op, hstmt_with_lhs *replace_by) override;
+
+ ~hstmt_cond () { }
};
/* Hack outvar stmt
@@ -249,6 +261,8 @@ class hstmt_outvar : public hstmt
hstmt (HSTMT_OUTVAR), outvar (outvar), rhs (rhs) { }
virtual gimple *to_gimple (void) override;
+
+ ~hstmt_outvar () { }
};
/* TODO Description. */
@@ -265,6 +279,8 @@ class hstmt_return : public hstmt
hstmt (HSTMT_RETURN), retval (retval) { }
virtual gimple *to_gimple (void) override;
+
+ ~hstmt_return () { }
};
/* TODO Description. */
@@ -280,6 +296,8 @@ class hstmt_call : public hstmt_with_lhs
virtual gimple *to_gimple (void) override;
virtual void replace_op_by (hstmt_with_lhs *op, hstmt_with_lhs *replace_by)
override;
+
+ ~hstmt_call () { }
};
/* Hack internal tuple
diff --git a/gcc/tree-into-ssa.cc b/gcc/tree-into-ssa.cc
index 2eb3cce3aeb..fbf4bb761d0 100644
--- a/gcc/tree-into-ssa.cc
+++ b/gcc/tree-into-ssa.cc
@@ -2575,7 +2575,6 @@ new_intossa ()
}
builder.set_block_filled (bb);
}
- fini_ssa_renamer ();
builder.finalize ();
builder.release ();
mark_virtual_operands_for_renaming (cfun);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-07-06 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-06 13:34 [gcc(refs/users/pheeck/heads/insert-api)] fixed 2 bugs related to calls, added virt destructors Filip Kastl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).