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: PR17340 - disable accurate live analysis for now?


Steven Bosscher wrote:

On Tuesday 14 December 2004 19:01, Vladimir Makarov wrote:


Steven Bosscher wrote:


On Dec 14, 2004 06:34 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:


Steven Bosscher wrote:


Only, are you sure this is necessary? I did not need it:


All the patch is not necessary for the correct work. So my addition is
not critical if it works for you. But my pavout is more accurate and
more compact (the difference is in that your pavout will still have
registers calculated in bb and dead at the end of the bb, e.g. registers
mentioned in REG_UNUSED notes).


Ah, right.  Well, I think we can remedy that in a way such that
you don't need the temporary bitmap.  You now have:

   bb.live_pavout = union (bb.live_pavin - b.killed, bb.avloc)
                    & global_live_at_end

(Note: You have a typo there, you want bb.killed, ie. extra 'b')

Can't that be computed as,

bb.live_killed = bb.killed & global_live_at_end (== bb.killed???)


Unfortunately it is not true.



   bb.live_avloc = bb.avloc & global_live_at_end
   bb.live_pavout = union (bb.live_pavin-b.live_killed,bb.live_avloc)

bb.live_killed and bb.live_avloc would be local properties so you
can precompute them.


Yes, it is a good trick. I'll redo my patch and send it after t



Actually, if bb.live_killed != bb.killed then are my proposed changes correct?

Yes and no. Yes because global_live_at_end does not contain killed - live_killed. So even if live_killed and killed are different we can use killed instead of live_killed in calculation of live_pavout.

But I've missed that you are using bb.live_pavin instead of bb.live_pavin & global_live_at_end. This is wrong if we want achieve the same (more compact) value for pavout. For example, we have the following basic block

live_at_start = ABC pavin = ABD live_pavin = AB

= A


live_at_end = BC pavout = ABD live_pavout=B (my equations) live_pavout=AB (your equations)

So I think we can not avoid temporary bitmap in any case. I'd rather stop futher improvement because it makes algorithm less and less clear.

The equations (partial availability and life analysis equations) look simple. But it is brain damage exercise.

Vlad

 I don't think so because it means we'd kill fewer regs for
LIVE_PAVOUT, so PAVOUT would be a larger set than with your original
patch.  You can still do LIVE_AVLOC = AVLOC & LIVEOUT, but for PAVIN
and KILLED you'd compute a set that is too large.






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