HomePhabricator

[CVP] Remove some {s|u}add.with.overflow checks.

Description

[CVP] Remove some {s|u}add.with.overflow checks.

Summary:
This adds logic to CVP to remove some overflow checks. It uses LVI to remove
operations with at least one constant. Specifically, this can remove many
overflow intrinsics immediately following an overflow check in the source code,
such as:

if (x < INT_MAX)

... x + 1 ...

Patch by Joel Galenson!

Reviewers: sanjoy, regehr

Reviewed By: sanjoy

Subscribers: fhahn, pirama, srhines, llvm-commits

Differential Revision: https://reviews.llvm.org/D39483

Details

Committed
sanjoyNov 10 2017, 11:13 AM
Reviewer
sanjoy
Differential Revision
D39483: [CVP] Remove some {s|u}add.with.overflow checks.
Parents
rL317910: Use DenseMap instead of std::map in fixupExports
Branches
Unknown
Tags
Unknown