summaryrefslogtreecommitdiff
path: root/tools/lto
Commit message (Collapse)AuthorAge
* Add LTO and gold plugin to the CMake build. Linux-only, support forOscar Fuentes2011-03-11
| | | | | | | | other systems pending. PR9456. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127466 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a special streamer to libLTO that just records symbols definitions andRafael Espindola2011-03-02
| | | | | | | | | | | uses. The result produced by the streamer is used to give the linker more accurate information and to add to llvm.compiler.used. The second improvement removes the need for the user to add __attribute__((used)) to functions only used in inline asm. The first one lets us build firefox with LTO on Darwin :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126830 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LTO to use MC. This takes the linking of libxul.so from about 7m toRafael Espindola2011-02-24
| | | | | | 6m30. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126426 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some memory leaks and avoid looking in the hash tables twice.Rafael Espindola2011-02-20
| | | | | | libxul links in 7m0.403s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126085 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve aliases if needed.Rafael Espindola2011-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125439 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a silly bug I introduced when dropping std::string.Rafael Espindola2011-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125420 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove std::string version of getNameWithPrefix.Rafael Espindola2011-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125363 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't open the file again in the gold plugin. To be able to do this, updateRafael Espindola2011-02-08
| | | | | | MemoryBuffer::getOpenFile to not close the file descriptor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125128 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't tell the linker about available_externally definitions. If we do, it willRafael Espindola2011-02-01
| | | | | | complain about duplicated definitions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124634 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not include DataTypes.h in llvm-c/lto.h.Devang Patel2011-01-07
| | | | | | | This means avoid using uint32_t. This patch reverts r112200 and fixes original problem by fixing argument type in lto.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123038 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-16
| | | | | | via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121471 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121461 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-09
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121434 91177308-0d34-0410-b5e6-96231b3b80d8
* More code not compiled by CMake. :(.Michael J. Spencer2010-12-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121387 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not try luck by using given name to create temporary file. In parallel ↵Devang Patel2010-12-06
| | | | | | | | | builds it may not work. This time for .s file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121016 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not try luck by using given name to create temporary file. In parallel ↵Devang Patel2010-12-03
| | | | | | builds it may not work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120860 91177308-0d34-0410-b5e6-96231b3b80d8
* I swear I did a make clean and make before committing all this...Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120304 91177308-0d34-0410-b5e6-96231b3b80d8
* Record sysbols created by aliases. Fixes PR8414.Rafael Espindola2010-10-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116910 91177308-0d34-0410-b5e6-96231b3b80d8
* lto: Respect LLVM_VERSION_INFO make variable, since setting CC arguments withDaniel Dunbar2010-10-15
| | | | | | spaces gives tests fits and shell escaping is an art best left to jabberwockies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116632 91177308-0d34-0410-b5e6-96231b3b80d8
* This file needs ToolOutputFile.h too.Dan Gohman2010-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115976 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide a fast "get me the target triple from the module" API. This canBill Wendling2010-10-06
| | | | | | | | | drastically reduce the linking time during LTO. Patch by Shantonu Sen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115728 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new scope type "LTO_SYMBOL_SCOPE_DEFAULT_CAN_BE_HIDDEN" for theBill Wendling2010-09-27
| | | | | | | "linker_private_weak_auto_def" linkage type for LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114868 91177308-0d34-0410-b5e6-96231b3b80d8
* The "linker_private_weak*" linkages should set the LTO_SYMBOL_DEFINITION_WEAKBill Wendling2010-09-27
| | | | | | | during LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114850 91177308-0d34-0410-b5e6-96231b3b80d8
* Make tool_output_file's raw_ostream instance a member variable insteadDan Gohman2010-09-01
| | | | | | | | | | | of a base class. This makes it possible to unregister the file from FilesToRemove when the file is done. Also, this eliminates the need for formatted_tool_output_file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112706 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix prototypes.Devang Patel2010-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112200 91177308-0d34-0410-b5e6-96231b3b80d8
* lto_codegen_set_gcc_path was removed.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112069 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few missing entries in lto.exports.Dan Gohman2010-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112068 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert tools to use tool_output_file, and introduce errorDan Gohman2010-08-20
| | | | | | | checking to places which previously lacked it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111651 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the cpu used for codegen.Rafael Espindola2010-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110759 91177308-0d34-0410-b5e6-96231b3b80d8
* lto: Fix an inverted conditional which prevented the addition of symbols scrapedDaniel Dunbar2010-08-11
| | | | | | | | from inline assembly, except in cases where they had already been seen (in which case they would get added twice). - I can't see how this ever worked... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110757 91177308-0d34-0410-b5e6-96231b3b80d8
* lto: Fix gratuitous memory leaks.Daniel Dunbar2010-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110756 91177308-0d34-0410-b5e6-96231b3b80d8
* lto: Reduce nesting.Daniel Dunbar2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110752 91177308-0d34-0410-b5e6-96231b3b80d8
* LTOModule.cpp: Fix numerous style issues.Daniel Dunbar2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110751 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the flags passed to the assembler.Rafael Espindola2010-08-10
| | | | | | Nick, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110705 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible to set the target triple and expose that with an option in theRafael Espindola2010-08-09
| | | | | | gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110604 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Don't pass -avoid-version or -no-undefined on Darwin, they don't doDaniel Dunbar2010-07-31
| | | | | | anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109957 91177308-0d34-0410-b5e6-96231b3b80d8
* build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsettingDaniel Dunbar2010-07-16
| | | | | | the libLTO library version from the actual build version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108495 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate some unnessary Path::exists() calls.Dan Gohman2010-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104888 91177308-0d34-0410-b5e6-96231b3b80d8
* When handling raw_ostream errors manually, use clear_error() so thatDan Gohman2010-05-27
| | | | | | | | | | raw_ostream doesn't try to do its own error handling. Also, close the raw_ostream before checking for errors so that any errors that occur during closing are caught by the manual check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104882 91177308-0d34-0410-b5e6-96231b3b80d8
* The getDefaultSubtargetFeatures method of SubtargetFeature did actually return aBill Wendling2010-05-11
| | | | | | | | | | | | | | | | string of features for that target. However LTO was using that string to pass into the "create target machine" stuff. That stuff needed the feature string to be in a particular form. In particular, it needed the CPU specified first and then the attributes. If there isn't a CPU specified, it required it to be blank -- e.g., ",+altivec". Yuck. Modify the getDefaultSubtargetFeatures method to be a non-static member function. For all attributes for a specific subtarget, it will add them in like normal. It will also take a CPU string so that it can satisfy this horrible syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103451 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -enable-sjlj-eh option, which doesn't do anything.Duncan Sands2010-05-02
| | | | | | | | Remove the -enable-eh option which is only used by the JIT, and replace it with -jit-enable-eh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
* r98363 deleted a '!' when cleaning up whitespace. This caused globals which areBill Wendling2010-04-27
| | | | | | | | *not* declarations to *not* be placed in the "preserve" list. <rdar://problem/7870735> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102405 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more -Wcast-qual warnings.Dan Gohman2010-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101656 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the export files absolute paths, and change Makefile.rulesDan Gohman2010-04-15
| | | | | | | to expect them this way, to fix srcdir!=objdir builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101414 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize the EXPORTED_SYMBOL_FILE concept in the Makefiles to work withDan Gohman2010-04-15
| | | | | | | | | | | native linking export files, including running sed to prepend underscores on darwin, and make use of it in libLTO and libEnhancedDisassembly. Remove the leading underscores from library export files so that they work with the new EXPORTED_SYMBOL_FILE support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101399 91177308-0d34-0410-b5e6-96231b3b80d8
* stringref-ize the MemoryBuffer::get apis. This requiresChris Lattner2010-04-05
| | | | | | | a co-committed clang patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100485 91177308-0d34-0410-b5e6-96231b3b80d8
* Trim #includes.Dan Gohman2010-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99416 91177308-0d34-0410-b5e6-96231b3b80d8
* give Mangler access to TargetData.Chris Lattner2010-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98378 91177308-0d34-0410-b5e6-96231b3b80d8
* make the mangler take an MCContext instead of an MAI.Chris Lattner2010-03-12
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98363 91177308-0d34-0410-b5e6-96231b3b80d8