History log of /external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3be7584f40cc822252e613af0c42dcb17e6a5d05 09-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> DSE: Poking holes into a SetVector is expensive, avoid it if possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8e0d1c03ca7fd86e6879b4e37d0d7f0e982feef6 29-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Make MemoryBuiltins aware of TargetLibraryInfo.

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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
750d7616c6d9ed5a40de1ac8f74fb40afd82ebc6 14-Aug-2012 Craig Topper <craig.topper@gmail.com> Change greater than to greater than or equal so that an identical sized store to the same offset is treated as completing overwriting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1b88fc012240d10af5a80571aa8def36796f7b18 08-Aug-2012 Eli Friedman <eli.friedman@gmail.com> isAllocLikeFn is allowed to return true for functions which read memory; make
sure we account for that correctly in DeadStoreElimination. Fixes a regression
from r158919. PR13547.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a94d6e87c4c49f2e81b01d66d8bfb591277f8f96 24-Jul-2012 Nadav Rotem <nadav.rotem@intel.com> Clean whitespaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9e72a79ef4a9fcda482ce0b0e1f0bd6a4f16cffd 21-Jun-2012 Nuno Lopes <nunoplopes@sapo.pt> refactor the MemoryBuiltin analysis:
- 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
6e406d8f11307474bbfb8bd464f7b1a71876f9a3 16-Jun-2012 Evan Cheng <evan.cheng@apple.com> It's not deterministic to iterate over SmallPtrSet. Replace it with SmallSetVector. Patch by Daniel Reynaud. rdar://11671029

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b401e3bd16c3d648464606d5e5b496dd61d12afc 10-May-2012 Dan Gohman <gohman@apple.com> Teach DeadStoreElimination to eliminate exit-block stores with phi addresses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e54874471cf565bbacdca69c95ae7287badc578f 10-May-2012 Nuno Lopes <nunoplopes@sapo.pt> teach DSE and isInstructionTriviallyDead() about calloc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9e1154cf5b268b1036ad7611cd249647a76efb49 28-Feb-2012 Pete Cooper <peter_cooper@apple.com> Reverted r152620 - DSE: Shorten memset when a later store overwrites the start of it. There were all sorts of buildbot issues

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151621 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a116623e06d0cf833cbefd4921dbca8581f1c806 28-Feb-2012 Pete Cooper <peter_cooper@apple.com> DSE: Shorten memset when a later store overwrites the start of it

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
858143816d43e58b17bfd11cb1b57afbd7f0f893 07-Feb-2012 Craig Topper <craig.topper@gmail.com> Convert assert(0) to llvm_unreachable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c9b98ad7a7c3f2c098657a077a995912dce033e3 08-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Fix infinite loop in DSE when deleting a free in a reachable loop that's also
trivially infinite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
de2e27cc52a9e47e0261dda6dfb54a32eefa90a0 03-Dec-2011 Pete Cooper <peter_cooper@apple.com> Fixed deadstoreelimination bug where negative indices were incorrectly causing the optimisation to occur

Turns out long long + unsigned long long is unsigned. Doh!

Fixes http://llvm.org/bugs/show_bug.cgi?id=11455

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ae10dd2859a3729e3518f043cf252dc8676ed165 16-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Merge isObjectPointerWithTrustworthySize with getPointerSize. Use it when
looking at the size of the pointee. Fixes PR11390!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c7e5a6a2c69ee2552242da2a70775acd7d8819ae 10-Nov-2011 Pete Cooper <peter_cooper@apple.com> Fixed bug in DeadStoreElimination commit r144239

Size of data being pointed to wasn't always being checked so some small writes were killing big writes

Fixes <rdar://problem/10426753>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5ccb0825ed1bdf6271ef451b8239e86d4ff635b1 10-Nov-2011 Pete Cooper <peter_cooper@apple.com> DeadStoreElimination can now trim the size of a store if the end of the store is dead.

Currently checks alignment and killing stores on a power of 2 boundary as this is likely
to trim the size of the earlier store without breaking large vector stores into scalar ones.

Fixes <rdar://problem/10140300>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
336b88dac8054d6ed6cda6d6198b7d4bb026b3e1 05-Nov-2011 Nick Lewycky <nicholas@mxc.ca> Do simple cross-block DSE when we encounter a free statement. Fixes PR11240.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
28eb1c5217416aa60b06b8b569a5de8047f75514 04-Nov-2011 Daniel Dunbar <daniel@zuster.org> Speculatively revert "DeadStoreElimination can now trim the size of a store if
the end of it is dead.", which appears to break bootstrapping LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
2d32b86543aa857a07371a93766652510f1cc0d6 03-Nov-2011 Pete Cooper <peter_cooper@apple.com> DeadStoreElimination can now trim the size of a store if the end of it is dead.

Only currently done if the later store is writing to a power of 2 address or
has the same alignment as the earlier store as then its likely to not break up
large stores into smaller ones

Fixes <rdar://problem/10140300>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143630 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4d882aae2acc5194b47385c7cb2e0e9ddd202927 22-Oct-2011 Nick Lewycky <nicholas@mxc.ca> A non-escaping malloc in the entry block is not unlike an alloca. Do dead-store
elimination on them too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b414142036012dd9432c4e8c5fef09d4d49fcc22 14-Oct-2011 Eli Friedman <eli.friedman@gmail.com> Enhance the memdep interface so that users can tell the difference between a 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1582e7f1e255c19595f82cb447e52869196dec58 13-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Add comment to clarify the behavior of a helper in DSE.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
81856f7313cb8cd64e0c3746ebcc3337ade9e5ee 06-Sep-2011 Owen Anderson <resistor@mac.com> Try again at r138809 (make DSE more aggressive in removing dead stores at the end of a function), now with less deleting stores before memcpy's.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
54c4735db3f973a85bc73e0a231f00ab18762c54 30-Aug-2011 Owen Anderson <resistor@mac.com> Speculatively revert r138809 in an attempt to fix DragonEgg.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
6e4be237b076168167ad21d7cb46a70c17c59f5f 30-Aug-2011 Owen Anderson <resistor@mac.com> When walking backwards to eliminate final stores to allocas at the end of a function, encountering an unrelated store should not cause us to give up like encountering a load does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
56efe24431b045be120d1fd5f6b0aa43a6b01c48 18-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Atomic load/store handling for the passes using memdep (GVN, DSE, memcpyopt).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8a552bb85a5e9a6c250c0a899941fbd3ae7b5006 27-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Misc mid-level changes for new 'fence' instruction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a990e071f2f29ba326b97a4288207a2c406c5b66 15-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Add "unknown" results for memdep, which mean "I don't know whether a 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7a2bdde0a0eebcd2125055e0eacaca040f0b766c 15-Apr-2011 Chris Lattner <sabre@nondot.org> Fix a ton of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
31d244ead52171632cc4649623b426dbea27040a 30-Mar-2011 Bill Wendling <isanbard@gmail.com> * The DSE code that tested for overlapping needed to take into account the fact
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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ec3f22782058058a712ae8e8313e25a273396824 29-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> DSE: Remove an early exit optimization that depended on the ordering of a SmallPtrSet.

Fixes PR9569 and will hopefully make selfhost on ASLR-enabled systems more deterministic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1a4d58af0923123b655a6c0c553c62a266e1ebbc 26-Mar-2011 Bill Wendling <isanbard@gmail.com> Simplification noticed by Frits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
150c4a1a89478f36af776f9146288afd528b33da 26-Mar-2011 Bill Wendling <isanbard@gmail.com> Rework the logic that determines if a store completely overlaps an ealier store.

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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e420449e80191051d6d1636883f2400cb0a8ace5 26-Mar-2011 Bill Wendling <isanbard@gmail.com> PR9561: A store with a negative offset (via GEP) could erroniously say that it
completely overlaps a previous store, thus mistakenly deleting that store. Check
for this condition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
bd1801b5553c8be3960255a92738464e0010b6f6 24-Jan-2011 Dan Gohman <gohman@apple.com> Give GetUnderlyingObject a TargetData, to keep it in sync
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
301278719b67dcdd1159d9f91b4db5ef57f025c6 18-Jan-2011 Cameron Zwarich <zwarich@apple.com> Remove code for updating dominance frontiers and some outdated references to
dominance and post-dominance frontiers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5034dd318a9dfa0dc45a3ac01e58e60f2aa2498d 15-Dec-2010 Dan Gohman <gohman@apple.com> Move Value::getUnderlyingObject to be a standalone
function so that it can live in Analysis instead of
VMCore.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
29d8d6b039fff0d7bed81f72b8432f9e9bd5df33 06-Dec-2010 Chris Lattner <sabre@nondot.org> Use a stronger predicate here, pointed out by Duncan


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a9d4da85d6136d42648884de45d3dbda4725ee84 06-Dec-2010 Chris Lattner <sabre@nondot.org> add some DEBUG statements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
cc10244d7725f191bdc91cd62befff0c97257c7b 06-Dec-2010 Chris Lattner <sabre@nondot.org> Fix PR8728, a miscompilation I recently introduced. When optimizing
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!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3161ae18670e2b66aa4a7bf4805b32ca6aff1757 01-Dec-2010 Chris Lattner <sabre@nondot.org> Enhance DSE to handle the variable index case in PR8657.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120498 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a04096580a65b6cfbe12dabf6d695f7303750c0d 01-Dec-2010 Chris Lattner <sabre@nondot.org> teach DSE to use GetPointerBaseWithConstantOffset to analyze
may-aliasing stores that partially overlap with different base
pointers. This implements PR6043 and the non-variable part of
PR8657


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7c80c15a8bc5ac24b1c7651344a22d62e4308c14 30-Nov-2010 Chris Lattner <sabre@nondot.org> Make DeleteDeadInstruction be a static function, move some code around.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120471 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
d8d35316dee5e642c976ff0984ce316cbe57cc4c 30-Nov-2010 Chris Lattner <sabre@nondot.org> switch RemoveAccessedObjects to use AliasAnalysis::Location to simplify
the code. We now get accurate sizes on Loads, though it surely doesn't
matter in practice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
42cb684f8d8440ffd79415280dcb7676d0b5f29a 30-Nov-2010 Chris Lattner <sabre@nondot.org> two improvements to RemoveAccessedObjects:
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5fb0fb397caeb711bbaf387e5d46f96856c14b5b 30-Nov-2010 Chris Lattner <sabre@nondot.org> remove the "undead" terminology, which is nonstandard and never
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
86dc6c08cf72668b433ad207cf42cdd9a8fe822a 30-Nov-2010 Chris Lattner <sabre@nondot.org> move call handling in handleEndBlock up a bit, and simplify it.
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
83d675940309b2df3ab16efd50f7e90ce4ead8e7 30-Nov-2010 Chris Lattner <sabre@nondot.org> various cleanups and code simplification


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e3c611085ecb4bc1f30f445e6b1eb736cf29fee1 30-Nov-2010 Chris Lattner <sabre@nondot.org> make getPointerSize a static function. Add ivars to DSE for
AA and MD pass info instead of using getAnalysis<> all over.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
98016511932510bd5ec5dad1319922d9daf18991 30-Nov-2010 Chris Lattner <sabre@nondot.org> reduce indentation, clean up TD use a bit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
55ee75d57114c17460d364121a2ec3a5cf40e1d2 30-Nov-2010 Chris Lattner <sabre@nondot.org> enhance isRemovable to refuse to delete volatile mem transfers
now that DSE hacks on them. This fixes a regression I introduced,
by generalizing DSE to hack on transfers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
cf82dc376a11acb1b5d46d56c032bb0b9326c682 30-Nov-2010 Chris Lattner <sabre@nondot.org> Rewrite the main DSE loop to be written in terms of reasoning
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
bbdc3703a37c2be32ed23d4bb1b1e2bb14780643 30-Nov-2010 Chris Lattner <sabre@nondot.org> rename a function and reduce some indentation, no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
72987a274223e64482d8697b948e1c13a448198d 30-Nov-2010 Chris Lattner <sabre@nondot.org> rename doesClobberMemory -> hasMemoryWrite to be more specific, and
remove an actively-wrong comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120378 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1ab4285b721a412692e96a493ef4f2b9223902f9 30-Nov-2010 Chris Lattner <sabre@nondot.org> clean up handling of 'free', detangling it from everything else.
It can be seriously improved, but at least now it isn't intertwined
with the other logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
201d1e56bb7535802c70d5eb46601afcc325045d 30-Nov-2010 Chris Lattner <sabre@nondot.org> Teach basicaa that memset's modref set is at worst "mod" and never
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
184d1ba73866b688cef5f78a214e3fb964b6d833 30-Nov-2010 Chris Lattner <sabre@nondot.org> my previous patch would cause us to start deleting some volatile
stores, fix and add a testcase.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
0f53f592ad8b81bb5e28e0d0e8b9461ddfa3ae01 30-Nov-2010 Chris Lattner <sabre@nondot.org> two changes to DSE that shouldn't affect anything:

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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e9e973018aaf93dbd21b894b404e4b3a50805479 29-Nov-2010 Chris Lattner <sabre@nondot.org> fix PR8677, patch by Jakub Staszak!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120325 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f6f1f062cc8029aa75ca7d0e99fbc1e0b453d07e 21-Nov-2010 Chris Lattner <sabre@nondot.org> implement PR8576, deleting dead stores with intervening may-alias stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
720a2ed6d99d5665cc1601426353c84cc76fffbb 12-Nov-2010 Dan Gohman <gohman@apple.com> Enhance DSE to handle the case where a free call makes more than
one store dead. This is especially noticeable in
SingleSource/Benchmarks/Shootout/objinst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3da848bbda62b25c12335998aaa44ab361f0bf15 20-Oct-2010 Dan Gohman <gohman@apple.com> Reapply r116831 and r116839, converting AliasAnalysis to use
uint64_t, plus fixes for places I missed before.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1db839e73471a40309c2c10873b67c3b5b1b7a7b 19-Oct-2010 Dan Gohman <gohman@apple.com> Revert r116831 and r116839, which are breaking selfhost builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9cb4c7f87876ec8212bd4fae059553fcaa83f484 19-Oct-2010 Dan Gohman <gohman@apple.com> Oops, check in all the files for converting AliasAnalysis to
use uint64_t.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116839 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
081c34b725980f995be9080eaec24cd3dfaaf065 19-Oct-2010 Owen Anderson <resistor@mac.com> Get rid of static constructors for pass registration. Instead, every pass 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f3a925dc7a14ade42da442b49c304c064954c1d4 19-Oct-2010 Dan Gohman <gohman@apple.com> Consistently use AliasAnalysis::UnknownSize instead of hardcoding ~0u.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116815 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
2ab36d350293c77fc8941ce1023e4899df7e3a82 12-Oct-2010 Owen Anderson <resistor@mac.com> Begin adding static dependence information to passes, which will allow us to
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ce665bd2e2b581ab0858d1afe359192bac96b868 08-Oct-2010 Owen Anderson <resistor@mac.com> Now with fewer extraneous semicolons!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
90c579de5a383cee278acc3f7e7b9d0a656e6a35 06-Aug-2010 Owen Anderson <resistor@mac.com> Reapply r110396, with fixes to appease the Linux buildbot gods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1f74590e9d1b9cf0f1f81a156efea73f76546e05 06-Aug-2010 Owen Anderson <resistor@mac.com> Revert r110396 to fix buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9ccaf53ada99c63737547c0235baeb8454b04e80 06-Aug-2010 Owen Anderson <resistor@mac.com> Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
d09475c2269ca822620e2e561af62d0a8aec7b1e 28-Jul-2010 Gabor Greif <ggreif@gmail.com> use Value* constructor of CallSite to create potentially improper site, and test that

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
d13db2c59cc94162d6cf0a04187d408bfef6d4a7 22-Jul-2010 Owen Anderson <resistor@mac.com> Fix batch of converting RegisterPass<> to INTIALIZE_PASS().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8c1ffae068110f1ea53cd4898eeda2da30f9a305 02-Jul-2010 Dan Gohman <gohman@apple.com> Don't claim to preserve AliasAnalysis. First, this is doesn't actually
have any effect, and second, deleting stores can potentially invalidate
an AliasAnalysis, and there's currently no notification for this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7f1d7f5779e266cf1de8f3b4d7025f7f7f8eba85 25-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand API; tighten type of handleFreeWithNonTrivialDependency to be able to use isFreeCall whithout a cast or new overload

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3ccbb22eaf3f0deebc15ff7be992f090a6f0ba0b 24-Jun-2010 Gabor Greif <ggreif@gmail.com> use ArgOperand API; introduce downcasted pointers into scope to facilitate this

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
fe60104ac97f3a8736dcfbfdf9547c7b7cc7b951 22-Jun-2010 Dan Gohman <gohman@apple.com> Use pre-increment instead of post-increment when the result is not used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
551754c4958086cc6910da7c950f2875e212f5cf 17-Apr-2010 Eric Christopher <echristo@apple.com> Revert 101465, it broke internal OpenGL testing.

Probably the best way to know that all getOperand() calls have been handled
is to replace that API instead of updating.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4ec2258ffb495d7ce00177e447740ef1123a27db 16-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101434
with a fix for self-hosting

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
607a7ab3da72a2eb53553a520507cbb8068dd1d8 16-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101423 and r101397, they break llvm-gcc self-host on darwin10

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
2ff961f66816daab8bbc58a19025161d969821c2 15-Apr-2010 Gabor Greif <ggreif@gmail.com> reapply r101364, which has been backed out in r101368
with a fix

rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9ee17208115482441953127615231c59a2f4d052 15-Apr-2010 Gabor Greif <ggreif@gmail.com> back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
165dac08d1bb8428b32a5f39cdd3dbee2888987f 15-Apr-2010 Gabor Greif <ggreif@gmail.com> rotate CallInst operands, i.e. move callee to the back
of the operand array

the motivation for this patch are laid out in my mail to llvm-commits:
more efficient access to operands and callee, faster callgraph-construction,
smaller compiler binary


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
98df4f9cf2dea81af1cc2e68f23b285d22cebc6a 11-Feb-2010 Chris Lattner <sabre@nondot.org> Make DSE only scan blocks that are reachable from the entry
block. Other blocks may have pointer cycles that will crash
basicaa and other alias analyses. In any case, there is no
point wasting cycles optimizing dead blocks. This fixes
rdar://7635088


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
321a813c536e2f1f2f05bbe78a7fbf64046f0557 05-Jan-2010 Dan Gohman <gohman@apple.com> Use do+while instead of while for loops which obviously have a
non-zero trip count. Use SmallVector's pop_back_val().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
cccbe7e4156884c6483b548997eea02bcf8b748e 03-Jan-2010 Nick Lewycky <nicholas@mxc.ca> Small cleanups, refactor some duplicated code into a single method. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
65a9ab4f8f75216f92a06ac2fe84d16ed7f0ccae 02-Dec-2009 Chris Lattner <sabre@nondot.org> formatting cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
650c64383e04e9f833cabb144fdb4480772f5a27 10-Nov-2009 Duncan Sands <baldrick@free.fr> Add defensive break.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e3f749b166be81544d364756032421e8c834a079 10-Nov-2009 Duncan Sands <baldrick@free.fr> Fix obvious typo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
710c37c494229334f59b9be328366807db2a7d01 10-Nov-2009 Duncan Sands <baldrick@free.fr> Teach DSE to eliminate useless trampolines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7cef1781761cff766320e3e904542ad02466d735 10-Nov-2009 Nick Lewycky <nicholas@mxc.ca> Simplify.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
58571d663c8c7d57fae1054d21686d8c8a7c8a7a 10-Nov-2009 Nick Lewycky <nicholas@mxc.ca> Reapply r86359, "Teach dead store elimination that certain intrinsics write to
memory just like a store" with bug fixed (partial-overwrite.ll is the
regression test).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1d95725d60ca1c77a202a78a62f552ff8a1b116a 07-Nov-2009 Chris Lattner <sabre@nondot.org> Revert r86359, it is breaking the self host on the
llvm-gcc-i386-darwin9 build bot.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4de9b7f51f81acbc36e9fd17042b14bb40149c6c 07-Nov-2009 Nick Lewycky <nicholas@mxc.ca> Teach dead store elimination that certain intrinsics write to memory just like
a store.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86359 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
40dd12e7080c5df253fd70b468368e3144a43c0c 05-Nov-2009 Chris Lattner <sabre@nondot.org> improve DSE when TargetData is not around, based on work by
Hans Wennborg!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b62f792e78df12a43029352eb4c7cde9d456c67e 28-Oct-2009 Owen Anderson <resistor@mac.com> Treat lifetime begin/end markers as allocations/frees respectively for the
purposes for GVN/DSE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f006b183e2d2bebcf6968d1dd7350397c95b0325 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Rename MallocFreeHelper as MemoryBuiltins

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f2becca90b832cc02345fba063b9b439b2be33ad 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Rename MallocHelper as MallocFreeHelper, since it now also identifies calls to free()

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
046e78ce55a7c3d82b7b6758d2d77f2d99f970bf 27-Oct-2009 Victor Hernandez <vhernandez@apple.com> Remove FreeInst.
Remove LowerAllocations pass.
Update some more passes to treate free calls just like they were treating FreeInst.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
66284e063a1e46500acae48bdc0e4a00652021d1 24-Oct-2009 Victor Hernandez <vhernandez@apple.com> Auto-upgrade free instructions to calls to the builtin free function.
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
40ef630a4626365faeef8696f611e18d1a69f63a 02-Sep-2009 Chris Lattner <sabre@nondot.org> fix PR4815: some cases where DeleteDeadInstruction can delete
the instruction BBI points to.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3e8b6631e67e01e4960a7ba4668a50c596607473 02-Sep-2009 Chris Lattner <sabre@nondot.org> eliminate VISIBILITY_HIDDEN from Transforms/Scalar. PR4861


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
731b5d97be37b5d9c283ced9e0d1fb17f8020a74 24-Jul-2009 Dan Gohman <gohman@apple.com> Fix this condition I accidentally inverted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
02a436c48ecff9e34d50ce0a2f861e5acdd9bf3f 24-Jul-2009 Dan Gohman <gohman@apple.com> Convert several more passes to use getAnalysisIfAvailable<TargetData>()
instead of getAnalysis<TargetData>().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76982 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
777d2306b36816a53bc1ae1244c0dc7d998ae691 09-May-2009 Duncan Sands <baldrick@free.fr> Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 12-Jan-2009 Duncan Sands <baldrick@free.fr> Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f760be1c7fd793e103f788687e4efdcad2464b58 07-Dec-2008 Chris Lattner <sabre@nondot.org> don't bother touching volatile stores, they will just return clobber on
everything interesting anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5e600e67b11c55c204b3eec00798badc96ed720b 06-Dec-2008 Chris Lattner <sabre@nondot.org> Reimplement the inner loop of DSE. It now uniformly uses getDependence(),
doesn't do its own local caching, and is slightly more aggressive about
free/store dse (see testcase). This eliminates the last external client
of MemDep::getDependenceFrom().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b51deb929ca95ce62e622b0475a05d83f26ab04d 05-Dec-2008 Chris Lattner <sabre@nondot.org> Make a few major changes to memdep and its clients:
1. Merge the 'None' result into 'Normal', making loads
and stores return their dependencies on allocations as Normal.
2. Split the 'Normal' result into 'Clobber' and 'Def' to
distinguish between the cases when memdep knows the value is
produced from when we just know if may be changed.
3. Move some of the logic for determining whether readonly calls
are CSEs into memdep instead of it being in GVN. This still
leaves verification that the arguments are hte same to GVN to
let it know about value equivalences in different contexts.
4. Change memdep's call/call dependency analysis to use
getModRefInfo(CallSite,CallSite) instead of doing something
very weak. This only really matters for things like DSA, but
someday maybe we'll have some other decent context sensitive
analyses :)
5. This reimplements the guts of memdep to handle the new results.
6. This simplifies GVN significantly:
a) readonly call CSE is slightly simpler
b) I eliminated the "getDependencyFrom" chaining for load
elimination and load CSE doesn't have to worry about
volatile (they are always clobbers) anymore.
c) GVN no longer does any 'lastLoad' caching, leaving it to
memdep.
7. The logic in DSE is simplified a bit and sped up. A potentially
unsafe case was eliminated.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3a76be584b6d5f85b2a5dadd21247063c0a24c30 29-Nov-2008 Chris Lattner <sabre@nondot.org> Fix a thinko that manifested as a crash on clamav last night.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5391a1d8046396fb4dd005b1910973789f5427f4 29-Nov-2008 Chris Lattner <sabre@nondot.org> Split getDependency into getDependency and getDependencyFrom, the
former does caching, the later doesn't. This dramatically simplifies
the logic in getDependency and getDependencyFrom.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4c724006256032e827177afeae04ea62436796e7 29-Nov-2008 Chris Lattner <sabre@nondot.org> Introduce and use a new MemDepResult class to hold the results of a memdep
query. This makes it crystal clear what cases can escape from MemDep that
the clients have to handle. This also gives the clients a nice simplified
interface to it that is easy to poke at.

This patch also makes DepResultTy and MemoryDependenceAnalysis::DepType
private, yay.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
39f372e23e49cecb8db2eb7120eb331173e50c74 29-Nov-2008 Chris Lattner <sabre@nondot.org> Reimplement the internal abstraction used by MemDep in terms
of a pointer/int pair instead of a manually bitmangled pointer.
This forces clients to think a little more about checking the
appropriate pieces and will be useful for internal
implementation improvements later.

I'm not particularly happy with this. After going through this
I don't think that the clients of memdep should be exposed to
the internal type at all. I'll fix this in a subsequent commit.

This has no functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5425f22fa3f8cbbcbc1a76fc7df2fa251cdc132d 28-Nov-2008 Chris Lattner <sabre@nondot.org> don't revisit instructions off the beginning of the block.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
565f96b196325e83f41a83c97bdc751e731de608 28-Nov-2008 Chris Lattner <sabre@nondot.org> simplify some code, remove escaped newline.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
925451e020781bf43b4711b2ab1122f54c68ae0b 28-Nov-2008 Chris Lattner <sabre@nondot.org> rewrite a big chunk of how DSE does recursive dead operand
elimination to use more modern infrastructure. Also do a bunch
of small cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5d0392c6b370758750b397e254a6c6f028479969 01-Oct-2008 Duncan Sands <baldrick@free.fr> Factorize code: remove variants of "strip off
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ae73dc1448d25b02cabc7c64c86c64371453dda8 04-Sep-2008 Dan Gohman <gohman@apple.com> Tidy up several unbeseeming casts from pointer to intptr_t.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
80e051dfdede65678ac66f1552278338bc1a1b33 28-Jul-2008 Owen Anderson <resistor@mac.com> Don't remove volatile loads. Thanks to Duncan for noticing this one.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8aa895b19a64796a4c1f7cd0cb0750ad34263ea0 28-Jul-2008 Owen Anderson <resistor@mac.com> Add support for eliminating stores that store the same value that was just loaded.
This fixes PR2599.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a72acf938902ea8ae2776cad7327257e88a63a54 13-May-2008 Nate Begeman <natebegeman@mac.com> 80 col / tabs fixes


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
844731a7f1909f55935e3514c9e713a62d67662e 13-May-2008 Dan Gohman <gohman@apple.com> Clean up the use of static and anonymous namespaces. This turned up
several things that were neither in an anonymous namespace nor static
but not intended to be global.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
00acf97feb2cba053a07505dfad9116ad09aae7a 28-Apr-2008 Dan Gohman <gohman@apple.com> Fix DSE to not eliminate volatile loads with no uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c69ace3a64aee6f97bd82f0d811b89f49a3b38ce 04-Feb-2008 Owen Anderson <resistor@mac.com> Be more precise when eliminating pointers bue to memcpy's. This allows more
stores to be deleted in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
b4b04172206810623845a7f11dd3a65b0b3b10d5 30-Jan-2008 Nick Lewycky <nicholas@mxc.ca> Remove a couple more cases of "getNumUses() == 0". No need to walk the linked
list just to see if whether the list is empty.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c7444498eebb654ea089df8ec52dba5f84f9a108 30-Jan-2008 Nick Lewycky <nicholas@mxc.ca> Use empty() instead of comparing size() with zero.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
d29ce1783cabce806d94d20ca27920e9c7093c62 30-Jan-2008 Nick Lewycky <nicholas@mxc.ca> Don't DCE FreeInst's. We were using those! Patch from Owen Anderson.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
772601a8850808a66270372164941e373074493d 30-Jan-2008 Owen Anderson <resistor@mac.com> Make DSE much more aggressive by performing DCE earlier. Update a testcase to reflect this increased aggressiveness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46542 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a34d8a0d83bb39f4058e5dea4558e69cc4eda37c 29-Jan-2008 Owen Anderson <resistor@mac.com> Add support for eliminating memcpy's at the end of functions. Also fix some errors I noticed in
the handling of eliminating stores to byval arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e3c36f67580f0963abdf696a26690facb0791ce0 25-Jan-2008 Owen Anderson <resistor@mac.com> DeadStoreElimination can treat byval parameters as if there were alloca's for the purpose of removing end-of-function stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
02ec6e51edf361e1030b71494a71de0a7a9931e7 20-Jan-2008 Duncan Sands <baldrick@free.fr> Initializing an unsigned with ~0UL causes the compiler
to complain on x86-64 (gcc 4.1). Use ~0U instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46197 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4ee451de366474b9c228b4e5fa573795a715216d 29-Dec-2007 Chris Lattner <sabre@nondot.org> Remove attribution from file headers, per discussion on llvmdev.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
dff6710717b159f089c76a07eda074eb6347eb92 01-Dec-2007 Duncan Sands <baldrick@free.fr> Integrate the readonly/readnone logic more deeply
into alias analysis. This meant updating the API
which now has versions of the getModRefBehavior,
doesNotAccessMemory and onlyReadsMemory methods
which take a callsite parameter. These should be
used unless the callsite is not known, since in
general they can do a better job than the versions
that take a function. Also, users should no longer
call the version of getModRefBehavior that takes
both a function and a callsite. To reduce the
chance of misuse it is now protected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44487 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
6390ae0a4ad9a5419b7a3c6f899de82c568807e8 06-Nov-2007 Chris Lattner <sabre@nondot.org> don't put erase or query for non-allocainst pointers in an set of allocainsts*'s


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
514ab348fddcdffa8367685dc608b2f8d5de986d 01-Nov-2007 Duncan Sands <baldrick@free.fr> Executive summary: getTypeSize -> getTypeStoreSize / getABITypeSize.
The meaning of getTypeSize was not clear - clarifying it is important
now that we have x86 long double and arbitrary precision integers.
The issue with long double is that it requires 80 bits, and this is
not a multiple of its alignment. This gives a primitive type for
which getTypeSize differed from getABITypeSize. For arbitrary precision
integers it is even worse: there is the minimum number of bits needed to
hold the type (eg: 36 for an i36), the maximum number of bits that will
be overwriten when storing the type (40 bits for i36) and the ABI size
(i.e. the storage size rounded up to a multiple of the alignment; 64 bits
for i36).

This patch removes getTypeSize (not really - it is still there but
deprecated to allow for a gradual transition). Instead there is:

(1) getTypeSizeInBits - a number of bits that suffices to hold all
values of the type. For a primitive type, this is the minimum number
of bits. For an i36 this is 36 bits. For x86 long double it is 80.
This corresponds to gcc's TYPE_PRECISION.

(2) getTypeStoreSizeInBits - the maximum number of bits that is
written when storing the type (or read when reading it). For an
i36 this is 40 bits, for an x86 long double it is 80 bits. This
is the size alias analysis is interested in (getTypeStoreSize
returns the number of bytes). There doesn't seem to be anything
corresponding to this in gcc.

(3) getABITypeSizeInBits - this is getTypeStoreSizeInBits rounded
up to a multiple of the alignment. For an i36 this is 64, for an
x86 long double this is 96 or 128 depending on the OS. This is the
spacing between consecutive elements when you form an array out of
this type (getABITypeSize returns the number of bytes). This is
TYPE_SIZE in gcc.

Since successive elements in a SequentialType (arrays, pointers
and vectors) need to be aligned, the spacing between them will be
given by getABITypeSize. This means that the size of an array
is the length times the getABITypeSize. It also means that GEP
computations need to use getABITypeSize when computing offsets.
Furthermore, if an alloca allocates several elements at once then
these too need to be aligned, so the size of the alloca has to be
the number of elements multiplied by getABITypeSize. Logically
speaking this doesn't have to be the case when allocating just
one element, but it is simpler to also use getABITypeSize in this
case. So alloca's and mallocs should use getABITypeSize. Finally,
since gcc's only notion of size is that given by getABITypeSize, if
you want to output assembler etc the same as gcc then getABITypeSize
is the size you want.

Since a store will overwrite no more than getTypeStoreSize bytes,
and a read will read no more than that many bytes, this is the
notion of size appropriate for alias analysis calculations.

In this patch I have corrected all type size uses except some of
those in ScalarReplAggregates, lib/Codegen, lib/Target (the hard
cases). I will get around to auditing these too at some point,
but I could do with some help.

Finally, I made one change which I think wise but others might
consider pointless and suboptimal: in an unpacked struct the
amount of space allocated for a field is now given by the ABI
size rather than getTypeStoreSize. I did this because every
other place that reserves memory for a type (eg: alloca) now
uses getABITypeSize, and I didn't want to make an exception
for unpacked structs, i.e. I did it to make things more uniform.
This only effects structs containing long doubles and arbitrary
precision integers. If someone wants to pack these types more
tightly they can always use a packed struct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7ebba512c3417f0eb52ab68b39831e3a85105d66 01-Nov-2007 Owen Anderson <resistor@mac.com> Fix test/Transforms/DeadStoreElimination/PartialStore.ll, which had been
silently failing because of an incorrect run line for some time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5dfcf4318ab10da62a86cdce94f90c0a0cd42ad1 26-Aug-2007 Owen Anderson <resistor@mac.com> Don't DSe volatile stores.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9528f11481e6840a10442733f1dc45c04b79d596 09-Aug-2007 Owen Anderson <resistor@mac.com> Make NonLocal and None const in the right way. :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40961 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8cad423d94fd7e30d84742311c454016f36e3ee3 08-Aug-2007 Owen Anderson <resistor@mac.com> Change the None and NonLocal markers in memdep to be const.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40946 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
838014ee5bda6c1b99ad8d74664aa5ea19fb501b 08-Aug-2007 Owen Anderson <resistor@mac.com> Global values also don't undead-ify pointers in our dead alloca's set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
362bb521087649c1a473ec97d6ec03c6eab9e662 08-Aug-2007 Owen Anderson <resistor@mac.com> Make handleEndBlock significantly faster with one trivial improvement,
and one hack to avoid hitting a bad case when the alias analysis is imprecise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
df359c264eb717ea69ca8dbda91992d707928af0 08-Aug-2007 Owen Anderson <resistor@mac.com> Small improvement: if a function doesn't access memory, we don't need to scan
it for potentially undeading pointers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40933 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
bb3abf41a868357e95b639b34baebf802199e190 08-Aug-2007 Owen Anderson <resistor@mac.com> Add some comments, remove a dead argument, and simplify some control flow.
No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c182f17aed0b9d4fa8a87bdbea56fcd3a3e121dc 08-Aug-2007 Owen Anderson <resistor@mac.com> A few more small cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40922 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
6ca4cb37553fc8ab568d1695d2afc99cf100d777 08-Aug-2007 Owen Anderson <resistor@mac.com> First round of cleanups from Chris' feedback.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
666f6fe0ce93b8ac2f810ec2c171710834ac7185 02-Aug-2007 Owen Anderson <resistor@mac.com> Fix 80 col. violations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
f6a05f949f39d94d846dff9bf5093a838c6ebc4b 01-Aug-2007 Owen Anderson <resistor@mac.com> Rename FastDSE to just DSE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a56c34f90bec3e46ff81d6af54a2d0d309a81c4d 01-Aug-2007 Owen Anderson <resistor@mac.com> Move FastDSE in to DeadStoreElimination.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
e739bae8daebfc0ee77a30f03560752f71e2fa20 01-Aug-2007 Owen Anderson <resistor@mac.com> Remove old DSE.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ecd94c804a563f2a86572dcf1d2e81f397e19daa 06-May-2007 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
1997473cf72957d0e70322e2fe6fe2ab141c58a6 03-May-2007 Devang Patel <dpatel@apple.com> Drop 'const'


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
3e15bf33e024b9df9e89351a165acfdb1dde51ed 02-May-2007 Devang Patel <dpatel@apple.com> Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
794fd75c67a2cdc128d67342c6d88a504d186896 01-May-2007 Devang Patel <dpatel@apple.com> Do not use typeinfo to identify pass in pass manager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
9133fe28954d498fc4de13064c7d65bd811de02c 06-Feb-2007 Reid Spencer <rspencer@reidspencer.com> Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes in
the Transforms library. This reduces debug library size by 132 KB, debug
binary size by 376 KB, and reduces link time for llvm tools slightly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
0e5f499638c8d277b9dc4a4385712177c53b5681 19-Dec-2006 Chris Lattner <sabre@nondot.org> Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
converted, we lose a static initializer. This also allows GCC to emit warnings
about unused statistics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
ac0b6ae358944ae8b2b5a11dc08f52c3ed89f2da 06-Dec-2006 Chris Lattner <sabre@nondot.org> Detemplatize the Statistic class. The only type it is instantiated with
is 'unsigned'.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
7f8897f22e88271cfa114998a4d6088e7c8e8e11 28-Aug-2006 Chris Lattner <sabre@nondot.org> eliminate RegisterOpt. It does the same thing as RegisterPass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
2bd4cb597a58d0a8f1ff332c2f50ed8232cc5898 30-Nov-2005 Chris Lattner <sabre@nondot.org> Fix a bug where we didn't realize that vaarg reads memory. This fixes
Transforms/DeadStoreElimination/2005-11-30-vaarg.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24545 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
fd93908ae8b9684fe71c239e3c6cfe13ff6a2663 22-Apr-2005 Misha Brukman <brukman+llvm@gmail.com> Remove trailing whitespace


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
5551706b0f8e970720deea0bf6aa34116030d6be 29-Jan-2005 Chris Lattner <sabre@nondot.org> Adjust to changes in instruction interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19900 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
652f3cf76f7b1a8141e65a902b3e18082b34efed 08-Jan-2005 Chris Lattner <sabre@nondot.org> Fix uint64_t -> unsigned VS warnings.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
da16d8c00bb52e37967dc7a18a4bd39f16f10650 29-Dec-2004 Chris Lattner <sabre@nondot.org> Fix PR491 and testcase Transforms/DeadStoreElimination/2004-12-28-PartialStore.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
8305a64dce516b4525e32e14e0b11d886975b67c 28-Nov-2004 Chris Lattner <sabre@nondot.org> Make DSE potentially more aggressive by being more specific about alloca sizes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
4b5015604908e9296800991a7c538a255356428f 20-Sep-2004 Chris Lattner <sabre@nondot.org> Prototype these functions more accurately


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
551ccae044b0ff658fe629dd67edd5ffe75d10e8 02-Sep-2004 Reid Spencer <rspencer@reidspencer.com> Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a000279a7de5a2cdc0a65d0960f1fa907a573c3d 26-Jul-2004 Chris Lattner <sabre@nondot.org> Implement DeadStoreElim/alloca.llx by observing that allocas are dead at the
end of the function (either return or unwind)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
70e9b59b0e142e3a965ac6b1c2cf19d8cf76b23f 25-Jul-2004 Chris Lattner <sabre@nondot.org> * Substantially simplify how free instructions are handled (potentially fixing
a bug in DSE).
* Delete dead operand uses iteratively instead of recursively, using a
SetVector.
* Defer deletion of dead operand uses until the end of processing, which means
we don't have to bother with updating the AliasSetTracker. This speeds up
DSE substantially.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
a9e2f3d0ab721d6a46dc3a6962d834b3e1c51494 25-Jul-2004 Chris Lattner <sabre@nondot.org> Free instructions kill values too. This implements DeadStoreElim/free.llx


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15199 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
c47b6677ae8a71d72db42ea74f296bcf6b14a6dc 24-Jul-2004 Chris Lattner <sabre@nondot.org> obvious fix


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15162 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
0fb56afab16a224dcae97528be1e386d0f3a0c64 22-Jul-2004 Chris Lattner <sabre@nondot.org> This is a trivial dead store elimination pass. It very very simple and
can be improved in many ways. But: stop laughing, even with -basicaa it
deletes 15% of the stores in 252.eon :)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp