This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, pretty-ipa merge 3/4] The IPA-SRA itself.


So, instead of all that disqualifying of ptr arguments why not
simply do

  for-each-ptr-argument
    FOR_EACH_IMM_USE_STMT (use_stmt, iter, parm-default-def)
      if (load-from-parm)
        ok;
      else
        disqualify it;
      if (use_stmt post-dominates entry)
        great;

    if (!great)
      disqualify it;

?

Of course you still have to rule out non-obvious (same
ptr base as parm) aliases / stores.  This needs to walk
_all_ stmts in the function asking if it may clobber
a reference based on that ptr.  You can use
stmt_may_clobber_ref_p_1 for that, set up the ao_ref
with a INDIRECT_REF base and -1 size / max_size.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]