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]

Reload and unary operations in operands.


Hi
The i387 paterns would greatly simplify, if the float_extends were matched
into the insns using special predicates and not using many copies of same
pattern (this change can reduce number of i387 pattern to 1/4 and make
possible to do similar optimization for float_truncate/ffast-math too).

Currently most GCC infrastructure handles this nicely (recog ignores
the unary operands for constraint matching and so on). Only problem
is reload, that attempts to handle operands as a whole and thus don't
generate simple move operations for reloading and generates float_extends
instead.

One possible solution is to make i386 mov?f patterns happy about float_extended
parameters, but I believe this is just workaround the real problem.
I was trying to fix this problem by patch I sent about four months ago
that just wrapped around the insn_extract for reload and hide the unary
operations behind it.
This is also not good solution, because reload might want to swap operands
on '%' and it will keep the extends on origninal places, that is incorrect.

Because I am not very familiar with reload, I can't find nice way to solve
this problem, but I really need it for my i387 patterns revmap I plan in
near future.
Can please someone point me to right direction to fix this?

Honza


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