Analysis: Reformulate WillNotOverflowUnsignedAdd for reusability
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Jan 2015 00:39:50 +0000 (00:39 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 7 Jan 2015 00:39:50 +0000 (00:39 +0000)
commit5310c1e9549c18af257eaf2c13782e29419dc28d
tree30e42c993321fa68401184e7a509272e2932cb67
parent3b83b3fa0bc874a6b02c97e026ddc3bfa9f0bdd4
Analysis: Reformulate WillNotOverflowUnsignedAdd for reusability

WillNotOverflowUnsignedAdd's smarts will live in ValueTracking as
computeOverflowForUnsignedAdd.  It now returns a tri-state result:
never overflows, always overflows and sometimes overflows.

llvm-svn: 225329
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/InstCombine/InstCombine.h
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp