| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
We're about to start using it there.
Differential Revision: https://reviews.llvm.org/D25877
llvm-svn: 284865
|
|
|
|
|
|
|
|
|
|
| |
To be used by upcoming change to IndVarSimplify
Reviewed By: sanjoy
Differential Revision: https://reviews.llvm.org/D25732
llvm-svn: 284597
|
|
|
|
|
|
|
|
|
|
|
| |
This change teaches getEquivalentICmp to be smarter about generating
ICMP_NE and ICMP_EQ predicates.
An earlier version of this change was landed as rL283057 which had a
use-after-free bug. This new version has a fix for that bug, and a (C++
unittests/) test case that would have triggered it rL283057.
llvm-svn: 283078
|
|
|
|
|
|
|
|
|
|
|
| |
They've broken the sanitizer-bootstrap bots. Reverting while I investigate.
Original commit messages:
r283057: "[ConstantRange] Make getEquivalentICmp smarter"
r283058: "[SCEV] Rely on ConstantRange instead of custom logic; NFCI"
llvm-svn: 283062
|
|
|
|
|
|
|
| |
This change teaches getEquivalentICmp to be smarter about generating
ICMP_NE and ICMP_EQ predicates.
llvm-svn: 283057
|
|
|
|
| |
llvm-svn: 273118
|
|
|
|
| |
llvm-svn: 271862
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r231483 taught ConstantRange::multiply to be clever about signed vs unsigned ranges. For example, an unsigned range could be full-set while the signed range is more specific than that.
In looking at the allocations trace for LTO'ing verify-uselistorder (see r236629 for details), millions of allocations are from APInt, many of which come from ConstantRange's.
This change tries to avoid some (3.2 million) allocations by returning the unsigned range if its suitable. The checks here are that it should not be a wrapping range, and should be positive. That should be enough to check for ranges such as [1, 10) which the signed range will be equal to, if we were to calculate it.
Differential Revision: http://reviews.llvm.org/D20723
Reviewed by James Molloy
llvm-svn: 271020
|
|
|
|
|
|
|
| |
Currently only its unit test uses it, but this will be used in a later
change to simplify some logic in the GuardWidening pass.
llvm-svn: 270018
|
|
|
|
|
|
|
|
|
| |
dominating conditions.""
This reapplies commit r268521, that was reverted in r268530 due to a test failure in select-implied.ll
Modified the test case to reflect the new change.
llvm-svn: 268557
|
|
|
|
|
|
|
|
| |
conditions."
This reverts commit 573a40f79b35cf3e71db331bb00f6a84f03b835d.
llvm-svn: 268530
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch canonicalizes conditions based on the constant range information
of the dominating branch condition.
For example:
%cmp = icmp slt i64 %a, 0
br i1 %cmp, label %land.lhs.true, label %lor.rhs
lor.rhs:
%cmp2 = icmp sgt i64 %a, 0
Would now be canonicalized into:
%cmp = icmp slt i64 %a, 0
br i1 %cmp, label %land.lhs.true, label %lor.rhs
lor.rhs:
%cmp2 = icmp ne i64 %a, 0
Reviewers: mcrosier, gberry, t.p.northover, llvm-commits, reames, hfinkel, sanjoy, majnemer
Subscribers: MatzeB, majnemer, mcrosier
Differential Revision: http://reviews.llvm.org/D18841
llvm-svn: 268521
|
|
|
|
|
|
|
| |
This will be used in a later patch to ScalarEvolution. Right now only
the unit tests exercise the newly added code.
llvm-svn: 262637
|
|
|
|
|
|
|
|
| |
This was split off from http://reviews.llvm.org/D17184.
Reviewed by: Sanjoy
llvm-svn: 262080
|
|
|
|
|
|
|
|
| |
Rename makeNoWrapRegion to a more obvious makeGuaranteedNoWrapRegion,
and add a comment about the counter-intuitive aspects of the function.
This is to help prevent cases like PR26628.
llvm-svn: 261532
|
|
|
|
|
|
|
|
| |
r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.
llvm-svn: 259240
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This will be used in a future change to ScalarEvolution.
Reviewers: hfinkel, reames, nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D13612
llvm-svn: 250975
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This change splits `makeICmpRegion` into `makeAllowedICmpRegion` and
`makeSatisfyingICmpRegion` with slightly different contracts. The first
one is useful for determining what values some expression //may// take,
given that a certain `icmp` evaluates to true. The second one is useful
for determining what values are guaranteed to //satisfy// a given
`icmp`.
Reviewers: nlewycky
Reviewed By: nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8345
llvm-svn: 232575
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Multiplication is not dependent on signedness, so just treating
all input ranges as unsigned is not incorrect. However it will cause
overly pessimistic ranges (such as full-set) when used with signed
negative values.
Teach multiply to try to interpret its inputs as both signed and
unsigned, and then to take the most specific (smallest population)
as its result.
llvm-svn: 231483
|
|
a bit surprising, as the class is almost entirely abstracted away from
any particular IR, however it encodes the comparsion predicates which
mutate ranges as ICmp predicate codes. This is reasonable as they're
used for both instructions and constants. Thus, it belongs in the IR
library with instructions and constants.
llvm-svn: 202838
|