This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] AVR: rev.2: implement HI/SI logic operations andsign/zero extension by define_insn_and_split instead of define_insn
- From: Paul Schlie <schlie at comcast dot net>
- To: Denis Chertykov <denisc at overta dot ru>
- Cc: Bjіrn Haase <bjoern dot m dot haase at web dot de>,Andy Hutchinson <HutchinsonAndy at netscape dot net>,<marekm at amelek dot gda dot pl>,Roger Sayle <roger at eyesopen dot com>,<gcc-patches at gcc dot gnu dot org>
- Date: Sun, 17 Apr 2005 13:08:31 -0400
- Subject: 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?)