Sorry, the check in comment and some of the code is wrong. What it should say is "is all other uses are address and iv reuse for those are possible, then ignore the PHI use." In that case, an extra multiplication is needed (for PHI), but it eliminates an iv because the multiplication is folded into other uses. It turns out to be a good trade.
I'll fix this in a bit. Evan On Dec 19, 2007, at 3:57 PM, Chris Lattner wrote: > > On Dec 19, 2007, at 3:33 PM, Evan Cheng wrote: > >> Author: evancheng >> Date: Wed Dec 19 17:33:23 2007 >> New Revision: 45230 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=45230&view=rev >> Log: >> Allow iv reuse if the user is a PHI node which is in turn used as >> addresses. > > Out of curiousity, what sort of case is this helpful with? It seems > that phis would prevent folding into addresses. > > -Chris > > _______________________________________________ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits