On Mon, Dec 19, 2016 at 6:27 PM, Will Schmidt <will_schm...@vnet.ibm.com> wrote: > Hi, > > For some future rs6000 vector folding patches, I will be needing > access to the create_tmp_reg_or_ssa_name() function in rs6000.c. > Thus... > Externalize the definition of create_tmp_reg_or_ssa_name > for use in rs6000.c. The actual usage will show up in later patches. > > I'll note that I do not have any 'usage' patches quite ready to go, so > I may just sit on committing this until one of those usage patches is ready. > > I've bootstrapped and make check with this patch applied in conjunction with > other patches. > > OK for trunk?
Ok. Richard. > > [gcc] > > 2016-12-19 Will Schmidt <will_schm...@vnet.ibm.com> > > * gimple-fold.c (create_tmp_reg_or_ssa_name): remove static > declaration. > * gimple-fold.h: add prototype. > > diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c > index d00625b..ac4498f 100644 > --- a/gcc/gimple-fold.c > +++ b/gcc/gimple-fold.c > @@ -161,8 +161,8 @@ can_refer_decl_in_current_unit_p (tree decl, tree > from_decl) > is in SSA form, a SSA name is created. Otherwise a temporary register > is made. */ > > -static tree > -create_tmp_reg_or_ssa_name (tree type, gimple *stmt = NULL) > +tree > +create_tmp_reg_or_ssa_name (tree type, gimple *stmt) > { > if (gimple_in_ssa_p (cfun)) > return make_ssa_name (type, stmt); > diff --git a/gcc/gimple-fold.h b/gcc/gimple-fold.h > index 5add30c..e7f8fe2 100644 > --- a/gcc/gimple-fold.h > +++ b/gcc/gimple-fold.h > @@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see > #ifndef GCC_GIMPLE_FOLD_H > #define GCC_GIMPLE_FOLD_H > > +extern tree create_tmp_reg_or_ssa_name (tree, gimple *stmt = NULL); > extern tree canonicalize_constructor_val (tree, tree); > extern tree get_symbol_constant_value (tree); > extern void get_range_strlen (tree, tree[2]); > >