diff options
Diffstat (limited to 'gcc/gimple-rewriter.c')
-rw-r--r-- | gcc/gimple-rewriter.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/gimple-rewriter.c b/gcc/gimple-rewriter.c index 076083a1805..7518844d658 100644 --- a/gcc/gimple-rewriter.c +++ b/gcc/gimple-rewriter.c @@ -1,3 +1,28 @@ +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tree.h" +#include "options.h" +#include "cgraph.h" +#include "tree-pass.h" +#include "tree-cfg.h" +#include "tree-pretty-print.h" +#include "gimple-pretty-print.h" +#include "stringpool.h" //get_identifier +#include "basic-block.h" //needed for gimple.h +#include "function.h" //needed for gimple.h +#include "gimple.h" +#include "cfg.h" // needed for gimple-iterator.h +#include "gimple-iterator.h" +#include "stor-layout.h" // layout_type +#include "fold-const.h" //build_fold_addr_expr +#include "gimple-ssa.h" // update_stmt +#include "attribs.h" // decl_attributes +#include "gimplify.h" //unshare_expr +#include "value-range.h" // make_ssa_name dependency +#include "tree-ssanames.h" // make_ssa_name +#include "ssa.h" +#include "tree-into-ssa.h" #include "gimple-rewriter.hpp" void @@ -6,6 +31,11 @@ GimpleTypeRewriter::_walk_pre(const_tree e) // This is for local variables // and other declarations exprTypeRewriter.walk(e); + const bool is_interesting = exprTypeRewriter.is_interesting_type(TREE_TYPE(e)); + const bool is_var_decl = TREE_CODE(e) == VAR_DECL; + const bool is_valid = is_interesting && is_var_decl; + if (!is_valid) return; + relayout_decl((tree)e); } void |