[LLVMdev] removing unnecessary moves with 2-address machine
sabre at nondot.org
Wed Mar 5 14:04:08 PST 2008
On Wed, 5 Mar 2008, Bagel wrote:
> If the legs of the add.w were reversed, the mov.w would not be
> necessary. I have declared the add instruction to be "commutable".
> What do I have to do to cause the optimization?
Marking it commutable and describing the move as a copy instruction should
be enough. Are you using llvm mainline or 2.2? Evan implemented this in
mainline after 2.2 was released.
More information about the llvm-dev