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: RFA: MN10300: Add redundant comparison elimination pass


Hi Jeff,

it is - a machine reorg pass to eliminate redundant compares.

My first thought is isn't this handled in a target independent way
elsewhere? How do the x86 and other targets that were converted away
from cc0 handle this stuff?

Paolo has pointed out that I ought to be using SELECT_CC_MODE to return a new CC mode and then add patterns to combine the arithmetic and comparison instructions using this mode.


He is right of course, but I would rather get this patch in and at least remove some redundant compares, and then work on a better patch at some point in the future. But if you feel we should be "doing the right thing" right from the start then I will withdraw the patch and try to work on a new one. In my copious free time of course... :-)

Cheers
  Nick



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