summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/GlobalDCE.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement function prefix data as an IR feature.Peter Collingbourne2013-09-161-0/+3
| | | | | | | | | Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 llvm-svn: 190773
* GlobalDCE: Fix an oversight in my last commit that could lead to crashes.Benjamin Kramer2013-04-131-2/+2
| | | | | | There is a Constant with non-constant operands: blockaddress. llvm-svn: 179460
* Fix a scalability issue with complex ConstantExprs.Benjamin Kramer2013-04-131-4/+9
| | | | | | | | | | | | | | | This is basically the same fix in three different places. We use a set to avoid walking the whole tree of a big ConstantExprs multiple times. For example: (select cmp, (add big_expr 1), (add big_expr 2)) We don't want to visit big_expr twice here, it may consist of thousands of nodes. The testcase exercises this by creating an insanely large ConstantExprs out of a loop. It's questionable if the optimizer should ever create those, but this can be triggered with real C code. Fixes PR15714. llvm-svn: 179458
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | 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. =] llvm-svn: 169131
* Implement the isSafeToDiscardIfUnused predicate and use it in globalopt andRafael Espindola2012-06-141-3/+3
| | | | | | | globaldce. Globaldce was already removing linkonce globals, but globalopt was not. llvm-svn: 158476
* 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
* 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-1/+2
| | | | llvm-svn: 109045
* cleanups, switch GlobalDCE to SmallPtrSet instead of std::setChris Lattner2009-11-011-13/+8
| | | | llvm-svn: 85730
* teach various passes about blockaddress. We no longerChris Lattner2009-10-291-7/+7
| | | | | | crash on any clang tests. llvm-svn: 85465
* 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
* Derive metadata hierarchy from Value instead of User.Devang Patel2009-10-211-3/+0
| | | | llvm-svn: 84801
* Do not remove dead metadata for now.Devang Patel2009-10-211-1/+2
| | | | llvm-svn: 84731
* Remove dead metadata.Devang Patel2009-08-111-0/+3
| | | | llvm-svn: 78651
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+0
| | | | llvm-svn: 76702
* Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a ↵Owen Anderson2009-07-161-0/+2
| | | | | | | | number of issues in our current context-passing stuff, which is also fixed here llvm-svn: 76089
* Remove an unused function SafeToDestroyConstant(). Rename an almostJay Foad2009-06-091-15/+0
| | | | | | | identical function ConstantIsDead() to SafeToDestroyConstant(), to emphasise the connection with Constant::destroyConstant(). llvm-svn: 73149
* available_externall linkage is not local, this was confusing the codegenerator,Torok Edwin2009-05-231-2/+2
| | | | | | | | | and it wasn't generating calls through @PLT for these functions. hasLocalLinkage() is now false for available_externally, I attempted to fix the inliner and dce to handle available_externally properly. It passed make check. llvm-svn: 72328
* eliminate unneeded parens.Chris Lattner2009-04-131-2/+2
| | | | llvm-svn: 68939
* If an alias is dead and so is its aliasee, then globaldce wouldDuncan Sands2009-02-171-8/+16
| | | | | | | crash because the alias would still be using the aliasee when the aliasee was deleted. llvm-svn: 64844
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* The verifier checks that the aliasee is not null.Duncan Sands2009-01-071-2/+1
| | | | llvm-svn: 61870
* Not having an aliasee is a theoretical possibility.Duncan Sands2009-01-051-1/+2
| | | | llvm-svn: 61745
* Format more neatly.Duncan Sands2009-01-051-1/+1
| | | | llvm-svn: 61744
* Delete unused global aliases with internal linkage.Duncan Sands2009-01-051-8/+23
| | | | | | | | In fact this also deletes those with linkonce linkage, however this is currently dead because for the moment aliases aren't allowed to have this linkage type. llvm-svn: 61742
* Use actual function name in comments.Devang Patel2008-11-111-2/+2
| | | | llvm-svn: 59063
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Use find instead of lower_bound.Dan Gohman2008-07-111-2/+2
| | | | llvm-svn: 53474
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-2/+3
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* 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
* Implement review feedbackAnton Korobeynikov2007-04-291-1/+1
| | | | llvm-svn: 36564
* Implement review feedback. Aliasees can be either GlobalValue's orAnton Korobeynikov2007-04-281-6/+2
| | | | | | bitcasts of them. llvm-svn: 36537
* Implement aliases. This fixes PR1017 and it's dependent bugs. CFE partAnton Korobeynikov2007-04-251-1/+12
| | | | | | will follow. llvm-svn: 36435
* 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
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-3/+3
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Eliminate static ctors due to Statistic objectsChris Lattner2006-12-191-3/+4
| | | | llvm-svn: 32693
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-2/+2
| | | | | | is 'unsigned'. llvm-svn: 32279
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Remove trailing whitespaceMisha Brukman2005-04-211-5/+5
| | | | llvm-svn: 21427
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-2/+2
| | | | | | | | 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
OpenPOWER on IntegriCloud