summaryrefslogtreecommitdiff
path: root/tools/lto/LTOModule.h
Commit message (Collapse)AuthorAge
* Add a way to grab the target options from the LTO command line.Bill Wendling2012-08-06
| | | | | | | | | | When the command line target options were removed from the LLVM libraries, LTO lost its ability to specify things like `-disable-fp-elim'. Add this back by adding the command line variables to the `lto' project. <rdar://problem/12038729> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161353 91177308-0d34-0410-b5e6-96231b3b80d8
* Hack the hack. If we have a situation where an ASM object is defined but isn'tBill Wendling2012-04-02
| | | | | | | | | | | reflected in the LLVM IR (as a declare or something), then treat it like a data object. N.B. This isn't 100% correct. The ASM parser should supply more information so that we know what type of object it is, and what attributes it should have. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153870 91177308-0d34-0410-b5e6-96231b3b80d8
* It could come about that we parse the inline ASM before we get a potentialBill Wendling2012-04-02
| | | | | | | | definition for it. In that case, we want to wait for the potential definition before we create a symbol for it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153859 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup whitespace and trim some of the #includes.Bill Wendling2012-03-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153807 91177308-0d34-0410-b5e6-96231b3b80d8
* Make some headway towards compiling all of LLVM.Bill Wendling2012-03-29
| | | | | | | | | | | | | | | | | | Module-level ASM may contain definitions of functions and globals. However, we were not telling the linker that these globals had definitions. As far as it was concerned, they were just declarations. Attempt to resolve this by inserting module-level ASM functions and globals into the '_symbol' set so that the linker will know that they have values. This gets us further towards our goal of compiling LLVM, but it still has problems when linking libLTO.dylib because of the `-dead_strip' flag that's passed to the linker. <rdar://problem/11124216> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153638 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup whitespace.Bill Wendling2012-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153634 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup some whitespaces.Bill Wendling2012-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153612 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat the LTOModule code to be more inline with LLVM's coding standards. AddBill Wendling2012-03-28
| | | | | | | a bunch of comments for the various functions. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153595 91177308-0d34-0410-b5e6-96231b3b80d8
* Some whitespace cleanup.Bill Wendling2012-03-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153567 91177308-0d34-0410-b5e6-96231b3b80d8
* Move comment to the correct place.Bill Wendling2011-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143690 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the Mangler an ivar so that it doesn't have to be passed around everywhere.Bill Wendling2011-11-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143689 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the MCContext so that it's an ivar instead of a local which is passedBill Wendling2011-11-04
| | | | | | | around. This is important for some future work as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143688 91177308-0d34-0410-b5e6-96231b3b80d8
* lto/addAsmGlobalSymbols: fail fracefully when the target does not define ↵Ivan Krasin2011-09-08
| | | | | | AsmParser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139283 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the computation of undefined symbols. Instead of walkingRafael Espindola2011-03-18
| | | | | | | | | | | | | | | | | | | | | | | functions and initializers, just report the declarations present in the module. The motivation is to open the way for using the lazy module parsing, which should speed up clients that just want a symbol list (nm, ar). This is slightly less precise, but since both -strip-dead-prototypes and -globaldce are part of the standard pipeline, this shouldn't change the result for clang/dragonegg produced binaries. Any decl in an IL file was also put there because a FE expected it to be necessary, so this should not be a problem for "-O0 -emit-llvm". As a sanity check, I have bootstrapped clang on linux and built firefox on both linux and darwin. A clang bootstrap on darwin with LTO fails with or without this patch because, ironically, the linker doesn't like the combination of dead_strip and LTO when building libLTO.so :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127870 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support in the LTO library for loading an object from the middleRafael Espindola2011-03-17
| | | | | | of an file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127781 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
* 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
* 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
* Fix struct/class mismatch for LTOModule and LTOCodeGenerator, detected by ClangDouglas Gregor2009-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92004 91177308-0d34-0410-b5e6-96231b3b80d8
* Added getDefaultSubtargetFeatures method to SubtargetFeatures class which ↵Viktor Kutuzov2009-11-18
| | | | | | returns a correct feature string for given triple. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89236 91177308-0d34-0410-b5e6-96231b3b80d8
* Maintain the old LTO API, by using the global context.Owen Anderson2009-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74678 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-01
| | | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-01
| | | | | | | | | | | 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
* <rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbolsNick Kledzik2009-06-01
| | | | | | | | Parse __OBJC data structures and synthesize magic .objc_ symbols. Also, alter mangler so that objc method names are readable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72700 91177308-0d34-0410-b5e6-96231b3b80d8
* Untabify.Evan Cheng2009-05-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72600 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LTO_SYMBOL_DEFINITION_WEAKUNDEF, use that on the gold plugin.Rafael Espindola2009-04-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69972 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not forget global definitions from inline asm code block.Devang Patel2008-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53693 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename new lto2 tool as lto.Devang Patel2008-06-30
lto2->lto git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52912 91177308-0d34-0410-b5e6-96231b3b80d8