summaryrefslogtreecommitdiff
path: root/tools/lto
Commit message (Collapse)AuthorAge
* Now that the linker supports lazily materialising globals, don'tPeter Collingbourne2011-11-05
| | | | | | | | materialise them in LTO. I observed a ~0.5-1% speedup for an LTO link of opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143784 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformatting changes to get rid of blank lines, put code on one line, and toBill Wendling2011-11-04
| | | | | | | decrease some code indentation. No intended functional changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143723 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
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143502 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-18
| | | | | | new all-targets pseudo-component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8
* lto/addAsmGlobalSymbols: fast path when no module level asm is present.Ivan Krasin2011-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139284 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
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-01
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed compilation warning on Linux by fixing the type of a return value.John Criswell2011-08-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137913 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-16
| | | | | | | The argument is unused, and is a layering violation in any case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8
* Move methods in PassManagerBuilder offline.Rafael Espindola2011-08-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136727 91177308-0d34-0410-b5e6-96231b3b80d8
* move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,Rafael Espindola2011-08-02
| | | | | | | but it solves a layering violation since things in Support are not supposed to use things in Transforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136726 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-26
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Nick Lewycky2011-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135971 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-23
| | | | | | they belong. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135833 91177308-0d34-0410-b5e6-96231b3b80d8
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-22
| | | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-20
| | | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135611 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-20
| | | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135569 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-19
| | | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-18
| | | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135424 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-14
| | | | | | MCTargetDesc to prepare for next round of changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
* Unfortunately several files in MC are badly violating layering rule by usingEvan Cheng2011-07-14
| | | | | | | | | | TargetAsmInfo, which in turn pulls in TargetRegisterInfo, etc. :-( There are other cases of violations, but this is probably the worst. This patch is but one small step towards fixing this. 500 more steps to go. :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135131 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix LTO after the recent MC subtarget refactoring.Cameron Zwarich2011-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134930 91177308-0d34-0410-b5e6-96231b3b80d8
* Change createAsmParser to take a MCSubtargetInfo instead of triple,Evan Cheng2011-07-09
| | | | | | | | | | CPU, and feature string. Parsing some asm directives can change subtarget state (e.g. .code 16) and it must be reflected in other modules (e.g. MCCodeEmitter). That is, the MCSubtargetInfo instance must be shared. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134795 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate asm parser's dependency on TargetMachine:Evan Cheng2011-07-08
| | | | | | | | | | | - Each target asm parser now creates its own MCSubtatgetInfo (if needed). - Changed AssemblerPredicate to take subtarget features which tablegen uses to generate asm matcher subtarget feature queries. e.g. "ModeThumb,FeatureThumb2" is translated to "(Bits & ModeThumb) != 0 && (Bits & FeatureThumb2) != 0". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134678 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-30
| | | | | | | | | | | be the first encoded as the first feature. It then uses the CPU name to look up features / scheduling itineray even though clients know full well the CPU name being used to query these properties. The fix is to just have the clients explictly pass the CPU name! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
* Sink SubtargetFeature and TargetInstrItineraries (renamed ↵Evan Cheng2011-06-29
| | | | | | MCInstrItineraries) into MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134049 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate r133516 "Remove some unnecessary uses of c_str()." A trailing nullChad Rosier2011-06-28
| | | | | | | | | | character in std::string was causing failures for a few ObjC and Obj-C++ tests when -flto was enabled. Revision 133999 resolved this issue. Thanks Jay! rdar://9685235 PR10210 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134017 91177308-0d34-0410-b5e6-96231b3b80d8
* PR10210: New method ConstantArray::getAsCString(). Use it in LTO toJay Foad2011-06-28
| | | | | | | avoid getting embedded trailing null bytes in std::strings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133999 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r133516 "Remove some unnecessary uses of c_str()."Chad Rosier2011-06-27
| | | | | | | | This was causing compile-time failures for some of the Objc and Obj-C++ benchmarks. The specific errors were of the form: "ld: duplicate symbol …" rdar://9660124 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133955 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unnecessary uses of c_str().Jay Foad2011-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133516 91177308-0d34-0410-b5e6-96231b3b80d8
* switch bugpoint and liblto to PassManagerBuilder.Chris Lattner2011-05-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131821 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the handling of pcrel relocations on ELF. Now we do the right thingRafael Espindola2011-05-01
| | | | | | | | | | for all symbol differences and can drop the old EmitPCRelSymbolValue method. This also make getExprForFDESymbol on ELF equal to the one on MachO, and it can be made non-virtual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130634 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused argument.Rafael Espindola2011-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129955 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2011-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129902 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMakeLists.txtDevang Patel2011-04-01
| | | | | | | | Patch by arrowdoger. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128719 91177308-0d34-0410-b5e6-96231b3b80d8
* Expoert c interface for disassembler.Devang Patel2011-03-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128440 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a lto_codegen_compile_to_file to avoid producing a file, reading it toRafael Espindola2011-03-22
| | | | | | memory and writing it back to disk. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128108 91177308-0d34-0410-b5e6-96231b3b80d8
* We don't need a null terminator for the output file.Rafael Espindola2011-03-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128098 91177308-0d34-0410-b5e6-96231b3b80d8
* Use lazy parsing in LTO. Unfortunately this is only a 3% time saving forRafael Espindola2011-03-18
| | | | | | 'ar'. Have to figure out how to make libLTO even lazier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127901 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
* tools/lto/LTOModule.cpp: Eliminate an unused variable.NAKAMURA Takumi2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127859 91177308-0d34-0410-b5e6-96231b3b80d8
* Use RequiresNullTerminator to create buffers without a null terminatorRafael Espindola2011-03-17
| | | | | | instead of copying. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127835 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
* Build LTO as a static library too.Oscar Fuentes2011-03-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127553 91177308-0d34-0410-b5e6-96231b3b80d8