History log of /external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
24a5f30f77fa2890329fa3a9165b54c13bbd51e7 20-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> MergeFunc: Make pointer and integer types generate the same hash.

The logic that actually compares the types considers pointers and integers the
same if they are of the same size. This created a strange mismatch between hash
and reality and made the test case for this fail on some platforms (yay,
test cases).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
74d892433d617daa9728f2c52446b2cc2846553f 19-Apr-2013 Bill Wendling <isanbard@gmail.com> Implement a better fix for PR15185.

If the return type is a pointer and the call returns an integer, then do the
inttoptr convertions. And vice versa.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
23e00ae631d8063a5d52d424968a6ebdc24e81f7 16-Apr-2013 Bill Wendling <isanbard@gmail.com> We are not able to bitcast a pointer to an integral value.

Two return types are not equivalent if one is a pointer and the other is an
integral. This is because we cannot bitcast a pointer to an integral value.
PR15185


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
98281a20503896349bd152e2dfe87435d3a6aada 30-Dec-2012 Nuno Lopes <nunoplopes@sapo.pt> convert a bunch of callers from DataLayout::getIndexedOffset() to GEP::accumulateConstantOffset().
The later API is nicer than the former, and is correct regarding wrap-around offsets (if anyone cares).
There are a few more places left with duplicated code, which I'll remove soon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Use the new script to sort the includes of every file under lib.

Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
ece6c6bb6329748b92403c06ac87f45c43485911 01-Nov-2012 Chandler Carruth <chandlerc@gmail.com> Revert the series of commits starting with r166578 which introduced the
getIntPtrType support for multiple address spaces via a pointer type,
and also introduced a crasher bug in the constant folder reported in
PR14233.

These commits also contained several problems that should really be
addressed before they are re-committed. I have avoided reverting various
cleanups to the DataLayout APIs that are reasonable to have moving
forward in order to reduce the amount of churn, and minimize the number
of commits that were reverted. I've also manually updated merge
conflicts and manually arranged for the getIntPtrType function to stay
in DataLayout and to be defined in a plausible way after this revert.

Thanks to Duncan for working through this exact strategy with me, and
Nick Lewycky for tracking down the really annoying crasher this
triggered. (Test case to follow in its own commit.)

After discussing with Duncan extensively, and based on a note from
Micah, I'm going to continue to back out some more of the more
problematic patches in this series in order to ensure we go into the
LLVM 3.2 branch with a reasonable story here. I'll send a note to
llvmdev explaining what's going on and why.

Summary of reverted revisions:

r166634: Fix a compiler warning with an unused variable.
r166607: Add some cleanup to the DataLayout changes requested by
Chandler.
r166596: Revert "Back out r166591, not sure why this made it through
since I cancelled the command. Bleh, sorry about this!
r166591: Delete a directory that wasn't supposed to be checked in yet.
r166578: Add in support for getIntPtrType to get the pointer type based
on the address space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
aa76e9e2cf50af190de90bc778b7f7e42ef9ceff 24-Oct-2012 Micah Villmow <villmow@gmail.com> Add in support for getIntPtrType to get the pointer type based on the address space.
This checkin also adds in some tests that utilize these paths and updates some of the
clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
56cb2298663017eb77aa4f4dda8db7ecd1b58173 19-Jul-2012 Bill Wendling <isanbard@gmail.com> Remove tabs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
06cb8ed00696eb14d1b831921452e50ec0568ea2 29-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h

This was always part of the VMCore library out of necessity -- it deals
entirely in the IR. The .cpp file in fact was already part of the VMCore
library. This is just a mechanical move.

I've tried to go through and re-apply the coding standard's preferred
header sort, but at 40-ish files, I may have gotten some wrong. Please
let me know if so.

I'll be committing the corresponding updates to Clang and Polly, and
Duncan has DragonEgg.

Thanks to Bill and Eric for giving the green light for this bit of cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3d30b435e2b3d0e7480019577f48472b51133c21 16-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Update inter-procedural optimizations for atomic load/store.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137667 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
55ba816883842e793cdeb32fcb805c4e011b527f 29-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Misc optimizer+codegen work for 'cmpxchg' and 'atomicrmw'. They appear to be
working on x86 (at least for trivial testcases); other architectures will
need more work so that they actually emit the appropriate instructions for
orderings stricter than 'monotonic'. (As far as I can tell, the ARM, PPC,
Mips, and Alpha backends need such changes.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136457 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
8fbbb3980755d74539a0aed02bc18842ed2bd18d 19-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert TargetData::getIndexedOffset to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.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/IPO/MergeFunctions.cpp
a3efbb15ddd5aa9006564cd79086723640084878 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
1afcace3a3a138b1b18e5c6270caa8dae2261ae2 09-Jul-2011 Chris Lattner <sabre@nondot.org> Land the long talked about "type system rewrite" patch. This
patch brings numerous advantages to LLVM. One way to look at it
is through diffstat:
109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing. Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
uniques them. This means that the compiler doesn't merge them structurally
which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
"const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
562b84b3aea359d1f918184e355da82bf05eb290 11-Apr-2011 Jay Foad <jay.foad@gmail.com> Don't include Operator.h from InstrTypes.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129271 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
628b337561cfb8ae862155fee710b5ca172b7a8e 25-Mar-2011 Nick Lewycky <nicholas@mxc.ca> No functionality change, just adjust some whitespace for coding style compliance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128257 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
eafe863b6dc35f9ba5360685f300d16d0a5e0c3c 20-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Instead of keeping two Value*->id# mappings, keep one Value->Value mapping and
one Value set. This is faster because we only need to use the set when there
isn't already an entry in the map. No functionality change!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126076 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3ba974a1c535563bff9a160996ad015a2a56cc05 09-Feb-2011 Nick Lewycky <nicholas@mxc.ca> When removing a function from the function set and adding it to deferred, we
could end up removing a different function than we intended because it was
functionally equivalent, then end up with a comparison of a function against
itself in the next round of comparisons (the one in the function set and the
one on the deferred list). To fix this, I introduce a choice in the form of
comparison for ComparableFunctions, either normal or "pointer only" used to
find exact Function*'s in lookups.

Also add some debugging statements.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
39c33e3b6344be1d1cc35ad9fb1b647fd8adfe65 06-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Simplify away redundant test, and document what's going on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
d489332549f226701825de990a2f5869dad96ace 06-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Remove specialized comparison of InlineAsm objects. They're uniqued on creation
now, and this wasn't comparing some of their relevant bits anyhow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
8eb3e54592ae7d7b43454fcd08d0da7a51ecd4d8 02-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Remove wasteful caching. This isn't needed for correctness because any function
that might have changed been affected by a merge elsewhere will have been
removed from the function set, and it isn't needed for performance because we
call grow() ahead of time to prevent reallocations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
468ee0a90db9ee7367bd163fcc3cb5b867753385 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Rename functions to follow coding standard. Also rejiggers comments. No
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
8b5964381ecdba39ff4062085eb26832caa49238 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Add a doxygen comment for this class.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
285cf8040da6245d5dbc9ebfac8a8caf3647caf4 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Reorder for readability. (Chris, is this what you meant?)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124479 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
07317f7d333fd03ae216865a6f0e8b3bde5f030d 28-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Reduce the number of functions we look at in the first pass, and preallocate
the function equality set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
9c1858cf4a91d0f373d2315ccf834adedd197e6e 27-Jan-2011 Benjamin Kramer <benny.kra@googlemail.com> Unbreak the build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
c9d69489ebe12f265828c48defb0278f6bd9121f 27-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Expound upon this comparison!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124406 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
dfc597297484736ac939efe4c233e7c10ce8ad29 27-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Use dyn_cast instead of isa+cast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
25296e25fd30806b4a1f2348cbf73f227962be86 27-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Fix surprising missed optimization in mergefunc where we forgot to consider
that relationships like "i8* null" is equivalent to "i32* null".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124368 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
f6c63c23203ca4c4aa89efa2bff722bb479cfe3c 26-Jan-2011 Nick Lewycky <nicholas@mxc.ca> AttrListPtr has an overloaded operator== which does this for us, we should use
it. No functionality change!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124286 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
207c193e7e9cc177115101333079e952a7676689 26-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Teach mergefunc that intptr_t is the same width as a pointer. We still can't
merge vector<intptr_t>::push_back() and vector<void*>::push_back() because
Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
388f4918fbd8349a6c5b8403e31f65aa3408add6 26-Jan-2011 Nick Lewycky <nicholas@mxc.ca> There are no vectors of pointer or arrays, so we don't need to check vector
elements for type equivalence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
b38824f866447ccf8dd0c76656755b05bcede1b1 25-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Teach mergefunc how to emit aliases safely again -- but keep it turned it off
for now. It's controlled by the HasGlobalAliases variable which is not attached
to any flag yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124182 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
e8f8139429ffc41ae3a339d4a32e336a74f189c0 15-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Add a cache that protects mergefunc's internals from more surprises in DenseSet.

Also, replace tabs with spaces. Yes, it's 2011.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123535 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
d081b04f99de015519357ccaef29868c38c57d87 02-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Also remove functions that use complex constant expressions in terms of
another function.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122705 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
abd6c754090b1ff13b0dee925989bf8676d9cb4c 02-Jan-2011 Nick Lewycky <nicholas@mxc.ca> Remove functions from the FnSet when one of their callee's is being merged. This
maintains the guarantee that the DenseSet expects two elements it contains to
not go from inequal to equal under its nose.

As a side-effect, this also lets us switch from iterating to a fixed-point to
actually maintaining a work queue of functions to look at again, and we don't
add thunks to our work queue so we don't need to detect and ignore them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
2b55f56df8a69dd2fc057626e314cdf29d7c10ed 21-Oct-2010 Duncan Sands <baldrick@free.fr> RetOp is not actually used for anything useful (though
it looks like maybe it was supposed to be used in the
test...), so zap it (gcc-4.6 warning).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.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/IPO/MergeFunctions.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/IPO/MergeFunctions.cpp
2b6c01b40b75e363e46b3ad7c598113eb98f34fb 07-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix major bug in thunk detection. Also verify the calling convention.

Switch from isWeakForLinker to mayBeOverridden which is more accurate.

Add more statistics and debugging info. Add comments. Move static function
outside anonymous namespace.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
b0e17779ba401feae32cdd1dd4096d49c1746153 05-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Switch FnSet to containing the ComparableFunction instead of a pointer to one.
This reduces malloc traffic (yay!) and removes MergeFunctionsEqualityInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
b0104e1bb56cde925d91a5b2432a18f87214484a 05-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix many bugs when merging weak-strong and weak-weak pairs. We now merge all
strong functions first to make sure they're the canonical definitions and then
do a second pass looking only for weak functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
65a0af3855c7003fa57d41eeb6586b20eefa8cfd 31-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Fix an infinite loop; merging two functions will create a new function (if the
two are weak, we make them thunks to a new strong function) so don't iterate
through the function list as we're modifying it.

Also add back the outermost loop which got removed during the cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
f53de86cba33b63ecd54e16dcea735939c5b0e4a 31-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Switch to DenseSet, simplifying much more code. We now have a single iteration
where we hash, compare and fold, instead of one iteration where we build up
the hash buckets and a second one to fold.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 28-Aug-2010 Chris Lattner <sabre@nondot.org> remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3221834f8a6216d01a7e1d1201bd14eafd79cff3 09-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Fix a use after free error caught by the valgrind builders.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110601 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
be04fdeb6c46e92fdeda7535c5912d072eff008c 08-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Do more to modernize MergeFunctions. Refactor in response to Chris' code review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.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/IPO/MergeFunctions.cpp
c9dcbed6a39f3aa2562de070bb15670d81c38650 06-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Work in progress, cleaning up MergeFuncs.
Further clean up the comparison function by removing overly generalized
"domains".
Remove all understanding of ELF aliases and simplify folding code and comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.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/IPO/MergeFunctions.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/IPO/MergeFunctions.cpp
44c7486c6331cdc726057b35ca57f00b5936e261 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Fix a -Wreorder warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
78d4330fd83a94707b345e19f5277e7a46892689 02-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Work in progress.
Start cleaning up MergeFunctions to look more like the rest of LLVM. The
primary change here is to move the methods responsible for comparison into the
new FunctionComparator object. Some comments added. There's more to do.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.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/IPO/MergeFunctions.cpp
394ce41b7fcb64a35d5cd1c1fefc0e2225ebfc01 16-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Arrays and vectors with different numbers of elements are not equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
706f50820cbef16b1e7951dfa734f79b73cb5b39 15-Jul-2010 Nick Lewycky <nicholas@mxc.ca> This is a full sentence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
664040a03c17f432a127a35013eeb6b6a26e41fb 15-Jul-2010 Nick Lewycky <nicholas@mxc.ca> Disable aliases on all platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
8246adc1f0e2d28374da3aeab864aee5ff03f3ff 07-Jul-2010 Duncan Sands <baldrick@free.fr> Rename "Release" builds as "Release+Asserts"; rename "Release-Asserts"
builds to "Release". The default build is unchanged (optimization on,
assertions on), however it is now called Release+Asserts. The intent
is that future LLVM releases released via llvm.org will be Release builds
in the new sense, i.e. will have assertions disabled (currently they have
assertions enabled, for a more than 20% slowdown). This will bring them
in line with MacOS releases, which ship with assertions disabled. It also
means that "Release" now means the same things in make and cmake builds:
cmake already disables assertions for "Release" builds AFAICS.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
5e721d768254a920b78b9129d79a84c0163cb3f4 01-Jul-2010 Bill Wendling <isanbard@gmail.com> Implement the "linker_private_weak" linkage type. This will be used for
Objective-C metadata types which should be marked as "weak", but which the
linker will remove upon final linkage. However, this linkage isn't specific to
Objective-C.

For example, the "objc_msgSend_fixup_alloc" symbol is defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

Currently only supported on Darwin platforms.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
07d317711781d8c9268f7d6afcf1ba7eadf1d127 30-Jun-2010 Bill Wendling <isanbard@gmail.com> Revert r107205 and r107207.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
207855cff9b4811004b9720f28a5bd0adf3784b7 29-Jun-2010 Bill Wendling <isanbard@gmail.com> Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

.globl l_objc_msgSend_fixup_alloc
.weak_definition l_objc_msgSend_fixup_alloc
.section __DATA, __objc_msgrefs, coalesced
.align 3
l_objc_msgSend_fixup_alloc:
.quad _objc_msgSend_fixup
.quad L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
911ae391e85ead1bb11895562a6bbdb2c0f8ebd2 13-May-2010 Nick Lewycky <nicholas@mxc.ca> Remove heinous tabs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
33ab0b15689abd32f72a5417cd104bde19f4b4aa 13-May-2010 Nick Lewycky <nicholas@mxc.ca> Replace the core comparison login in merge functions. We can now merge
vector<>::push_back() in:

int foo(vector<int> &a, vector<unsigned> &b) {
a.push_back(10);
b.push_back(11);
}

to two calls to the same push_back function, or fold away the two copies of
push_back() in:

struct T { int; };
struct S { char; };
vector<T*> t;
vector<S*> s;
void f(T *x) { t.push_back(x); }
void g(S *x) { s.push_back(x); }

but leave f() and g() separate, since they refer to two different global
variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
f0356fe140af1a30587b9a86bcfb1b2c51b8ce20 27-Jan-2010 Jeffrey Yasskin <jyasskin@google.com> Kill ModuleProvider and ghost linkage by inverting the relationship between
Modules and ModuleProviders. Because the "ModuleProvider" simply materializes
GlobalValues now, and doesn't provide modules, it's renamed to
"GVMaterializer". Code that used to need a ModuleProvider to materialize
Functions can now materialize the Functions directly. Functions no longer use a
magic linkage to record that they're materializable; they simply ask the
GVMaterializer.

Because the C ABI must never change, we can't remove LLVMModuleProviderRef or
the functions that refer to it. Instead, because Module now exposes the same
functionality ModuleProvider used to, we store a Module* in any
LLVMModuleProviderRef and translate in the wrapper methods. The bindings to
other languages still use the ModuleProvider concept. It would probably be
worth some time to update them to follow the C++ more closely, but I don't
intend to do it.

Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3a078b520808d9c09b330617bd98c436ad8caff1 05-Jan-2010 David Greene <greened@obbligato.org> Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
f5a86f45e75ec744c203270ffa03659eb0a220c1 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove includes of Support/Compiler.h that are no longer needed after the
VISIBILITY_HIDDEN removal.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
6726b6d75a8b679068a58cb954ba97cf9d1690ba 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
a279bc3da55691784064cb47200a1c584408b8ab 20-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tabs -> spaces, and remove trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
58cfa3b13752579c86cf85270d49f9ced0942f2f 26-Aug-2009 Dan Gohman <gohman@apple.com> Rename Instruction::isIdenticalTo to Instruction::isIdenticalToWhenDefined,
and introduce a new Instruction::isIdenticalTo which tests for full
identity, including the SubclassOptionalData flags. Also, fix the
Instruction::clone implementations to preserve the SubclassOptionalData
flags. Finally, teach several optimizations how to handle
SubclassOptionalData correctly, given these changes.

This fixes the counterintuitive behavior of isIdenticalTo not comparing
the full value, and clone not returning an identical clone, as well as
some subtle bugs that could be caused by these.

Thanks to Nick Lewycky for reporting this, and for an initial patch!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80038 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
bbbfa99d3d18fe9f20265305e833666645ada528 23-Aug-2009 Chris Lattner <sabre@nondot.org> remove a few DOUTs here and there.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
1b2d0b83977a37cb22391dc5a7bf09de76caf0b2 11-Aug-2009 Dan Gohman <gohman@apple.com> Remove unnecessary casts.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
baf3c404409d5e47b13984a7f95bfbd6d1f2e79e 29-Jul-2009 Owen Anderson <resistor@mac.com> Move ConstantExpr to 2.5 API.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
ce63ffb52f249b62cdf2d250c128007b13f27e71 25-Jul-2009 Daniel Dunbar <daniel@zuster.org> More migration to raw_ostream, the water has dried up around the iostream hole.
- Some clients which used DOUT have moved to DEBUG. We are deprecating the
"magic" DOUT behavior which avoided calling printing functions when the
statement was disabled. In addition to being unnecessary magic, it had the
downside of leaving code in -Asserts builds, and of hiding potentially
unnecessary computations.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77019 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
e922c0201916e0b980ab3cfe91e1413e68d55647 22-Jul-2009 Owen Anderson <resistor@mac.com> Get rid of the Pass+Context magic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
3d10a5a75794356a0a568ce283713adc3a963200 20-Jul-2009 Bill Wendling <isanbard@gmail.com> Add plumbing for the `linker_private' linkage type. This type is meant for
"private" symbols which the assember shouldn't strip, but which the linker may
remove after evaluation. This is mostly useful for Objective-C metadata.

This is plumbing, so we don't have a use of it yet. More to come, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
001dbfebcbbded8c8e74b19e838b50da2b6c6fb5 16-Jul-2009 Owen Anderson <resistor@mac.com> Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
c23197a26f34f559ea9797de51e187087c039c42 14-Jul-2009 Torok Edwin <edwintorok@gmail.com> llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.
This adds location info for all llvm_unreachable calls (which is a macro now) in
!NDEBUG builds.
In NDEBUG builds location info and the message is off (it only prints
"UREACHABLE executed").


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
c25e7581b9b8088910da31702d4ca21c4734c6d7 11-Jul-2009 Torok Edwin <edwintorok@gmail.com> assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of
line.
LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for
NDEBUG builds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
14ce9ef2e9013ba56e1daafebd91fe3ee1e8647e 06-Jul-2009 Owen Anderson <resistor@mac.com> More LLVMContext-ification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74811 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
a142c9302b690cda799737d78ec29414e3b47fc8 13-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Unlike the other instructions, GEP really does need to look at the type of a
pointer. This fixes kimwitu++. Pointed out by Frits van Bommel on review!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
194ae785e1f94619cbdcdcf2921caa6997277d32 12-Jun-2009 Dan Gohman <gohman@apple.com> Give Instruction::isSameOperationAs a corresponding comment to note
the relationship with MergeFunctions.cpp's isEquivalentOperation,
and make a trivial code reordering so that the two functions are
easier to compare.

Fix the name of Instruction::isSameOperationAs in MergeFunction.cpp's
isEquivalentOperation's comment, and fix a nearby 80-column violation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73241 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
93531e49867aca33629a54073241481202635d3e 12-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Keep callers of a weak function calling it, instead of the non-weak equivalent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
b3c36c9c9aba3fce8ae35b52eda4192531a9d3df 12-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Don't forget to match the calling convention when producing a thunk.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
8728d7a3ea7cad3297f9ab0984358007238ae83a 12-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Given two identical weak functions, produce one internal function and two weak
thunks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
287de607dc3e05aa287edf4e3b6aa29e6c4517c9 12-Jun-2009 Nick Lewycky <nicholas@mxc.ca> Add an "are types equivalent" operation that ignores the types that a pointer
points to while analyzing all other fields.

Use FoldingSetNodeID to produce a good hash. This dramatically decreases run
times.

Emit thunks. This means that it can look at all functions regardless of what
the linkage is or if the address is taken, but unfortunately some small
functions can be even shorter than the thunk because our backend doesn't yet
realize it can just turn these into jumps. This means that this pass will
pessimize code on average.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73222 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
bb46f52027416598a662dc1c58f48d9d56b1a65b 15-Jan-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the private linkage.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
6feb333695f913cd7b525f9a2d5b887f4b0fca1f 02-Nov-2008 Nick Lewycky <nicholas@mxc.ca> Changes from Duncan's review:
* merge two weak functions by making them both alias a third non-weak fn
* don't reimplement CallSite::hasArgument
* whitelist the safe linkage types


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
5baf8ece830b7a14ac466d09d6a113205296f6ee 02-Nov-2008 Duncan Sands <baldrick@free.fr> Get this building on 64 bit machines (error:
cast from ‘const llvm::PointerType*’ to ‘unsigned int’
loses precision).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/Transforms/IPO/MergeFunctions.cpp
579a0246616d76bc536de0e41edf069d091604be 02-Nov-2008 Nick Lewycky <nicholas@mxc.ca> Add a new MergeFunctions pass. It finds identical functions and merges them.

This triggers only 60 times in llvm-test (look at .llvm.bc, not .linked.rbc)
and so it probably wont be turned on by default. Also, may of those are likely
to go away when PR2973 is fixed.


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