HomePhabricator

[InlineCost] Find more free binary operations

Description

[InlineCost] Find more free binary operations

Currently, inline cost model considers a binary operator as free only if both
its operands are constants. Some simple cases are missing such as a + 0, a - a,
etc. This patch modifies visitBinaryOperator() to call SimplifyBinOp() without
going through simplifyInstruction() to get rid of the constant restriction.
Thus, visitAnd() and visitOr() are not needed.

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

Details

Committed
haichengDec 22 2017, 9:09 AM
Differential Revision
D41494: [InlineCost] Find more free binary operations
Parents
rL321365: [MSan,TSan] Add aligned new/delete interceptors.
Branches
Unknown
Tags
Unknown