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: [PATCH] AVR: rev.2: implement HI/SI logic operations andsign/zero extension by define_insn_and_split instead of define_insn


re: http://gcc.gnu.org/ml/gcc-patches/2005-04/msg01897.html

I can't help but wonder if there's some way to optimize from the outside->in
(by changing the inner modes to reflect the "subreg" mode requirement of the
operation, as should already been ideally the case, but isn't yet) vs.
optimizing from the inside->out (which is what splitting does without
knowledge of the target's need, relying on unused operations being ignored)?
i.e.:

(define <operation>si2hi
  [(subreg:HI (<operation>:SI (match_operand:SI 0) (match_operand:SI 1)))]
  
  "(<operation>:HI (subreg:HI (match_dup 0)) (subreg:HI (match_dup 1)))")

Which is then recursively applied, leaving only the minimal mode operations
required of it's operands remaining. (Where it would seem that if this were
done somewhere within the middle-end, "subreg" operations would only remain
for operations who's results have differing subsequent mode requirements,
which may help simplify subsequent optimizations?)



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