| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
elimination on them too.
llvm-svn: 142735
|
|
|
|
|
|
|
|
| |
dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases.
Patch by Xiaoyi Guo.
llvm-svn: 141896
|
|
|
|
| |
llvm-svn: 139571
|
|
|
|
|
|
| |
the end of a function), now with less deleting stores before memcpy's.
llvm-svn: 139150
|
|
|
|
| |
llvm-svn: 138829
|
|
|
|
|
|
| |
function, encountering an unrelated store should not cause us to give up like encountering a load does.
llvm-svn: 138809
|
|
|
|
| |
llvm-svn: 137888
|
|
|
|
| |
llvm-svn: 136205
|
|
|
|
| |
llvm-svn: 135375
|
|
|
|
|
|
| |
dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions.
llvm-svn: 133031
|
|
|
|
|
|
| |
Luis Felipe Strano Moraes!
llvm-svn: 129558
|
|
|
|
|
|
|
|
|
|
|
|
| |
that one of the numbers is signed while the other is unsigned. This could lead
to a wrong result when the signed was promoted to an unsigned int.
* Add the data layout line to the testcase so that it will test the appropriate
thing.
Patch by David Terei!
llvm-svn: 128577
|
|
|
|
|
|
|
|
| |
SmallPtrSet.
Fixes PR9569 and will hopefully make selfhost on ASLR-enabled systems more deterministic.
llvm-svn: 128482
|
|
|
|
| |
llvm-svn: 128333
|
|
|
|
|
|
|
|
|
|
|
| |
There are two ways that a later store can comletely overlap a previous store:
1. They both start at the same offset, but the earlier store's size is <= the
later's size, or
2. The earlier store's offset is > the later's offset, but it's offset + size
doesn't extend past the later's offset + size.
llvm-svn: 128332
|
|
|
|
|
|
|
| |
completely overlaps a previous store, thus mistakenly deleting that store. Check
for this condition.
llvm-svn: 128319
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
dominance and post-dominance frontiers.
llvm-svn: 123725
|
|
|
|
|
|
|
| |
function so that it can live in Analysis instead of
VMCore.
llvm-svn: 121885
|
|
|
|
| |
llvm-svn: 121040
|
|
|
|
| |
llvm-svn: 121038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
memcpy's like:
memcpy(A, B)
memcpy(A, C)
we cannot delete the first memcpy as dead if A and C might be aliases.
If so, we actually get:
memcpy(A, B)
memcpy(A, A)
which is not correct to transform into:
memcpy(A, A)
This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks
Jakub!
llvm-svn: 120974
|
|
|
|
| |
llvm-svn: 120498
|
|
|
|
|
|
|
|
| |
may-aliasing stores that partially overlap with different base
pointers. This implements PR6043 and the non-variable part of
PR8657
llvm-svn: 120485
|
|
|
|
| |
llvm-svn: 120471
|
|
|
|
|
|
|
| |
the code. We now get accurate sizes on Loads, though it surely doesn't
matter in practice.
llvm-svn: 120469
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. if the underlying pointer passed in can be resolved
to any argument or alloca, then we don't need to scan.
Previously we would only avoid the scan if the alloca
or byval was actually considered dead.
2. The dead store processing code is itself completely
dead and didn't handle volatile stores right anyway,
so delete it. This allows simplifying the interface
to RemoveAccessedObjects.
llvm-svn: 120467
|
|
|
|
|
|
|
|
| |
made sense to me. We now have a set of dead stack objects, and
they become live when loaded. Fix a theoretical problem where
we'd pass in the wrong pointer to the alias query.
llvm-svn: 120465
|
|
|
|
|
|
|
|
| |
If the call might read all the allocas, stop scanning early.
Convert a vector to smallvector, shrink SmallPtrSet to 16 instead
of 64 to avoid crazy linear scans.
llvm-svn: 120463
|
|
|
|
| |
llvm-svn: 120454
|
|
|
|
|
|
| |
AA and MD pass info instead of using getAnalysis<> all over.
llvm-svn: 120453
|
|
|
|
| |
llvm-svn: 120452
|
|
|
|
|
|
|
| |
now that DSE hacks on them. This fixes a regression I introduced,
by generalizing DSE to hack on transfers.
llvm-svn: 120445
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
about pairs of AA::Location's instead of looking for MemDep's
"Def" predicate. This is more powerful and general, handling
memset/memcpy/store all uniformly, and implementing PR8701 and
probably obsoleting parts of memcpyoptimizer.
This also fixes an obscure bug with init.trampoline and i8
stores, but I'm not surprised it hasn't been hit yet. Enhancing
init.trampoline to carry the size that it stores would allow
DSE to be much more aggressive about optimizing them.
llvm-svn: 120406
|
|
|
|
| |
llvm-svn: 120391
|
|
|
|
|
|
| |
remove an actively-wrong comment.
llvm-svn: 120378
|
|
|
|
|
|
|
| |
It can be seriously improved, but at least now it isn't intertwined
with the other logic.
llvm-svn: 120377
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
stores, fix and add a testcase.
llvm-svn: 120363
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Don't bother trying to optimize:
lifetime.end(ptr)
store(ptr)
as it is undefined, and therefore shouldn't exist.
2. Move the 'storing a loaded pointer' xform up, simplifying
the may-aliased store code.
llvm-svn: 120359
|
|
|
|
| |
llvm-svn: 120325
|
|
|
|
| |
llvm-svn: 119927
|
|
|
|
|
|
|
| |
one store dead. This is especially noticeable in
SingleSource/Benchmarks/Shootout/objinst.
llvm-svn: 118875
|
|
|
|
|
|
| |
uint64_t, plus fixes for places I missed before.
llvm-svn: 116875
|
|
|
|
| |
llvm-svn: 116858
|
|
|
|
|
|
| |
use uint64_t.
llvm-svn: 116839
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.
Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.
I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.
llvm-svn: 116820
|
|
|
|
| |
llvm-svn: 116815
|
|
|
|
|
|
|
|
|
| |
perform initialization without static constructors AND without explicit initialization
by the client. For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve. I hope to be able to relax
the latter requirement in the future.
llvm-svn: 116334
|
|
|
|
| |
llvm-svn: 115996
|