Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename isWeakForLinker to mayBeOverridden. Use it | Duncan Sands | 2008-09-29 | 1 | -6/+6 |
| | | | | | | | instead of hasWeakLinkage in a bunch of optimization passes. llvm-svn: 56782 | ||||
* | Make safer variant of alias resolution routine to be default | Anton Korobeynikov | 2008-09-09 | 1 | -1/+1 |
| | | | | llvm-svn: 56005 | ||||
* | Fix incorrect linker behaviour: we shouldn't resolve weak aliases. | Anton Korobeynikov | 2008-09-09 | 1 | -2/+2 |
| | | | | llvm-svn: 55997 | ||||
* | Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes | Chris Lattner | 2008-07-14 | 1 | -167/+102 |
| | | | | | | | | | | | | | | | | | the second half of link-global-to-func.ll and causes some minor changes in messages. There are two TODOs here. First, this causes a regression in 2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton, I would really appreciate it if you could take a look at this. It should be a matter of adding proper alias support to GetLinkageResult, and was probably already a latent bug that would manifest with globals. The second todo is to reimplement LinkAlias in the same pattern as function and global linking. This should be pretty straight-forward for someone who knows aliases, but isn't a requirement for correctness. llvm-svn: 53548 | ||||
* | don't do any linkage, not even type resolution, of symbols that have | Chris Lattner | 2008-07-14 | 1 | -6/+10 |
| | | | | | | internal linkage. llvm-svn: 53547 | ||||
* | implement linking of globals to functions, in one direction | Chris Lattner | 2008-07-14 | 1 | -81/+75 |
| | | | | | | | | | | | (replacing a function with a global). This is needed when building llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack in lib/system/DynamicLibrary.cpp. Implementation of linking the other way will need to wait for a cleanup of LinkFunctionProtos. llvm-svn: 53546 | ||||
* | wrap long lines, remove some code from a non-assert build. | Chris Lattner | 2008-07-14 | 1 | -5/+7 |
| | | | | llvm-svn: 53545 | ||||
* | The source and dest of an alias are *not* required to have the same type, | Chris Lattner | 2008-07-10 | 1 | -9/+3 |
| | | | | | | though that would be nice and make sense :). Patch by Nathan Keynes! llvm-svn: 53387 | ||||
* | Make DenseMap's insert return a pair, to more closely resemble std::map. | Dan Gohman | 2008-07-07 | 1 | -1/+1 |
| | | | | llvm-svn: 53177 | ||||
* | Add convenient helper for checking whether global is weak in linker sense | Anton Korobeynikov | 2008-07-05 | 1 | -26/+11 |
| | | | | | | having weak or linkonce or common or extweak LLVM linkage. llvm-svn: 53158 | ||||
* | Override weak stuff during linking of aliases. This fixes PR2463. | Anton Korobeynikov | 2008-07-05 | 1 | -8/+21 |
| | | | | llvm-svn: 53156 | ||||
* | Properly link alias and function decls. This fixes PR2146 | Anton Korobeynikov | 2008-07-05 | 1 | -8/+27 |
| | | | | llvm-svn: 53154 | ||||
* | when linking globals, make sure to preserve the address space of the global. | Chris Lattner | 2008-06-27 | 1 | -4/+8 |
| | | | | llvm-svn: 52810 | ||||
* | Fix an error handling redefinition of linkonce functions where the | Chris Lattner | 2008-06-20 | 1 | -18/+14 |
| | | | | | | types differ. Patch by Nathan Keynes! llvm-svn: 52527 | ||||
* | Add a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff. | Chris Lattner | 2008-06-16 | 1 | -2/+5 |
| | | | | llvm-svn: 52374 | ||||
* | stop making PATypeHolder's so crazily. | Chris Lattner | 2008-06-16 | 1 | -33/+33 |
| | | | | llvm-svn: 52364 | ||||
* | use a real associative container for type association instead of using | Chris Lattner | 2008-06-16 | 1 | -8/+94 |
| | | | | | | | a vector with a linear search. This speeds up the linking testcase in PR1860 from 0.965s to 0.385s on my system. llvm-svn: 52357 | ||||
* | bail out sooner if we have two concrete but different types. | Chris Lattner | 2008-06-16 | 1 | -0/+4 |
| | | | | llvm-svn: 52351 | ||||
* | simplify some code. | Chris Lattner | 2008-06-16 | 1 | -24/+21 |
| | | | | llvm-svn: 52350 | ||||
* | Apply a patch from Nathan Keynes, which speeds up llvm-link on | Chris Lattner | 2008-06-16 | 1 | -1/+0 |
| | | | | | | | the testcases in PR1860 from taking more than 1 hour (when I killed it) to taking 1s. llvm-svn: 52347 | ||||
* | handle vectors. Any integers that got here would necessarily be different ↵ | Chris Lattner | 2008-06-16 | 1 | -8/+11 |
| | | | | | | already. llvm-svn: 52341 | ||||
* | Simplify ResolveTypes by pulling the null case out into the one | Chris Lattner | 2008-06-16 | 1 | -42/+30 |
| | | | | | | | | | client that cares and simplifying its control flow. Remove the DestST argument to ResolveTypes and RecursiveResolveTypes* which are dead now. llvm-svn: 52340 | ||||
* | simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out of | Chris Lattner | 2008-06-16 | 1 | -23/+20 |
| | | | | | | ResolveTypes into the one place that needs it. llvm-svn: 52338 | ||||
* | use 'continue' to make the function linker simpler. When linking a strong | Chris Lattner | 2008-06-09 | 1 | -21/+37 |
| | | | | | | | function into a weak function, zap the weak function body so that the strong one overrides it. This fixes PR2410 llvm-svn: 52135 | ||||
* | minor changes to short circuit the 'no linkage' case earlier for | Chris Lattner | 2008-06-09 | 1 | -27/+40 |
| | | | | | | | function bodies. We now don't try to unify types or handling type mismatches if when linking an internal foo to an external foo. llvm-svn: 52134 | ||||
* | simplify function visibility handling. | Chris Lattner | 2008-06-09 | 1 | -7/+8 |
| | | | | llvm-svn: 52133 | ||||
* | Factor code to copy global value attributes like | Duncan Sands | 2008-05-26 | 1 | -14/+4 |
| | | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. llvm-svn: 51567 | ||||
* | Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵ | Gabor Greif | 2008-05-15 | 1 | -2/+4 |
| | | | | | | makefile targets to find these better. llvm-svn: 51143 | ||||
* | Add CommonLinkage; currently tentative definitions | Dale Johannesen | 2008-05-14 | 1 | -10/+18 |
| | | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. llvm-svn: 51118 | ||||
* | Fix linking of internal aliases | Anton Korobeynikov | 2008-05-10 | 1 | -28/+55 |
| | | | | llvm-svn: 50950 | ||||
* | Turn StripPointerCast() into a method | Anton Korobeynikov | 2008-05-07 | 1 | -1/+2 |
| | | | | llvm-svn: 50836 | ||||
* | If weak GlobalVariable was bitcast'ed to different type during linking | Anton Korobeynikov | 2008-05-06 | 1 | -1/+1 |
| | | | | | | we will need to strip all casts for intializer lookup. llvm-svn: 50776 | ||||
* | Revert r49614. As Dan pointed out, some of these aren't correct. | Owen Anderson | 2008-04-14 | 1 | -1/+1 |
| | | | | llvm-svn: 49657 | ||||
* | Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2), | Owen Anderson | 2008-04-13 | 1 | -1/+1 |
| | | | | | | which is significantly more efficient. llvm-svn: 49614 | ||||
* | API changes for class Use size reduction, wave 1. | Gabor Greif | 2008-04-06 | 1 | -4/+4 |
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277 | ||||
* | Ultimately resolve aliases during linking, if possible | Anton Korobeynikov | 2008-03-11 | 1 | -5/+4 |
| | | | | llvm-svn: 48259 | ||||
* | Add sanity checks | Anton Korobeynikov | 2008-03-10 | 1 | -0/+10 |
| | | | | llvm-svn: 48184 | ||||
* | Typo: 'function' => 'alias' | Anton Korobeynikov | 2008-03-10 | 1 | -3/+2 |
| | | | | llvm-svn: 48183 | ||||
* | Syntactic sugar'ify stuff :) | Anton Korobeynikov | 2008-03-10 | 1 | -15/+15 |
| | | | | llvm-svn: 48182 | ||||
* | Always run 'make check' :) Fix fallout from prev. commit: query for possible | Anton Korobeynikov | 2008-03-10 | 1 | -1/+1 |
| | | | | | | alias destination only if we don't have anything to link to llvm-svn: 48181 | ||||
* | Make error messages to have common style | Anton Korobeynikov | 2008-03-10 | 1 | -18/+12 |
| | | | | llvm-svn: 48180 | ||||
* | Properly link globals with aliases | Anton Korobeynikov | 2008-03-10 | 1 | -20/+41 |
| | | | | llvm-svn: 48179 | ||||
* | Remove the LinkGlobal weirderness in common linking phase. | Anton Korobeynikov | 2008-03-10 | 1 | -33/+44 |
| | | | | llvm-svn: 48177 | ||||
* | Typo | Anton Korobeynikov | 2008-03-10 | 1 | -1/+1 |
| | | | | llvm-svn: 48176 | ||||
* | Fix some compilation errors on msvc: | Ted Kremenek | 2008-03-09 | 1 | -3/+3 |
| | | | | | | | | | - "Redefinition of I" (iterator masks previous definition) - include missing header file Patch by Argiris Kirtzidis! llvm-svn: 48115 | ||||
* | Clarify some important bits | Anton Korobeynikov | 2008-03-07 | 1 | -1/+2 |
| | | | | llvm-svn: 48010 | ||||
* | Small cleanup: propagate thread-localness via generic routine. | Anton Korobeynikov | 2008-03-07 | 1 | -7/+10 |
| | | | | | | No functionality change. llvm-svn: 48009 | ||||
* | Missed patch from my last commit | Anton Korobeynikov | 2008-03-05 | 1 | -0/+10 |
| | | | | llvm-svn: 47977 | ||||
* | Resolve aliases to aliasees, where possible | Anton Korobeynikov | 2008-03-05 | 1 | -0/+3 |
| | | | | llvm-svn: 47975 | ||||
* | Handle functions as targets during linking of aliases as well | Anton Korobeynikov | 2008-03-05 | 1 | -1/+25 |
| | | | | llvm-svn: 47974 |