[RFA] Which is better? More and simplier patterns? Fewer patterns with more embedded code?

Matt Thomas matt@3am-software.com
Wed Apr 27 06:10:00 GMT 2005


Back when I modified gcc 2.95.3 to produce PIC code for NetBSD/vax, I changed
the patterns in vax.md to be more specific with the instructions that got
matched.  The one advantage (to me as the writer) was it made it much easier
to track down what pattern caused what instruction to be emitted.

For instance:

(define_insn "*pushal"
  [(set (match_operand:SI 0 "push_operand" "=g")
        (match_operand:SI 0 "address_operand" "p"))]
  ""
  "pushal %a1")

I like the more and simplier patterns approach but I'm wondering what
the general recommendation is?
-- 
Matt Thomas                     email: matt@3am-software.com
3am Software Foundry              www: http://3am-software.com/bio/matt/
Cupertino, CA              disclaimer: I avow all knowledge of this message.



More information about the Gcc mailing list