aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-scopedtables.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-09-11 15:32:38 -0600
committerJeff Law <law@gcc.gnu.org>2015-09-11 15:32:38 -0600
commitf2a4ca153cf04399eecdfb8229d63dda5754df95 (patch)
treed8af52df36b4b2862fdcabe01a633ddf05f1a06f /gcc/tree-ssa-scopedtables.h
parentcf16e6efb00d9a5bc8a1a314779cc54df3367700 (diff)
downloadgcc-f2a4ca153cf04399eecdfb8229d63dda5754df95.zip
gcc-f2a4ca153cf04399eecdfb8229d63dda5754df95.tar.gz
gcc-f2a4ca153cf04399eecdfb8229d63dda5754df95.tar.bz2
[PATCH] Another small cleanup to the const_and_copies stack
2015-09-11 Jeff Law <law@redhat.com> PR tree-optimization/47679 * tree-ssa-dom.c (struct cond_equivalence): Update comment. * tree-ssa-scopedtables.h (class const_and_copies): Prefix data member with m_. Update inline member functions as necessary. Add toplevel comment. * tree-ssa-scopedtables.c: Update const_and_copies's member functions to use m_ prefix to access the stack. From-SVN: r227697
Diffstat (limited to 'gcc/tree-ssa-scopedtables.h')
-rw-r--r--gcc/tree-ssa-scopedtables.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/tree-ssa-scopedtables.h b/gcc/tree-ssa-scopedtables.h
index 13f7ccb..f7d9ca4 100644
--- a/gcc/tree-ssa-scopedtables.h
+++ b/gcc/tree-ssa-scopedtables.h
@@ -20,14 +20,20 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_TREE_SSA_SCOPED_TABLES_H
#define GCC_TREE_SSA_SCOPED_TABLES_H
+/* This class defines an unwindable const/copy equivalence table
+ layered on top of SSA_NAME_VALUE/set_ssa_name_value.
+
+ Essentially it's just a stack of name,prev value pairs with a
+ special marker (NULL) to indicate unwind points. */
+
class const_and_copies
{
public:
- const_and_copies (void) { stack.create (20); };
- ~const_and_copies (void) { stack.release (); }
+ const_and_copies (void) { m_stack.create (20); };
+ ~const_and_copies (void) { m_stack.release (); }
/* Push the unwinding marker onto the stack. */
- void push_marker (void) { stack.safe_push (NULL_TREE); }
+ void push_marker (void) { m_stack.safe_push (NULL_TREE); }
/* Restore the const/copies table to its state when the last marker
was pushed. */
@@ -47,7 +53,7 @@ class const_and_copies
void invalidate (tree);
private:
- vec<tree> stack;
+ vec<tree> m_stack;
};
#endif /* GCC_TREE_SSA_SCOPED_TABLES_H */