This is the mail archive of the
mailing list for the GCC project.
Re: List of simplifications we should perform
DJ Delorie <email@example.com> writes:
> > One could even take this a step further and provide an interface
> > to allow people to write optimizer in higher-level languages. I'm
> > not sure how practical would that be, though.
> (define-optimization "neg-neg"
> [(set (match-operand:SI 0 "" "")
> (neg:SI (neg:SI (match-operand:SI 1 "" ""))))]
> [(set (match-dup 0) (match-dup 1))]
Hey, that's a good idea.
I've created gensimplify, a horrific marriage of genrecog and
given an MD file (I'm using simplify.md for right now), it generates
the necessary code do the simplification for those insns.
The syntax looks like above, except it's define_simplify instead of
vvvgenerates a simplify_insn function (and friends) meant to replace
It doesn't do recursive simplification yet. I would imagine i should
just make gensimplify call simplify_insn on operands that aren't
What's left to do:
flesh out simplify.md
"They say we're 98% water. We're that close to drowning...
(Picks up his glass of water from the stool...) I like to live
on the edge...