aboutsummaryrefslogtreecommitdiff
path: root/tools/lto/lto.cpp
AgeCommit message (Collapse)Author
2013-08-26Revert LOCALMODs in gold plugin and libLTO related to bitcode shared objects ↵Derek Schuff
and symbol wrapping This reverts the local modifications to the gold plugin and liblto for bitcode shared objects and for symbol wrapping, neither of which are used or tested anymore. It depends on a corresponding change to the linker plugin API. R=eliben@chromium.org, jvoung@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3520 Review URL: https://codereview.chromium.org/22831032
2013-08-07Revert localmod for bitcode linking speedup (different fix upstream).Jan Voung
Original localmod: https://codereview.chromium.org/10808021/ which fixes some quadratic behavior. Xiaofei Wan fixed the quadratic behavior upstream differently, via a series of commits around: http://llvm.org/viewvc/llvm-project?view=revision&revision=181104 and it is actually faster: ~7 seconds to link pnacl-llc w/ just the upstream fix ~11 seconds to link with localmod (used to be ~120 seconds w/ quadratic behavior) BUG=http://code.google.com/p/nativeclient/issues/detail?id=2883 TEST= trybots: http://chromegw.corp.google.com/i/tryserver.nacl/builders/nacl-toolchain-linux-pnacl-x86_64/builds/784 R=eliben@chromium.org Review URL: https://codereview.chromium.org/22509002
2013-05-06Fix build warnings/UB in LTOCodeGenerator.cppDerek Schuff
Change the gatherModuleForLinking interface to return void, and add a default case in setMergedModuleOutputFormat to silence gcc warning. BUG=cleanup R=jvoung@chromium.org, mseaborn@chromium.org Review URL: https://codereview.chromium.org/14582019
2013-01-11Merge commit '1ad9253c9d34ccbce3e7e4ea5d87c266cbf93410'Derek Schuff
deplib features commented out due to removal upstream; will add back as a localmod Conflicts: include/llvm/ADT/Triple.h include/llvm/MC/MCAssembler.h include/llvm/Target/TargetFrameLowering.h lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/AsmPrinter/DwarfDebug.h lib/CodeGen/BranchFolding.cpp lib/LLVMBuild.txt lib/Linker/LinkArchives.cpp lib/MC/MCAssembler.cpp lib/MC/MCELFStreamer.cpp lib/Makefile lib/Target/ARM/ARMExpandPseudoInsts.cpp lib/Target/ARM/ARMFrameLowering.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/ARMSubtarget.h lib/Target/ARM/ARMTargetObjectFile.cpp lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp lib/Target/Mips/MipsInstrFPU.td lib/Target/Mips/MipsInstrInfo.td lib/Target/X86/X86CodeEmitter.cpp lib/Target/X86/X86Subtarget.h lib/VMCore/Module.cpp test/MC/MachO/ARM/nop-armv4-padding.s tools/Makefile tools/llc/llc.cpp tools/lto/LTOModule.cpp tools/lto/lto.cpp
2012-12-10Revert r169656.Bill Wendling
The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that should be kept around. The linker will pretend that a dylib is being created. <rdar://problem/12528059> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169770 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-08Add the `lto_codegen_set_export_dynamic' function.Bill Wendling
This function sets the `_exportDynamic' ivar. When that's set, we export all symbols (e.g. we don't run the internalize pass). This is equivalent to the `--export-dynamic' linker flag in GNU land: --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will normally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use dlopen to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. The Darwin linker will support this via the `-export_dynamic' flag. We should modify clang to support this via the `-rdynamic' flag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169656 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-04Sort the #include lines for tools/...Chandler Carruth
Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13Change LLVM bitcode linking to use tree reductionJan Voung
rather than link in one at a time. Linking one at a time means that the "Dst" module keeps growing yet needs to be crawled entirely at each step to gather a set of types. http://codereview.chromium.org/10808021/
2012-07-09LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)Derek Schuff
(only non-new files; new files in git 4f429c8b) Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
2012-04-16Remove lto_codegen_set_whole_program_optimization. It is a work in progress,Rafael Espindola
so we don't want it to show up in the stable 3.1 interface. While at it, add a comment about why LTOCodeGenerator manually creates the internalize pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154807 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-09s/lto_codegen_whole_program_optimization/lto_codegen_set_whole_program_optim ↵Bill Wendling
ization/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154312 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-09Add a hook to turn on the internalize pass through the LTO interface.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154306 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-31Cleanup whitespace and remove unneeded 'extern' keyword on function definitions.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153802 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-30Cleanup whitespace. Doxygenize comments. And indent to llvm coding standards.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153740 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-15Fix a ton of comment typos found by codespell. Patch byChris Lattner
Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-22Add a lto_codegen_compile_to_file to avoid producing a file, reading it toRafael Espindola
memory and writing it back to disk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128108 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-17Add support in the LTO library for loading an object from the middleRafael Espindola
of an file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24Switch LTO to use MC. This takes the linking of libxul.so from about 7m toRafael Espindola
6m30. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126426 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08Don't open the file again in the gold plugin. To be able to do this, updateRafael Espindola
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
2011-01-07Do not include DataTypes.h in llvm-c/lto.h.Devang Patel
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
2010-08-26Fix prototypes.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11Make it possible to set the cpu used for codegen.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-10Make it possible to set the flags passed to the assembler.Rafael Espindola
Nick, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-09Make it possible to set the target triple and expose that with an option in theRafael Espindola
gold plugin. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110604 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-03Remove the GCC path from libLTO. This has been superceded by setAssemblerPath.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77960 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-03Add newline at end of file.Duncan Sands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02Maintain the old LTO API, by using the global context.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74678 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Hold the LLVMContext by reference rather than by pointer.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson
LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-26Indentation.Evan Cheng
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04<rdar://problem/6940611> libLTO.dylib needs to let linker specify path to ↵Nick Kledzik
assembler Add lto_codegen_set_assembler_path() API which allows the linker to specify the path to the assembler tool to run. When assembler is used (instead of compiler) different command line options are used. Add LTO_API_VERSION #define so clients (linkers) can conditionalize use of new APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-30Allow a user of libLTO to specify the full pathname of the gcc executable toNick Lewycky
run when assembling. Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc and it will run that gcc instead of looking for it on the path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08fix dangling pointer and argv off by one errors. Add support for ↵Nick Kledzik
--disable-inlining git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53249 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-03Provide a hook to set the code generation debug options to investigate lto ↵Devang Patel
failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53119 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30Rename new lto2 tool as lto.Devang Patel
lto2->lto git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-30Remove old LTO interface.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-16Add CommonLinkage to lto (treated same as weak AFAICT)Dale Johannesen
and llvm-nm (prints as C). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51209 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22Move MemCpyOpt after GVN.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50097 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-22Add MemCpyOpt to LTO.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50081 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-21Use GVN in LTO instead of GCSE+LoadVN.Owen Anderson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50036 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-02Make EH work with unnamed functions. Reenable runningDale Johannesen
StripSymbols when EH is on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49110 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-07Begin setting features for target based on target triple string.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46863 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-04Do not set time out, lets assume assembler will do its job in reasonable ↵Devang Patel
amount of time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46718 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-02Do not strip symbols when EH is ON.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Supply appropriate arch info to darwin assembler.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46567 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-30Enable exception handling if it is supported.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46560 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-15- Introduces versioning macro LLVM_LTO_VERSIONDevang Patel
- Communicate symbol visibility - Communicate code generation model git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46033 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29remove attributions from tools.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Revert my previous check-in.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45249 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Add lto version check mechanism.Devang Patel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45238 91177308-0d34-0410-b5e6-96231b3b80d8