summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/IPO.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Initialize the barrier pass llvm::initializeIPOHal Finkel2013-12-121-0/+1
| | | | | | | | | The barrier pass is a temporary hack, and should go away soon. Nevertheless, if we don't initialize it, then opt will not understand -barrier, and this will break bugpoint (because when it dumps the passes from the default pass manager -barrier will be there). llvm-svn: 197177
* Use LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN instead of the "dso list".Rafael Espindola2013-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | There are two ways one could implement hiding of linkonce_odr symbols in LTO: * LLVM tells the linker which symbols can be hidden if not used from native files. * The linker tells LLVM which symbols are not used from other object files, but will be put in the dso symbol table if present. GOLD's API is the second option. It was implemented almost 1:1 in llvm by passing the list down to internalize. LLVM already had partial support for the first option. It is also very similar to how ld64 handles hiding these symbols when *not* doing LTO. This patch then * removes the APIs for the DSO list. * marks LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN all linkonce_odr unnamed_addr global values and other linkonce_odr whose address is not used. * makes the gold plugin responsible for handling the API mismatch. llvm-svn: 193800
* Optimize linkonce_odr unnamed_addr functions during LTO.Rafael Espindola2013-10-031-1/+1
| | | | | | | | | | | Generalize the API so we can distinguish symbols that are needed just for a DSO symbol table from those that are used from some native .o. The symbols that are only wanted for the dso symbol table can be dropped if llvm can prove every other dso has a copy (linkonce_odr) and the address is not important (unnamed_addr). llvm-svn: 191922
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. llvm-svn: 180881
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-0/+1
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* Change the internalize pass to internalize all symbols when given an emptyRafael Espindola2012-10-261-1/+4
| | | | | | | list of externals. This makes sense since a shared library with no symbols can still be useful if it has static constructors. llvm-svn: 166795
* Fix filename in file header.Craig Topper2012-10-161-1/+1
| | | | llvm-svn: 166004
* C API functions must be able to see their extern "C" definitions, or it will ↵Benjamin Kramer2011-08-191-0/+1
| | | | | | be impossible to call them from C. llvm-svn: 138022
* Remove the LowerSetJmp pass. It wasn't used effectively by any of the targets.Bill Wendling2011-08-031-5/+0
| | | | | | This is some of my original LLVM code. *wipes tear* llvm-svn: 136821
* Add LLVMAddAlwaysInlinerPass to the C API.Rafael Espindola2011-07-261-0/+4
| | | | llvm-svn: 136083
* LLVM 3.0 is here, remove old do nothing method.Rafael Espindola2011-07-261-5/+0
| | | | llvm-svn: 136082
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 134829
* remove the StructRetPromotion pass. It is unused, not maintained andChris Lattner2011-04-111-1/+0
| | | | | | | has some bugs. If this is interesting functionality, it should be reimplemented in the argpromotion pass. llvm-svn: 129314
* remove the partial specialization pass. It is unmaintained and has bugs.Chris Lattner2011-01-161-1/+0
| | | | llvm-svn: 123554
* Add an initialization routine for libLLVMipo.aOwen Anderson2010-10-071-2/+37
| | | | llvm-svn: 115933
* Adding IPSCCP and Internalize passes to the C-bindingsWesley Peck2010-04-091-0/+9
| | | | llvm-svn: 100893
* Reverting 85714, 85715, 85716, which are breaking the buildDouglas Gregor2009-11-011-1/+0
| | | | llvm-svn: 85717
* Remove the #include of Pass.h from PassManager.h. This breaks a significantDan Gohman2009-11-011-0/+1
| | | | | | #include dependency, as frontends commonly pull in PassManager.h. llvm-svn: 85714
* Auto-upgrade free instructions to calls to the builtin free function.Victor Hernandez2009-10-241-1/+1
| | | | | | | 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. llvm-svn: 84987
* add a bunch more passes to the C bindings (PR3734), patch byChris Lattner2009-03-061-0/+75
Lennart Augustsson! llvm-svn: 66272
OpenPOWER on IntegriCloud