From: Leehod Baruch <LEEHOD@il.ibm.com>
To: Paolo Bonzini <paolo.bonzini@lu.unisi.ch>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: Question about merging two instructions.
Date: Mon, 22 Aug 2005 14:12:00 -0000 [thread overview]
Message-ID: <OF6BB453A0.91AAF632-ONC2257065.004BFE98-C2257065.004E32C4@il.ibm.com> (raw)
In-Reply-To: <43097A70.70108@lu.unisi.ch>
Paolo Bonzini <paolo.bonzini@lu.unisi.ch> wrote on 22/08/2005 10:10:40:
> > > I tried to use simplify_replace_rtx to replace any use of (reg r)
with[in]
> > > the right-hand-side of the extension and simplify the result.
>
> If he want to replace uses within the RHS of the extension, he should
> pass SET_SRC (pat). He may as well want to handle parallels, in which
> case he should write a new function similar to this:
I think you misunderstood my original purpose. I did mean [with]
and not [in].
Let me explain again.
I have these two instructions:
(insn 1 0 2 0 (set (reg/v:Xmode r)
(sign_extend:Xmode (op:Ymode (...))))
(insn 2 1 3 0 (set (LHS) (RHS)))
where:
1. Xmode > Ymode
2. RHS and/or LHS may contain:
(subreg:Ymode (reg/v:Xmode r) lowpart) and/or (reg/v:Xmode r).
Now I want to replace every *use* of (reg r) in insn 2 with the rhs of
insn 1 and simplify the result. This is way the replacement may happen
in the LHS of insn 2.
Note that I don't want to replace any *def* and uses may appear in the
LHS.
My plan was to use: replace_regs () to replace every use of (reg r)
with the a new pseudo register (because this is the only function that
I found that separates the uses from the defs) and then use
simplifiy_replace_rtx () to replace that new pseudo register with the rhs
of insn 1 and simplify.
To make things even more complicated - insn 2 may be PARALLEL.
Maybe I should use simplify_rtx (replace_rtx (..))?
But it seem to me that simplify_rtx () doesn't deal with SET either.
Do you see a better way?
Thanks,
Leehod.
next prev parent reply other threads:[~2005-08-22 14:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-21 13:52 Leehod Baruch
2005-08-21 16:55 ` Roger Sayle
2005-08-21 17:54 ` Leehod Baruch
2005-08-22 7:38 ` Paolo Bonzini
2005-08-22 13:33 ` Leehod Baruch
2005-08-22 13:37 ` Paolo Bonzini
2005-08-22 16:30 ` Richard Henderson
2005-08-22 13:49 ` Roger Sayle
2005-08-22 7:10 ` Paolo Bonzini
2005-08-22 14:12 ` Leehod Baruch [this message]
2005-08-22 14:42 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=OF6BB453A0.91AAF632-ONC2257065.004BFE98-C2257065.004E32C4@il.ibm.com \
--to=leehod@il.ibm.com \
--cc=gcc@gcc.gnu.org \
--cc=paolo.bonzini@lu.unisi.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).