Address some review comments from Duncan. This moves the iterative
authorChandler Carruth <chandlerc@gmail.com>
Tue, 13 Mar 2012 00:06:15 +0000 (00:06 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 13 Mar 2012 00:06:15 +0000 (00:06 +0000)
commit90c14fcb7ea3436a8b3053f8a9aa529c03011d34
tree5e312eedb6447a9ad0a873f67d7efcdfee2f543c
parentf5677777ca9761399572b2cd800886b8aa35e921
Address some review comments from Duncan. This moves the iterative
offset accumulation to use a boring APInt instead of ConstantExprs.
I didn't go all the way to an 'int64_t' because I wanted APInt to handle
any magic required to properly wrap the arithmetic when the pointer
width is <64 bits. If there is a significant penalty from using APInt
here, first off WTF, and secondly let me know and I'll do the math by
hand.

I've left one layer still operating w/ ConstantExpr because it makes the
interface quite a bit simpler, and that one isn't iterative so has much
lower cost.

I suppose this may potentially speed up some strang compilation
situations, but I don't really expect much. It should have no functional
impact either way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152590 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp