diff options
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index d26b0f8..0e056f3 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1420,6 +1420,24 @@ extern dump_user_location_t vect_location; #define DUMP_VECT_SCOPE(MSG) \ AUTO_DUMP_SCOPE (MSG, vect_location) +/* A sentinel class for ensuring that the "vect_location" global gets + reset at the end of a scope. + + The "vect_location" global is used during dumping and contains a + location_t, which could contain references to a tree block via the + ad-hoc data. This data is used for tracking inlining information, + but it's not a GC root; it's simply assumed that such locations never + get accessed if the blocks are optimized away. + + Hence we need to ensure that such locations are purged at the end + of any operations using them (e.g. via this class). */ + +class auto_purge_vect_location +{ + public: + ~auto_purge_vect_location (); +}; + /*-----------------------------------------------------------------*/ /* Function prototypes. */ /*-----------------------------------------------------------------*/ |