Can someone tell me if there is a way to generate RTL code which does not include use and def of the same pseudo in the same insn?
That depends on how you are generating RTL, but it should be pretty obvious that you can use gen_reg_rtx to generate a temp reg for use as a destination for most operations.
Or maybe your question is how to get everyone else to generate RTL code this way? No, there isn't an easy way to do this.
There are also some reasons why it is impossible to do it everywhere. RTL matches hardware instructions, and some targets have instructions that require that source and destination operands match. There are also some rtl operations that implicitly use and set the same register, such as bitfield inserts. Some targets have complex operations that may require rtl that explicitly sets and uses the same register in order to adequately describe. Etc. You can't fix all of these cases by splitting apart instructions, at least not without losing performance.
There is also the issue of extended asms, which may use and set the same register.
In general, gcc does already try to use temporary regs in many places when optimizing, because we often get better code that way. This is probably only true in very early rtl optimization passes though. In later ones, the temps will have already been optimized away.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com