[LLVMdev] Cost in loop-strength-reduce pass

alexey ivannikov a.ye.ivannikov at gmail.com
Mon Mar 3 02:52:55 PST 2014


Hello. May somebody explain how cost in loop strength reduction is
calculated?
E.q. I received two different costs with 3 regs and with 1reg and imms. Why
second combination in preffered?

(Some from debug log)
New best at 3 regs, with addrec cost 3.
 Regs: {20000,+,-1}<nw><%for.body> {@x,+,4}<nsw><%for.body>
{@y,+,4}<nsw><%for.body>
New best at 3 regs, with addrec cost 1, plus 16 imm cost.
 Regs: {0,+,-1}<nw><%for.body> @x @y
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140303/754cea52/attachment.html>


More information about the llvm-dev mailing list