[llvm-commits] patch: chrec * chrec = chrec.

Nick Lewycky nicholas at mxc.ca
Sun Oct 2 16:50:59 PDT 2011


This patch is a follow-up to r139133 which corrected SCEV's getMulExpr 
when given two chrec arguments. Here I extend it to correctly multiply 
chrecs of any length.

The meat of this patch is a pure blob of illegible math. If you want to 
do a hard review, I would suggest:
  - trying to derive the formula I used in the comment to calculate the 
terms of the new chrec
  - proving to yourself a coefficient that doesn't fit can safely be 
truncated

If you want to do an easier review, I would suggest running it over 
code. This will fire in 447.dealII for example.

I know that other work is going on in the loop optimizer right now which 
I don't want to interfere with, so please let me know when wouldn't be a 
bad time to land this.

Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scev-chrec-product.patch
Type: text/x-patch
Size: 15179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111002/859aa189/attachment.bin>


More information about the llvm-commits mailing list