summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/ConstantMerge.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-fix the issue Bill fixed in r147899 in a slightly different way, which ↵Eli Friedman2012-01-111-5/+7
| | | | | | doesn't abuse the semantics of linker_private. We don't really want to merge any string constant with a weak_odr global. llvm-svn: 147971
* If the global variable is removed by the linker, then don't constant merge itBill Wendling2012-01-111-6/+10
| | | | | | | | | | | | | | with other symbols. An object in the __cfstring section is suppoed to be filled with CFString objects, which have a pointer to ___CFConstantStringClassReference followed by a pointer to a __cstring. If we allow the object in the __cstring section to be merged with another global, then it could end up in any section. Because the linker is going to remove these symbols in the final executable, we shouldn't bother to merge them. <rdar://problem/10564621> llvm-svn: 147899
* Teach the ConstantMerge pass about alignment. Fixes PR10514!Nick Lewycky2011-07-271-8/+41
| | | | llvm-svn: 136250
* Don't merge two constants if we care about the address of both.Rafael Espindola2011-01-161-22/+38
| | | | | | | | | | | | | | This fixes the original testcase in PR8927. It also causes a clang binary built with a patched clang to increase in size by 0.21%. We can probably get some of the size back by writing a pass that detects that a global never has its pointer compared and adds unnamed_addr to it (maybe extend global opt). It is also possible that there are some other cases clang could add unnamed_addr to. I will investigate extending globalopt next. llvm-svn: 123584
* Add missing whitespace.Nick Lewycky2011-01-151-2/+2
| | | | llvm-svn: 123543
* Make constmerge a two-pass algorithm so that it won't miss mergingNick Lewycky2011-01-151-4/+34
| | | | | | opporuntities. Fixes PR8978. llvm-svn: 123541
* Get rid of static constructors for pass registration. Instead, every pass ↵Owen Anderson2010-10-191-1/+3
| | | | | | | | | | | | | | | | | exposes an initializeMyPassFunction(), which must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
* Now with fewer extraneous semicolons!Owen Anderson2010-10-071-1/+1
| | | | llvm-svn: 115996
* fix PR8144, a bug where constant merge would merge globals markedChris Lattner2010-09-151-1/+27
| | | | | | attribute(used). llvm-svn: 113911
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* Fix batch of converting RegisterPass<> to INTIALIZE_PASS().Owen Anderson2010-07-211-2/+2
| | | | llvm-svn: 109045
* 1. modernize the constantmerge pass, using densemap/smallvector.Chris Lattner2010-02-121-19/+22
| | | | | | | | | 2. don't bother trying to merge globals in non-default sections, doing so is quite dubious at best anyway. 3. fix a bug reported by Arnaud de Grandmaison where we'd try to merge two globals in different address spaces. llvm-svn: 95995
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Use hasDefinitiveInitializer() instead of testing the same thingDan Gohman2009-08-191-1/+1
| | | | | | | by hand, and fix a few places that were using hasInitializer() that appear to depend on the initializer value. llvm-svn: 79441
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-3/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Don't include <map> in Pass.h, which doesn't need it. This requiresDan Gohman2008-03-211-0/+1
| | | | | | adding <map> to many files that actually do need it. llvm-svn: 48667
* remove some dead code.Chris Lattner2008-02-131-4/+0
| | | | llvm-svn: 47066
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Fix typo in comment.Nick Lewycky2007-05-061-1/+1
| | | | llvm-svn: 36873
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* avoid iterator invalidation.Chris Lattner2007-04-141-2/+4
| | | | llvm-svn: 36002
* An even better fix.Jeff Cohen2007-04-141-3/+2
| | | | llvm-svn: 35998
* Fix recent regression that broke several llvm-tests.Jeff Cohen2007-04-141-0/+2
| | | | llvm-svn: 35996
* in addition to merging, constantmerge should also delete trivially dead globals,Chris Lattner2007-04-141-1/+8
| | | | | | in order to clean up after simplifylibcalls. llvm-svn: 35982
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-1/+2
| | | | | | | 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. llvm-svn: 33939
* Eliminate static ctors due to Statistic objectsChris Lattner2006-12-191-2/+3
| | | | llvm-svn: 32693
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-1/+1
| | | | | | is 'unsigned'. llvm-svn: 32279
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Fix ConstantMerge/2006-03-07-DontMergeDiffSections.ll, a problem JimChris Lattner2006-03-071-11/+14
| | | | | | | hypotheticalized about, where we would incorrectly merge two globals in different sections. llvm-svn: 26597
* Remove trailing whitespaceMisha Brukman2005-04-211-8/+8
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-1/+1
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* 'Pass' should now not be derived from by clients. Instead, they should deriveChris Lattner2004-09-201-4/+4
| | | | | | | from ModulePass. Instead of implementing Pass::run, then should implement ModulePass::runOnModule. llvm-svn: 16436
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | 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/. llvm-svn: 16137
* Merging constants can cause further room for improvement. Iterate untilChris Lattner2003-12-281-35/+45
| | | | | | we converge llvm-svn: 10618
* Fix memory corruption bug PR193Chris Lattner2003-12-221-20/+26
| | | | llvm-svn: 10586
* Finegrainify namespacificationChris Lattner2003-11-211-4/+2
| | | | llvm-svn: 10138
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-1/+4
| | | | llvm-svn: 9903
* Fix bug: ConstantMerge/2003-10-28-MergeExternalConstants.ll & PR64Chris Lattner2003-10-291-2/+13
| | | | llvm-svn: 9579
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-201-0/+7
| | | | | | Header files will be on the way. llvm-svn: 9298
* Fix spell-o'sChris Lattner2003-09-101-1/+1
| | | | llvm-svn: 8431
* Global constants CAN be externalChris Lattner2003-04-181-3/+3
| | | | llvm-svn: 5808
* - Dramatically simplify the ConstantMerge code now thatChris Lattner2002-10-091-102/+3
| | | | | | Value::replaceAllUsesWith works with constants correctly. llvm-svn: 4104
* Updates to work with recent Statistic's changes:Chris Lattner2002-10-011-2/+2
| | | | | | | | | | | | * Renamed StatisticReporter.h/cpp to Statistic.h/cpp * Broke constructor to take two const char * arguments instead of one, so that indendation can be taken care of automatically. * Sort the list by pass name when printing * Make sure to print all statistics as a group, instead of randomly when the statistics dtors are called. * Updated ProgrammersManual with new semantics. llvm-svn: 4002
OpenPOWER on IntegriCloud