This is the mail archive of the gcc@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]

Re: ssa bootstrap problem on x86 (cmpstrsi_1 pattern)


>>>>> "Geoff" == Geoff Keating <geoffk@cygnus.com> writes:

    Geoff> ???  10035 is indeed valid in all such blocks.  It's not
    Geoff> _useful_, since it holds an indeterminate value, but it has
    Geoff> certainly been set, and it has only been set once.
    Geoff> Hopefully, any kind of dataflow analysis we do would notice
    Geoff> that it was set by a CLOBBER and therefore does not hold a
    Geoff> useful value.

That would work -- but it misses one of the important benefits of SSA:
you don't have to do dataflow analysis.  I think one of the big ideas
is that if you're lower in the dominator tree you *know* what the
values are for all registers in sight.  

    Geoff> The important point is that register 35 _is_ valid.  It
    Geoff> holds the same value it held before.

Yup -- I recognized that.  I'm suggesting the same invariant.

    Geoff> You could do it in unssa, but then the problem is that you
    Geoff> have to have special code to recognise this as a valid insn
    Geoff> while it is in SSA form.

Right.  I knew that, but I should have said I knew it.  I'm not saying
it's necessarily easy -- but I don't actually think it's that hard.

    Geoff> Oops!  I must have sent the mail before I finished it.
    Geoff> Yes, the idea would be to use

    Geoff> (clobber (match_scratch:SI "0"))

OK, I get it.  I think these two aspects are orthogonal: i386.md could
be perhaps improved as you suggest -- and we still have to worry about
what to do with CLOBBER in SSA.

I now totally understand where the motivation for your patch was
coming from.  But, I still think that the fix isn't correct -- any
more than the current code is correct.  I think we need to bite the
bullet and get the CLOBBERs out of there; otherwise, we are forced to
do some kind of dataflow anlaysis in SSA, and that negates one of the
big wins from being in SSA form.  I think I can allocate some
resources to solve this problem soon.

I feel clear on the concepts, now.  But, if you still disagree, let's
keep on hashing it out, by all means.

Thanks a lot for all the analysis.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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