| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
| |
This fixes a FIXME in scev-aa.ll (allowing a new no-alias result) and
generally makes things more precise.
llvm-svn: 125449
|
| |
|
|
|
|
|
|
|
|
|
| |
unsigned overflow (e.g. "gep P, -1"), and while they can have
signed wrap in theoretical situations, modelling an AddRec as
not having signed wrap is going enough for any case we can
think of today. In the future if this isn't enough, we can
revisit this. Modeling them as having NUW isn't causing any
known problems either FWIW.
llvm-svn: 125410
|
| |
|
|
|
|
| |
passes. Fixes PR9112. Patch by Jakub Staszak!
llvm-svn: 125319
|
| |
|
|
| |
llvm-svn: 125200
|
| |
|
|
|
|
| |
improve interfaces to instsimplify to take this info.
llvm-svn: 125196
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
versions of creation functions. Eventually, the "insertion point" versions
of these should just be removed, we do have IRBuilder afterall.
Do a massive rewrite of much of pattern match. It is now shorter and less
redundant and has several other widgets I will be using in other patches.
Among other changes, m_Div is renamed to m_IDiv (since it only matches
integer divides) and m_Shift is gone (it used to match all binops!!) and
we now have m_LogicalShift for the one client to use.
Enhance IRBuilder to have "isExact" arguments to things like CreateUDiv
and reduce redundancy within IRbuilder by having these methods chain to
each other more instead of duplicating code.
llvm-svn: 125194
|
| |
|
|
|
|
| |
to simplify the "(X/Y)*Y->X when the division is exact" transform.
llvm-svn: 125004
|
| |
|
|
|
|
| |
when the div is an exact udiv.
llvm-svn: 124994
|
| |
|
|
|
|
|
|
|
| |
if we weren't going to inline the function. The rest of the code using
this was removed.
Fixes PR9154.
llvm-svn: 124991
|
| |
|
|
| |
llvm-svn: 124990
|
| |
|
|
|
|
| |
resulting pointer type both have the same size.
llvm-svn: 124987
|
| |
|
|
| |
llvm-svn: 124961
|
| |
|
|
| |
llvm-svn: 124930
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a) Making it a per call site bonus for functions that we can move from
indirect to direct calls.
b) Reduces the bonus from 500 to 100 per call site.
c) Subtracts the size of the possible newly inlineable call from the
bonus to only add a bonus if we can inline a small function to devirtualize
it.
Also changes the bonus from a positive that's subtracted to a negative
that's added.
Fixes the remainder of rdar://8546196 by reducing the object file size
after inlining by 84%.
llvm-svn: 124916
|
| |
|
|
|
|
|
|
|
|
| |
auto-simplifier). This has a big impact on Ada code, but not much else.
Unfortunately the impact is mostly negative! This is due to PR9004 (aka
SCCP failing to resolve conditional branch conditions in the destination
blocks of the branch), in which simple correlated expressions are not
resolved but complicated ones are, so simplifying has a bad effect!
llvm-svn: 124788
|
| |
|
|
| |
llvm-svn: 124759
|
| |
|
|
| |
llvm-svn: 124755
|
| |
|
|
| |
llvm-svn: 124752
|
| |
|
|
|
|
|
|
| |
overflow (nsw flag), which was disabled because it breaks 254.gap. I have
informed the GAP authors of the mistake in their code, and arranged for the
testsuite to use -fwrapv when compiling this benchmark.
llvm-svn: 124746
|
| |
|
|
|
|
|
| |
pattern matching can also pattern match undef, creating a more uniform
style.
llvm-svn: 124657
|
| |
|
|
| |
llvm-svn: 124656
|
| |
|
|
| |
llvm-svn: 124655
|
| |
|
|
| |
llvm-svn: 124641
|
| |
|
|
|
|
| |
by PR9088 fixes things.
llvm-svn: 124561
|
| |
|
|
|
|
|
|
|
|
|
|
| |
knows how
to do this and more, but would only do it if X/Y had only one use. Spotted as the
most common missed simplification in SPEC by my auto-simplifier, now that it knows
about nuw/nsw/exact flags. This removes a bunch of multiplications from 447.dealII
and 483.xalancbmk. It also removes a lot from tramp3d-v4, which results in much
more inlining.
llvm-svn: 124560
|
| |
|
|
| |
llvm-svn: 124544
|
| |
|
|
| |
llvm-svn: 124534
|
| |
|
|
| |
llvm-svn: 124533
|
| |
|
|
|
|
|
|
|
|
| |
Modified patch by Adam Preuss.
This builds on the existing framework for block tracing, edge profiling and optimal edge profiling.
See -help-hidden for new flags.
For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs.
llvm-svn: 124515
|
| |
|
|
| |
llvm-svn: 124497
|
| |
|
|
|
|
|
|
| |
basically
zero effect on the testsuite (it improves two Ada testcases).
llvm-svn: 124496
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
benchmarks, and that it can be simplified to X/Y. (In general you can only
simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the
form "X/Y" then this is the case). This patch implements that transform and
moves some Div logic out of instcombine and into InstructionSimplify.
Unfortunately instcombine gets in the way somewhat, since it likes to change
(X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too.
Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y"
does not overflow, because the flag says so, so I added that logic too. This
eliminates a bunch of divisions and subtractions in 447.dealII, and has good
effects on some other benchmarks too. It seems to have quite an effect on
tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions
changed, resulting in massive changes all over.
llvm-svn: 124487
|
| |
|
|
| |
llvm-svn: 124312
|
| |
|
|
|
|
| |
which is more efficient than countPopulation - use it.
llvm-svn: 124283
|
| |
|
|
|
|
|
| |
doesn't return immediately after then the insert position in UniqueSCEVs will
be out of date. No test because this is a memory corruption issue. Fixes PR9051!
llvm-svn: 124282
|
| |
|
|
|
|
|
|
|
| |
a few loops accordingly. Should be no functional change.
This is a step for more accurate cost/benefit analysis of devirt/inlining
bonuses.
llvm-svn: 124275
|
| |
|
|
| |
llvm-svn: 124260
|
| |
|
|
| |
llvm-svn: 124188
|
| |
|
|
| |
llvm-svn: 124184
|
| |
|
|
|
|
|
|
|
|
|
| |
optimized code are:
(non-negative number)+(power-of-two) != 0 -> true
and
(x | 1) != 0 -> true
Instcombine knows about the second one of course, but only does it if X|1
has only one use. These fire thousands of times in the testsuite.
llvm-svn: 124183
|
| |
|
|
|
|
| |
rather than interspersed. No functional change.
llvm-svn: 124168
|
| |
|
|
|
|
|
|
|
|
|
| |
with BasicAA's DecomposeGEPExpression, which recently began
using a TargetData. This fixes PR8968, though the testcase
is awkward to reduce.
Also, update several off GetUnderlyingObject's users
which happen to have a TargetData handy to pass it in.
llvm-svn: 124134
|
| |
|
|
| |
llvm-svn: 124132
|
| |
|
|
| |
llvm-svn: 124126
|
| |
|
|
|
|
| |
robust against smarter optimizations, using the power of FileCheck.
llvm-svn: 124081
|
| |
|
|
|
|
|
|
|
|
| |
clang's -Wuninitialized-experimental warning.
While these don't look like real bugs, clang's
-Wuninitialized-experimental analysis is stricter
than GCC's, and these fixes have the benefit
of being general nice cleanups.
llvm-svn: 124073
|
| |
|
|
| |
llvm-svn: 124062
|
| |
|
|
|
|
| |
"make check" alone.
llvm-svn: 124046
|
| |
|
|
|
|
| |
that we can change from indirect to direct.
llvm-svn: 124045
|
| |
|
|
|
|
|
|
| |
target function.
Fixes part of rdar://8546196
llvm-svn: 124044
|