a question about peephole optimization

Huimin Cui cuihm@soft.cs.tsinghua.edu.cn
Fri Mar 14 10:48:00 GMT 2003


Hi,
   I have a question about gcc peephole optimization, thanks for your reading the mail:)
   For example,if I have defined a peephole rule that replaces instuction I1 and I2 with Ia. And another rule is defined that Ia and I3 are replaced by Ib. Suppose the initial instruction sequence is I1 I2 I3,first I1 and I2 are replaced by Ia.My question appears here:next would Ia and I3 be replaced by Ib?My experiments shows perhaps not.
   If I want it happen,what should I do? The instruction sequence to do peephole is very long and complex. So if I define a peephole rule which is like replacing I1 I2 and I3 with Ib,it will be very very troublesome.
   Thanks for your advice!



More information about the Gcc-help mailing list