| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
| |
If we can show that the base pointers of two GEPs don't alias each other using
precise analysis and the indices and base offset are equal then the two GEPs
also don't alias each other.
This is primarily needed for the follow up patch that analyses NoAlias'ing PHI
nodes.
Part 1/2 of fix for PR13564.
llvm-svn: 163317
|
|
|
|
|
|
|
|
| |
It relies on clear() being fast and the cache rarely has more than 1 or 2
elements, so give it an inline capacity and always shrink it back down in case
it grows. DenseMap will grow to 64 buckets which makes clear() a lot slower.
llvm-svn: 163215
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This disables malloc-specific optimization when -fno-builtin (or -ffreestanding)
is specified. This has been a problem for a long time but became more severe
with the recent memory builtin improvements.
Since the memory builtin functions are used everywhere, this required passing
TLI in many places. This means that functions that now have an optional TLI
argument, like RecursivelyDeleteTriviallyDeadFunctions, won't remove dead
mallocs anymore if the TLI argument is missing. I've updated most passes to do
the right thing.
Fixes PR13694 and probably others.
llvm-svn: 162841
|
|
|
|
|
|
|
|
|
|
|
|
| |
- provide more extensive set of functions to detect library allocation functions (e.g., malloc, calloc, strdup, etc)
- provide an API to compute the size and offset of an object pointed by
Move a few clients (GVN, AA, instcombine, ...) to the new API.
This implementation is a lot more aggressive than each of the custom implementations being replaced.
Patch reviewed by Nick Lewycky and Chandler Carruth, thanks.
llvm-svn: 158919
|
|
|
|
|
|
| |
defaults to the ABI alignment. Given that, make this code a bit more aggressive in such cases.
llvm-svn: 151584
|
|
|
|
|
|
| |
object given sufficient alignment. Fixes PR12098.
llvm-svn: 151553
|
|
|
|
|
|
| |
function that others can use, next to llvm::isIdentifiedObject.
llvm-svn: 151446
|
|
|
|
|
|
|
|
| |
actually work, at least as described. LLVM Metadata is not
intended to suppress LLVM IR rules, as it can be stripped at
any time.
llvm-svn: 150821
|
|
|
|
|
|
|
|
| |
Suggested in code review by Eli.
That code in InstCombine looks kinda suspicious.
llvm-svn: 145013
|
|
|
|
|
|
| |
with this patch.
llvm-svn: 141333
|
|
|
|
|
|
| |
implementation correctly while checking nocapture calls.
llvm-svn: 140666
|
|
|
|
| |
llvm-svn: 139277
|
|
|
|
|
|
| |
variable differences so that it actually does something sane. Fixes PR10881.
llvm-svn: 139276
|
|
|
|
|
|
| |
to that effect.
llvm-svn: 139205
|
|
|
|
|
|
| |
Fixes PR10872 and <rdar://problem/10065079>.
llvm-svn: 139204
|
|
|
|
|
|
| |
C++0x.
llvm-svn: 136211
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
|
|
|
|
| |
default, since it usually has very few elements. This speeds up
alias queries in many cases, because AliasCache.clear() doesn't
have to visit as many buckets.
llvm-svn: 132862
|
|
|
|
|
|
| |
is disabled.
llvm-svn: 132632
|
|
|
|
| |
llvm-svn: 132625
|
|
|
|
|
|
| |
it exposed are fixed.
llvm-svn: 132611
|
|
|
|
|
|
|
|
|
| |
queries in the case of a DAG, where a query reaches a node
visited earlier, but it's not on a cycle. This avoids
MayAlias results in cases where BasicAA is expected to
return MustAlias or PartialAlias in order to protect TBAA.
llvm-svn: 132609
|
|
|
|
|
|
| |
of conservatively choosing MayAlias.
llvm-svn: 132579
|
|
|
|
|
|
|
|
| |
after checking for a GEP, so that it matches what GetUnderlyingObject
does. This fixes an obscure bug turned up by bugpoint in the testcase
for PR9931.
llvm-svn: 131971
|
|
|
|
|
|
|
|
| |
miscompilation of
UnitTests/ObjC/messages-2.m with the recent optimizer improvements.
llvm-svn: 131897
|
|
|
|
|
|
|
|
|
| |
Original log message:
When BasicAA can determine that two pointers have the same base but
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131809
|
|
|
|
|
|
|
| |
differ by a dynamic offset, return PartialAlias instead of MayAlias.
See the comment in the code for details. This fixes PR9971.
llvm-svn: 131781
|
|
|
|
| |
llvm-svn: 130327
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
| |
llvm-svn: 128149
|
|
|
|
|
|
| |
and whose address is never taken is a non-escaping local object and can't alias anything else.
llvm-svn: 128140
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
are pointing to the same object, one pointer is accessing the entire
object, and the other is access has a non-zero size. This prevents
TBAA from kicking in and saying NoAlias in such cases.
llvm-svn: 123775
|
|
|
|
|
|
| |
exposed. It turns out to be a latent bug in basicaa, scary.
llvm-svn: 122772
|
|
|
|
|
|
| |
it in sync.
llvm-svn: 121895
|
|
|
|
|
|
|
| |
function so that it can live in Analysis instead of
VMCore.
llvm-svn: 121885
|
|
|
|
|
|
| |
memdep is updated to handle it.
llvm-svn: 121725
|
|
|
|
| |
llvm-svn: 121573
|
|
|
|
| |
llvm-svn: 121520
|
|
|
|
|
|
|
|
| |
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method
trunc(), to be const and to return a new value instead of modifying the
object in place.
llvm-svn: 121120
|
|
|
|
|
|
| |
queried location doesn't overlap the source, and add a testcase.
llvm-svn: 120370
|
|
|
|
|
|
|
|
|
|
| |
contains "ref".
Enhance DSE to use a modref query instead of a store-specific hack
to generalize the "ignore may-alias stores" optimization to handle
memset and memcpy.
llvm-svn: 120368
|
|
|
|
|
|
| |
chaining and simplify FunctionAttrs' GetModRefBehavior logic.
llvm-svn: 118660
|
|
|
|
|
|
|
| |
pointsToConstantMemory code to guard against possible
compile time slowdowns.
llvm-svn: 118440
|
|
|
|
|
|
|
|
|
|
|
|
| |
to optionally look for constant or local (alloca) memory.
Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select
and Phi nodes, and to support looking for local memory.
Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that
AliasAnalysis knows all the tricks that it knew.
llvm-svn: 118412
|
|
|
|
|
|
| |
to analyze intrinsic functions.
llvm-svn: 118409
|
|
|
|
|
|
|
| |
it doesn't have a special relationship with BasicAliasAnalysis
anymore.
llvm-svn: 116876
|
|
|
|
|
|
| |
uint64_t, plus fixes for places I missed before.
llvm-svn: 116875
|
|
|
|
| |
llvm-svn: 116858
|
|
|
|
|
|
| |
for representing object sizes, for consistency with other parts of LLVM.
llvm-svn: 116831
|