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]
Other format: [Raw text]

Re: A plan for eliminating cc0


Ian Lance Taylor <ian@airs.com> writes:
> Zack Weinberg <zack@codesourcery.com> writes:
>> I'm not understanding why this is a separate pass, instead of
>> generating the combined instructions directly in the expander.  I
>> think generic expander support for compare-and-branch instructions
>> already exists...
>
> We have to worry not just about compare-and-branch, but also about
> test-and-branch, compare-and-set, compare-and-move, and
> compare-and-add.  Basically, look for the various calls to
> emit_cmp_insn.  We could modify the expander to try combined
> instructions in all those cases.  Or we could modify the cc0
> backends to save the comparison operands in cmpMODE and use them in
> the various conditional instructions (that was my original
> proposal).  Overall it seems simpler to use a separate pass.  I'm
> not wedded to it, though.

I kinda like the idea of having the cc0 backends save the comparison
operands.  That is, after all, what most of the non-cc0 backends do.
It is not the way that I think things *should* work, but it does
reduce the number of ways that things are done.  (Long term, I *would*
like to see named optabs for all of the above as fused operations,
ideally as the only way the expander works.)

zw


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