diff options
Diffstat (limited to '0249-Backport-SME-Add-operator-to-gimple_stmt_iterator-an.patch')
-rw-r--r-- | 0249-Backport-SME-Add-operator-to-gimple_stmt_iterator-an.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/0249-Backport-SME-Add-operator-to-gimple_stmt_iterator-an.patch b/0249-Backport-SME-Add-operator-to-gimple_stmt_iterator-an.patch new file mode 100644 index 0000000..293df25 --- /dev/null +++ b/0249-Backport-SME-Add-operator-to-gimple_stmt_iterator-an.patch @@ -0,0 +1,42 @@ +From b0ca9a6eb1406a60eec566cf302790bee89879af Mon Sep 17 00:00:00 2001 +From: Richard Biener <rguenther@suse.de> +Date: Tue, 18 Apr 2023 16:58:26 +0200 +Subject: [PATCH 150/157] [Backport][SME] Add operator* to gimple_stmt_iterator + and gphi_iterator + +Reference: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c39cdd9e654540f74cd2478019c40f1611554a44 + +This allows STL style iterator dereference. It's the same +as gsi_stmt () or .phi (). + + * gimple-iterator.h (gimple_stmt_iterator::operator*): Add. + (gphi_iterator::operator*): Likewise. +--- + gcc/gimple-iterator.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gcc/gimple-iterator.h b/gcc/gimple-iterator.h +index 216ebee24..5d281e4f7 100644 +--- a/gcc/gimple-iterator.h ++++ b/gcc/gimple-iterator.h +@@ -24,6 +24,8 @@ along with GCC; see the file COPYING3. If not see + + struct gimple_stmt_iterator + { ++ gimple *operator * () const { return ptr; } ++ + /* Sequence node holding the current statement. */ + gimple_seq_node ptr; + +@@ -38,6 +40,8 @@ struct gimple_stmt_iterator + /* Iterator over GIMPLE_PHI statements. */ + struct gphi_iterator : public gimple_stmt_iterator + { ++ gphi *operator * () const { return as_a <gphi *> (ptr); } ++ + gphi *phi () const + { + return as_a <gphi *> (ptr); +-- +2.33.0 + |