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, 1/2] shrink wrap a function with a single loop: copy propagation


On 05/09/14 01:30, Zhenqiang Chen wrote:

So why restrict this to just cases where we have to propagate into a COMPARE
at the end of a block?   So in your example, assume the first block looks
like

prepare_shrink_wrap will move_insn_for_shrink_wrap in BB_INSNS_REVERSE
order. Current prepare_shrink_wrap should handle the case since there
is no data flow dependence.
OK.


My first thought here was that we must have some code which does 90% of what
you need.  Did you look at any of the existing RTL optimization
infrastructure to see if there was code you could extend to handle this?

Most the codes are from function copyprop_hardreg_forward_1 in
"cprop_hardreg" pass. Previously I had a patch to reuse it:
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00305.html. What do you
think about the old patch?
Utilizing routines from the hard register copy propagation pass seems wise. I'll take a look at the updated patch.

jeff


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