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

[Bug target/16798] PowerPC - Opportunity to use recording form instruction.


------- Additional Comments From nathan at gcc dot gnu dot org  2004-11-09 12:25 -------
The problem here is that combine only combines chains of instructions that have
no other uses of the intermediate results.  In this case, the intermediate
result is stored into a global variable.

One solution would be to add a peephole, but that would only trigger when (a)
the shift and compare were adjacent, and (b) the compare used CR0.  You'd also
need peepholers for all the instructions that can implicitly set CR0.

Really combine, which is a generic peepholer, needs some kind of templatizing on
the target machine.  It currently functions by generating promising patterns and
 then seeing if they exist.  This is wasteful, in that it generates many
patterns  that don't exist on the particular target, and it is blind in that it
doesn't spot any special cases the target might have (like this case).  What's
needed is something like pre-reg-alloc peepholes.  That of course would be a
large amount of work.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16798


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