[PATCH] [ScalarEvolution]Fix PR18607 resulting in long compilation time and memory usage

Karthik Bhat kv.bhat at samsung.com
Thu Mar 20 05:15:14 PDT 2014


Hi chandlerc, joker-eph, arsenm, nicholas,

Hi All,
This patch fixes PR18607. Added a threshold beyond which we do not inline mul operands into SCEV. 
This seems reasonable as inlining all mul operands without a threshold is resulting in exponential complexity.

Few other modifications include-
1) In compare function for scConstant if LHS and RHS are same we need to return 0 instead of 1
2) Remove redundant code in switch case of scMulExpr in compare function.

I'm new to this part of code. It would be great if someone and review the patch and give inputs if this approach is fine.

Thanks
Karthik Bhat

http://llvm-reviews.chandlerc.com/D3127

Files:
  test/Transforms/IndVarSimplify/pr18607.ll
  lib/Analysis/ScalarEvolution.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3127.1.patch
Type: text/x-patch
Size: 7634 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140320/5e0df529/attachment.bin>


More information about the llvm-commits mailing list