Swap optimization pass

Jeffrey A Law law@cygnus.com
Tue Jan 13 16:45:00 GMT 1998


  In message < 199801140014.TAA14173@jwlab.FEITH.COM >you write:
  > If we have the following pseudo rtl:
  > 
  >   (set (reg 3) (reg 1))   insn B
  >   (set (reg 1) (reg 2))   insn A
  >   (set (reg 2) (reg 3))   insn C
  > 
  > Which describes a swap then there will be the following links:
  > 
  >   insn C -> insn B
You're absolutely correct.  Major bummer.

I wonder if regmove might be another place we could try to attack
this problem instead of creating another pass.  I'm a little worried
that regmove is becoming a place to stick random unrelated optimizations,
but it might still make more sense than creating a new pass.

jeff



More information about the Gcc-bugs mailing list